On Sat, 7 Jul 2007, Jonathan Swartz wrote:

> But calling this "probably a very bad idea" is just too strong,
> especially coming from a Mason maintainer. One gets the impression
> that this will cause imminent death and destruction to a site, which
> is just absurd. One also gets the impression that you'd like to
> deprecate the feature, and I just want to make clear that this will
> never ever happen. :)

I think "probably a very bad idea" means "bad design", not crashing. Am I 
not supposed to have strong opinions because I'm one of the maintainers? 
We do have more than one, and we don't agree on everything, which is fine, 
and probably healthy for the project as a whole.

I would like to get rid of it, but only if we do Mason 2. I certainly 
wouldn't want to remove it from the current code base.

> The fact is, many large and successful Mason sites use this practice
> (e.g. Amazon, quite widely). While it may not be ideal design-wise,
> there are far worse development crimes to commit. At least people are
> modularizing their code and eliminating repetition.

True, that's better than nothing.

> But there will always be some code that is completely view specific -
> we wouldn't be using Mason if we didn't believe this. If such code
> gets too large for its surrounding template, then why not break it
> into a CTRV? Doing so is not only justifiable, but seems preferable
> to splitting it out into an arbitrary "view utilities" module.

I disagree, I _do_ like putting this into a view utilities module. The 
other option would be to generate this sort of stuff in a controller and 
then pass it to the view. That has its own issues, in that the API to your 
view can get unmanageably wide, so it's really about finding balance.

Honestly, I've been using Mason for years and I can't remember the last 
time I made a component return a value. The closest I've come has been 
"pure filtering" components I use with the <&| ... &> syntax. I've found 
myself making components that just do filtering on the content and then 
spit it out, without really adding extra content, and I've been wanting to 
move that into modules as well ;)


-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/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to