[Catalyst] Model Instances vs. Model Classes - Round 2
Benjamin Hitz
hitz at stanford.edu
Fri Jul 22 15:46:46 GMT 2011
Alejandro -
thanks for this, it's quite clear.... I had forgotten that I asked for it even.
Ben
On Jul 19, 2011, at 11:25 PM, Alejandro Imass wrote:
> On Thu, May 19, 2011 at 7:06 PM, Benjamin Hitz <hitz at stanford.edu> wrote:
>>>
>>> Maybe I should craft up some sample code of the three patterns identified:
>>>
>>> 1) Catalyst Models Classes: that completely instantiate per request.
>>> 2) Catalyst Model Instances: with wrapper methods
>>> 3) Catalyst Model Instances: with wrapper attributes
>>
>> Would like to see that. Some of us don't follow all this abstract computer science jargon that well.
>>
>
> I tried to make it as practical as possible:
>
> http://wiki.catalystframework.org/wiki/best_practices/models_definitive_guide
>
> Maybe others can complement with more "M Patterns"
>
> Best,
>
> Alejandro Imass
>
>> Also - can you comment on the following:
>>
>> WARNING WARNING WARNING
>>
>> Using this module is somewhat of a hack. Changing the state of your objects on every request is a pretty braindead way of doing OO. If you want your application to be brain-live, then you should use Catalyst::Component::InstancePerContext.
>>
>> (appears in POD for Catalyst::Component::ACCEPT_CONTEXT - which I was reviewing because of your email... apparently I must have read this once and told my self "Never do this")
>>
>>
>> Ben
>> --
>> Ben Hitz
>> Senior Scientific Programmer ** Saccharomyces Genome Database ** GO Consortium
>> Stanford University ** hitz at genome.stanford.edu
>>
>>
>>
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
--
Ben Hitz
Senior Scientific Programmer ** Saccharomyces Genome Database ** GO Consortium
Stanford University ** hitz at stanford.edu
More information about the Catalyst
mailing list