Re: Mason 2.0 thoughts

Dave Rolsky <[email protected]> Sat, 12 May 2007 23:18:39 -0500 (CDT)
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Sat, 12 May 2007, Hans Dieter Pearcey wrote:

> On Sun, Apr 29, 2007 at 05:22:25PM -0500, Dave Rolsky wrote:
>> Jon Swartz and I recently chatted and one of things we talked about is
>> what a Mason 2.0 might look like. It's been buzzing around my brain
>> recently, so I write up some notes on this here -
>> http://www.masonhq.com/?Mason20Notes
>
> These notes mainly talk about things you would a) move or b) remove -- are
> there any (major or minor) features you are toying with adding, or would like
> to add once you remove some things that are blockers, or anything like that?

There's a few small features mentioned in there. I'd like to unify the 
filters concept and allow filters to be either components, subroutines, or 
"named filters" like "|h" in a substition.

> You listed caching as something that would be part of Framework, not Template.
> I'm not sure that cache_self makes sense there.  Unfortunately, I'm not sure
> where it does make sense.
>
> Knowing expiration/key (basically, metadata about the stash) seems like a
> controller function.  Knowing the layout and makeup of templates seems like a
> view function.  cache_self requires both to be in one place.
>
> I would hate to give up cache_self; it's one of the things I have grown to
> really appreciate about mason vs. TT.

If you're using Catalyst, it's really easy to implement a cache_self 
equivalent in your controller code using Catalyst's caching plugins. I 
don't think it really requires any knowledge of the view.

All you have to do is capture the output the first time through, which is 
pretty easy to under Catalyst, since there's a chance to step in betwee 
rendering and actually sending output to the client.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/