2009年12月4日星期五

[fw-mvc] PageController + ActionStack vs. Simple MVC

I've read some discussions about the "evil" ActionStack in this forum and
specifically here:
http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/

I commented on that (#19).

Now my question is - how do you setup Zend MVC for complex, highly
configurable websites or portals (not only simple blog applications with
basic CRUD operations). In particular, websites that consist of many conrete
pages that make use of (hopefully) reusable components.

For me the best solution is still:

1. Writing a Zend_Controller_Plugin that hooks into routeShutdown()
2. in routeShutdown() compile the set of actions, their parameters,
templates and layout targets from a given page configuration (xml file,
database) and the layout file to be used for that page
3. Push these actions to the ActionStack
4. done

Any other approaches seem not reusable and "hard-coded" for me. I can give
further details on my implementation if needed. I am just curious how others
solve the issue "a page consists of several actions and their respective
views".
--
View this message in context: http://n4.nabble.com/PageController-ActionStack-vs-Simple-MVC-tp948403p948403.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: