7 messages in com.googlegroups.pylons-discussRe: how (Tosca)Widgets fits into MVC ...| From | Sent On | Attachments |
|---|---|---|
| Ksenia | 21 Jan 2007 04:04 | |
| Mike Orr | 21 Jan 2007 11:06 | |
| Alberto Valverde | 22 Jan 2007 12:09 | |
| Shannon -jj Behrens | 22 Jan 2007 16:22 | |
| Ksenia | 25 Jan 2007 02:31 | |
| Ksenia | 25 Jan 2007 03:42 | |
| Alberto Valverde | 25 Jan 2007 09:30 |
| Subject: | Re: how (Tosca)Widgets fits into MVC concept![]() |
|---|---|
| From: | Shannon -jj Behrens (jjin...@public.gmane.org) |
| Date: | 01/22/2007 04:22:41 PM |
| List: | com.googlegroups.pylons-discuss |
On 1/21/07, Ksenia <ksen...@public.gmane.org>
wrote:
Hi,
I am playing with Pylons several weeks now and it's been a big joy to use. Everything just fits together and I think because of Pylons I finally start to get what MVC is all about and see the advantage of clear separation. The piece that I am not sure where it should go, are widgets. The DRY is great, boring error handling is great, but: AFAIK the validation belons to the Model, but the UI belongs in the View, and the "gluing" of M with V belongs to Controller. So the widgets go right through all of the layers... Ok, I can live with that :) But than there is not anymore "only one way to do it". Where ends widget and starts the page template? Is it just form rendering? No, grid with records can also be a widget.... or should I just render it in the template file? Should I only make into a widget something that I want to reuse? I saw the thread about portlet-style site (http://groups.google.com/group/pylons-discuss/browse_frm/thread/2a52b3a490f5d211). Wow, I can even use subrequests. Than I don't need widgets at all - I can just collect all those /doc/view/123, /news/latest, /user/list, /user/view/myid into one page. But on the other hand, I can make all of them into child_widgets and create one big page widget to display them...
I wonder what other think about widgets in relation to MVC in general and Pylons in particular :)
Before we get too carried away, perhaps you'll enjoy this: http://jjinux.blogspot.com/2005/04/mvc-cargo-cult.html
Happy Hacking! -jj




