On Tue, 2005-11-08 at 10:37 +0000, David Baird wrote:
> On 11/7/05, Peter Speltz <[EMAIL PROTECTED]> wrote:
> > Here is what transpired on #maypole leading to the new and exciting
> > topic of Maypole Ribbons. Some preliminary and OT things snipped out
> > for brevity and clarity.
> 
> <snip>
> 
> >  So Maypole needs ´Ribbons'  as Aaron aptly named them to  tie
> > everything together by feeding the various components the information
> > they need to function within the application.   Does that sound about
> > right?
> >
> 
> I'm thinking this is a useful concept, and we already have them, we
> just thought they were awkward bits that contradict MVC. The ribbons
> are the bits that join the M, V and C domains together. Some of them
> include:
> 
> - the vars() method in Maypole::View::Base, which injects dynamic data
> from the model, and static data from the config, into the templates
> - the proposed instance() method, which gives universal access to the
> request object, and thence to the config object
> - setup() [the bits moved to setup_model() in 2.11], which constructs
> the Maypole model during startup
> - ditto init(), for setting up the view
> 
> We've had a fair bit of debate about how MVC is Maypole, and what bits
> of Maypole represent M, V and C, and I think we've been struggling to
> shove every little bit of Maypole into one of those categories. But
> the categories are perhaps more conceptual, and much of the job of
> Maypole is to provide the ribbons that channel information from one
> category to another.
> 
> In fact, there's very little code in Maypole that counts as V - that's
> all in TT and the templates, and most of the code in
> Maypole::View::Base and ::TT is about communicating with the View.
> Similarly for the model, but it's a bit more complex, because in a
> simple Maypole app, like BeerDB, the only model is the Maypole model.
> But in a complex app, the Maypole model becomes the ribbon that joins
> the Controller to the underlying model.
> An interface to the M.

Most of this stuff is what I call the Presentation. I'm a fan of Martin
Fowler and got that term from his patterns. There are many pages on his
site, which is a bit disorganized, and I still haven't completely
figured out my take, but see for example
http://www.martinfowler.com/eaaDev/OrganizingPresentations.ht
http://www.martinfowler.com/eaaDev/PresentationModel.html

Cheers, Dave

> We should just be careful that whenever we want to add something that
> doesn't sit comfortably in the MVC paradigm, we just label it as a
> ribbon and don't look deeper.
> 
> d.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to