[Catalyst] RCF for a Catalyst Wiki Controller

Matt S Trout dbix-class at trout.me.uk
Mon May 22 16:07:18 CEST 2006


Perrin Harkins wrote:
> On Mon, 2006-05-22 at 13:35 +0100, Matt S Trout wrote:
>> Absolutely agreed, I'm currently experimenting with a double-layer MVC 
>> approach where I have one MVC for the domain model and the app itself is 
>> a second MVC whose model merely interacts with domain view and 
>> controller objects (for those of you following along the "stealing from 
>> Jifty" part, this is not unlike the Jifty action approach although Jesse 
>> and I can probably claim "parallel invention" rights given we've been 
>> discussing this sort of stuff for close to a year now).
>>
>> The nice thing about this approach is that provided you present the 
>> appropriate domain view/controller interfaces you can swap out the 
>> underlying implementation trivially since your DBIx::Class or similar 
>> objects never leak outside to the UI/web layer.
> 
> If I'm following this correctly, it sounds like you're doing classic
> MVC, i.e. the application logic is all in the model, and the view and
> controller just map input to the model and display the results.  In
> other words, pushing the code that normally accumulates in the
> controller of a Catalyst app down to the model.

In a word: yes. But conceptualising it as double-MVC lets me make the 
domain stuff a Catalyst app (sans Engine) as well, which makes life much 
much easier.

Public code coming soon, would already be out but people keep offering 
to pay us for stuff and who am I to stop them :)



More information about the Catalyst mailing list