[Catalyst] Getting Started
Christopher H. Laco
claco at chrislaco.com
Fri Aug 5 22:38:23 CEST 2005
David Storrs wrote:
>
> On Aug 5, 2005, at 4:06 PM, Christopher H. Laco wrote:
>
>> First, is it a correct assumption to make that the interaction
>> between Model and View is just a matter of the Controller stuffing
>> things into the stash?
>
>
> It is just a question of SOMETHING stuffing things in the stash. What
> does the stuffing is open to question...there was a long thread on this
> recently. It is summarized briefly here:
>
> http://dev.catalyst.perl.org/wiki/NecessaryBackgroundKnowledge
>
> along with a bunch of other information that should help you out.
>
>> Lastly, [trying to get a mental handle on whatcodes goes where in a
>> conversion], is it really just a matter of moving all of the non
>> presentation logic of the TT based site (cookie reads/writes, form
>> posts, redirects) into a Controller and leaving the presentation code
>> in the templates?
>
>
> Mostly. As with everything, it can be argued in multiple ways. Here's
> how I do it:
>
> - Presentation logic is mostly in the templates
> - Views mostly just set which template to display
> - Models are a thin wrapper over the database
> - Controllers manage the business logic
>
>
> --Dks
>
>
What about things (data) that are needed for every page on a site, like
cart count for example. It would seem that the easiest way would be to
make a plugin instead of having every controller set a count in its sub.
Is there some sort of guideline of when things need to be plugins vs.
Models?
-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20050805/6f695d3b/smime.bin
More information about the Catalyst
mailing list