On Sun, 17 Jun 2007, Jonathan Swartz wrote:

>> Putting all your controller logic, especially non-display logic (like form
>> submission handling) in Mason components is a bad design (and yes, I know
>> that's how the book's example site works ;)
>
> The jury's still out for me. I've been doing my own Catalyst site conversion, 
> and I had high hopes for the controller stuff, but so far I'm feeling 
> surprisingly underwhelmed. I feel like I'm expending a lot of extra energy 
> keeping related code in sync between modules & components, and shuffling 
> things from $c->params to $c->stash when I would have just used <%args> 
> before. The Catalyst pattern-based action handling is wonderful and flexible, 
> but the benefits of that haven't outweighed the extra work. So far. This is 
> still very much a work in progress.

I imagine there a lot of ways to automate the common patterns of 
populating the stash.

One thing I've done with various MasonX::WebApp-based apps in the past was 
to check the incoming parameters for anything matching "object_id" 
(vendor_id, location_id, etc) and then use that to create a real object 
out of it.

It's possible that this could end up being wasted effort occassionally, 
but most of the time when I've passed a parameter of that type I will want 
an object out of it.

If you're using path-based parameters like "/vendor/15" I'm pretty sure 
this is what the Chained path bits in catalyst are designed to handle.


-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
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to