News Feed
Jobs 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


PHPImpact Blog:
Improving the performance of Zend_Controller
July 15, 2008 @ 09:32:23

The PHP::Impact blog has a quick performance tip posted today for all of the Zend Framework-ers out there that are seeing some poor performance with their Zend_Controllers.

Zend_Controller_Front gets an instance of Zend_Controller_Router_Rewrite, routes the request, iterates through all the provided routes and matches its definitions to the current request URI. The problem with this is that the more routes you add, the more time the router will take to find a positive match.

Federico includes a few benchmarking stats to back this up ranging from four routes up to forty. His solution is to place the routes in different files and set the location with a Zend_Config_Ini object. This makes the controller only load the ones that are needed instead of pulling all forty into memory to have to parse through.

0 comments voice your opinion now!
performance zendframework zendcontroller routing route



Alexander Netkachev's Blog:
Zend_Controller classes
January 18, 2007 @ 07:06:25

On his blog today, Alexander Netkachev has charted out some of the new functionality in the latest version (0.6.0) of the Zend Framework as pertaining to improvements in the Zend_Controller.

Zend Framework 0.6.0 release comes with improvements in Zend_Controller area (new Zend_Controller_Request, Zend_Controller_Response classes, dispatch process improvements), which looks very promising. Dispatching process now better described and its parts (Zend_Controller_Router and Zend_Controller_Dispatcher) are replaceable.

He also includes a diagram of how it's all laid out and a brief description of how each of these new pieces works.

0 comments voice your opinion now!
zendframework zendcontroller component request response dispatch diagram zendframework zendcontroller component request response dispatch diagram



Community Events











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


framework database release package install language application podcast hhvm facebook opinion introduction component performance composer security symfony2 overview hack unittest

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