-- Justin Plock <[EMAIL PROTECTED]> wrote
(on Tuesday, 29 May 2007, 07:09 PM -0400):
> Personally, I think the ZF MVC code should be a "best practices" of
> sort.  ViewRenderer seems very much like an after-thought to me
> instead of integrating the View functionality into the Controller
> directly.

The original proposal by Ralph Schindler would have had tight
integration. However, one of the goals of ZF is to have loosely coupled
components, and in looking at the code Ralph proposed, I became worried
that this would introduce (a) too much complexity in
Zend_Controller_Action, (b) too much coupling between
Zend_Controller_Action and Zend_View, and (c) make long-term
maintentance much more difficult (particularly if the Zend_View
implementation were ever to change).

The action helper system, on the other hand, was designed for exactly
this sort of situation: integrating other ZF components with the action
controllers. Ralph agreed, and we created the ViewRenderer.

The new solution is much more flexible than if we'd done integration
directly into the action controller: users can extend or replace the
view renderer to add custom functionality without needing to extend the
action controller -- which also leads to more portable solutions.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to