...

Can you give a real world example where you know (from the
beginning/ the request input) that you need more than one
controller?
Actually, you'd need one "controller" and several so-called "zones"
to build the view of the webportal.
Don't know how other systems solve that. In eZ Publish those "zones" are just some templates that are included in page_layout.tpl. Things like tree menu or a box with latest news are build via template functions that fetch and represent the data. You can argue that this is a little bit against strict MVC as there is some logic inside the templates. But it is somehow intuitive. Also you do not need to touch the "core" of your application or change some configs if you want to add a new box/zone.
That's exactly what i'm talking about. The other problem with zones is that
their business-logic is limited to what the template is allowed to use.

Btw, I just happened to look at a coworker's [edited out trendy php mvc framework] code. He had to implement permissions checking in every single new page (err, action) he made (or build meta-actions that would do pre and post processing before calling the real-meat actions), and for the login/logout buttons he resorted to a frames solution - yuck!

Now, he's just been learning it for a couple of weeks, and probably there are more elegant solutions to those problems within the framework, but I still think that:

- the eZ way of setting up a pagelayout and a separate object content, while not perfect, fist the bill most of the time. The fact that perms checking is done atomatically by the standard controller before invoking module/view is also nice

- in the end, MVC !== WEB. This is the biggest pain point with all these routing/chaining problems. Mvc was dreamed in a different era, and fits badly to modern-day web apps (unless maybe you do views in javascript). Other things are also staring to show lots of wrinkles, see eg http://www.codinghorror.com/blog/archives/001057.html for a nice insight about keyboard navigation.

bye
Gaetano
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to