<ac:macro ac:name="note"><ac:parameter ac:name="title">Please go to the new MVC Changes page</ac:parameter><ac:rich-text-body>
<p>This proposal is no longer being worked on. Instead direct your attention to the official proposal from Zend:</p>
<h3><a class="external-link" href="http://framework.zend.com/wiki/x/kxM">http://framework.zend.com/wiki/x/kxM</a></h3></ac:rich-text-body></ac:macro>
This proposal is a combination of several changes to the MVC architecture in ZF:
introduction of a Request object which acts a common layer of communication between the bootstrap, Router, FrontController, and ActionController. It is designed in a way to pull data from any source and provide it via a common interface to the MVC components. Currently in this proposal the Zend_Http_Request object provides input from PATH_INFO, GET, and POST data.
removal of the DispatchToken. Its functionality is now contained in the Request object.
removal of Router-dependant code from the FrontController::dispatch() method. The router is now an optional component that is handled in the bootstrap or in a convenience method such as ::run()
removal of URL-related functions from the Router. This is now handled by the Request object.
added support for ActionControllers in subdirectories
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
5. Theory of Operation
6. Milestones / Tasks
7. Class Index
Zend_Request_Interface is a common generic interface that the Router, FrontController, Dispatcher, and ActionController use to to talk to each other. It is designed to interface with any type of input source.
Zend_Http_Request builds on top of the Zend_Request_Interface. It contains functions to pull any data from the browser and provide it to the MVC components.
Some features include:
determines important variables on any platform with or without mod_rewrite such as REQUEST_URI and PATH_INFO
getParam() automatically falls back to GET/POST variables if a Router is not used or user-defined vars are not set
aliases allow you to call your controllers and actions something other than 'controller' and 'action'. This allows for a central location to configure these settings.
Zend_Cli_Request (not created yet) is meant to pull any input from the command-line (args) or keyboard (stdin) and provide it to the MVC components through the Zend_Controller_Request_Interface. This is an example of how the proposed MVC changes allow for much more flexibility by not limiting them to HTTP-specific functionality.
Zend_Router_Rewrite (evolution of the RewriteRouter, for mapping PATH_INFO to a controller/action)
Zend_Router_CliParam (not created yet) would allow you to map command-line parameters or keyboard input to an action/controller. For example, automatic processing of parameters in the GNU "--paramname=value" format, "-f filename", "/C zend", etc...
8. Use Cases
This is perhaps how an intermediate / advanced user would use it:
And this would be the beginner approach:
9. Class Skeletons
Download the working prototype here: [Zend_Db_Adapter_Odbtp_Mssql^mvc_working_prototype.zip]