I have been looking around at various frameworks. It seems that the Front Controller pattern in PHP has settled down a little in the last year, with most frameworks moving toward similar implementations. I am assuming here an Action Controller dispatched by a Front Controller, but the same types of automation and conventions would work for a Page Controller as well.
I am interested in the automation methods and conventions that people like and use either in their own framework or one of the published frameworks. I am focusing on about Action Controllers and Views only because they share the same Presentation layer needs. Because they share duties in the same layer, the issue of separation of concerns between them is important. (Models being in a separate layer should be independent and follow their own world of patterns.) And, either the Controller gives the View the Model or View gets the Model scheme is of interest.
So for Action Controllers, what types of things do you like and use. Is easy access to paths (from Front/Router/Dispatch) useful? Is easy view loading a plus? Do you like conventions like Zend's viewRenderer()? Are helpers helpful?
Likewise what do you like in support of Views. Easy support for existing template engines (lacking in many frameworks)? HTML building helpers? Configuration stuff like Symfony? Layout managers? Preset directory structures?
I am currently using different features in projects that use various frameworks. When using my own code, automation and convention tend to flow from need rather than any sense of best practices. I am having trouble getting the big picture of what basic automation methods these Action and View classes should implement or what conventions are becoming standard.
I am hoping that by listing what you like and use, it will become clear which direction Action Controllers and Views might be headed (and by process of elimination also identify the less useful stuff).
MVC Actions and Views - Automation and Conventions
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US