[Solar-talk] Architecture question

Paul M Jones pmjones at solarphp.com
Mon Oct 16 07:51:31 PDT 2006


On Oct 1, 2006, at 9:48 AM, Travis Swicegood wrote:

> Rodrigo Moraes wrote:
>>> This isn't a case of edit() taking on two roles,
>>> instead it's taking on the abstract role of displaying a form  
>>> that works
>>> for both the add and edit actions.
>>>
>>
>> This is more or less what I meant (sorry if it was not clear), or  
>> am I
>> missing your point?
>>
>
> Yes, that is what you meant.  I was just re-iterating the point and
> agreeing with you.

So the end result of this discussion is that, instead of embedding  
the actual add/edit/etc. logic in the action method itself, one  
should have a separate processing method to handle it.  That way,  
various other methods (such as Ajax-based methods) have access to the  
add/edit logic.  Is that a fair summary?



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list