News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Federico Cargnelutti's Blog:
An Alternative to Zend_Controller The Model
April 14, 2009 @ 08:48:46

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.

0 comments voice your opinion now!
zfcontroller zendcontroller model interface getinstance includepath


Federico Cargnelutti's Blog:
An Alternative to Zend_Controller The Router
April 09, 2009 @ 08:44:44

Federico has continued his look at his alternative to the Zend_Controller component of the Zend Framework - Zf_Controller in this new part of the series focusing on routing.

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).

You can read more about the first part of the series here.

0 comments voice your opinion now!
zendcontroller zendframework alternative router variable zfcontroller


Federico Cargnelutti's Blog:
An Alternative to Zend_Controller Introduction
April 08, 2009 @ 13:43:47

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).

0 comments voice your opinion now!
zendcontroller zendframework alternative zfcontroller



Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant artisanfiles introduction opinion podcast version community framework symfony interview laravel language list library composer series conference release tool security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework