Federico Cargnelutti has posted the third part of his series looking at his alternative to the normal Zend_Controller in Zend Framework applications - Zf_Controller. This article focuses on its interface with the model.

The domain layer is separated from the other layers and has no dependencies on Zf_Controller. Adding the domain directory to your include path allows you to load and access Model classes from anywhere within your project.

His code examples show an IndexController extending the Zf_Controller and how a Model can be called from inside it through a getInstance (as long as the model directory is in your path). You can take a look at part one and part two for more information on this alternative component.

Here’s the good news: Zf_Controller doesn’t have a Router. It uses a very simple mapping to determine the name of the controller and action.

He gives an example of the "non-routing" and how to work with the input variables for the controller instance - defining default values and setting requirements for them (as defined by matching a regular expression).

Federico Cargnelutti has made a new post about an alternative Zend Framework developers can user instead of the normal Zend_Controller - his Zf_Controller.

Zend Framework is very flexible and one of its strengths is that it allows developers to implement their own components. The Zend_Controller component, for example, is very powerful. Of course, itâ€™s not my intention to replace it, but to offer an alternative that decreases the number of decisions a developer needs to make when developing an application. Meet Zf_Controller.

His controller allows for better backwards compatibility, better performance, removes the need for circular references and drops the need for Singleton classes. He includes an example of the updated directory structure the class would use, a bootstrap comparing with/without the new class and the rest of the scripts needed for a sample application (view, layout, error controller, etc).