MVCR pattern (was Re: [Catalyst] Bing!)

David Storrs dstorrs at dstorrs.com
Thu Aug 11 17:36:12 CEST 2005


On Aug 11, 2005, at 11:19 AM, Christopher H. Laco wrote:

> Zbigniew Lukasiak wrote:
>
>> Dear David,
>> On the Backround Knowlege page you mention I don't find any example -
>> only description of the two methodologies.  For exclusion of business
>> logic from Controller I provide a real life example - accessing the
>> application data from outside of the web, it's quite common that you
>> need that for some cleaning operations (run from crontab) etc.  I  
>> wait
>> for you to provide similar examples on why business logic should be
>> excluded from Model.  Only having those examples people could decide
>> if they are relevant in their particular case.
>> -- Zbyszek
>>
>
> In the example above, not only excluded from the Model, but  
> excluded from the entire Catalyst MVC ''web' framework. Web being  
> the key word there.
>
> -=Chris

I think this pretty much said it, but I'll restate in case it wasn't  
clear:

- Your example talks about putting all the code into separate modules  
that are in no way attached to the web app.  The web app would then  
provide an interface to these modules.

- In a previous email, I agreed with you that this was the right  
thing to do.  I said then, and I will say again now:  It is the right  
thing to do.  It is also not relevant to what I'm asking.  My  
question is /which component/ of the the web app should be  
responsible for providing that interface to your external modules?   
Should it be the Controller?  Should it be the Model?  Should it be a  
special-purpose Action class that is not part of the canonical MVC  
pattern?  Should it be some blurring of the above?

I do not have a position on this question--I made a choice and am  
following it in my development, but it was based pretty much entirely  
on personal aesthetics and I'm quite prepared to be convinced that  
there is a better way.  I'm interested in talking about what that  
better way might be.


It's not that I'm avoiding your question, it's that I have already  
agreed with you and am trying to have a completely separate  
conversation.

--Dks



More information about the Catalyst mailing list