[Catalyst] Re: Catalyst Digest, Vol 12, Issue 61

Christopher H. Laco claco at chrislaco.com
Thu Feb 16 14:51:11 CET 2006


Karl.Moens at marsh.com wrote:
> 
> 
> 
> 
> 
> Ian Docherty <icd at ecisecurity.com> wrote:
> 
>> So, if the view was changed to use some other method that (for example)
>> used a radio button, or a drop-down, instead of a checkbox then only the
>> view would change (to process the input) and the controller would remain
>> unchanged.
>>
>> I argue then that 4 *does* belong in the View and not the controller.
> 
> The interaction between the Controller and the View is based upon the
> concept of "implied contracts" (sorry to speak legalese here, but I am a
> lawyer after all). The Controller has agreed to send the View a certain
> amount of data in a pre-arranged format and the View has agreed to return
> some data to the Controller in (another)  pre-arranged format. The View may
> decide to change the way it looks, but it cannot (without bad consequences)
> change the format of the data returned. So either the View internally
> transforms the data from the new format to the old format (which will
> probably need some Javascript, because TT is already out of the loop when
> the data returns) or it negotiates a new contract with the Controller. This
> has nothing to do with the various components of the M V C concept being
> agnostic of each other, but everything with a clear division of tasks AND
> keeping to the implied contracts which exist between the various
> components.
> 
> The same goes between the Model and the Controller: the Controller couldn't
> care less about the back-end storage used by the Model, but it does care
> about the data it will receive from the Model. There is a heavy price to
> pay if all of a sudden the Model changes the field names or the encoding of
> the data or the date-format or ...
> 
> Karl
> aka CountZero on Perlmonks

Right. There's no such things as a true [complete] separation between M,
V, and C.  The best one can ever hope for is a "good" seperation between
M, V, and C so that any changes are much less work than if there was
bad, or no seperaiton at all.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060216/589065f5/signature.pgp


More information about the Catalyst mailing list