News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Bradley Holt's Blog:
Front Controller Pattern in Zend Framework
February 01, 2010 @ 12:56:13

As a part of his demo (presented at a local user group meeting) Bradley Holt, not having enough time to squeeze in all of the content he wanted, has started off a series of posts to his blog about the Zend Framework and the specific areas that make it up. His first article is about the front controller.

Like many other frameworks, Zend Framework provides an implementation of the Front Controller pattern. This means that all HTTP requests can be sent through a centralized point. This allows you to take advantage of Zend Framework's routing and Model-View-Controller (MVC) components, if you so choose.

He talks about where the Zend Framework places this controller and what their version of it contains - constant definitions, loading paths and the creation of a Zend_Application instance that's called to do the real work. He also includes a few helpful tips on common problems you might come across when setting up your application.

0 comments voice your opinion now!
zendframework frontcontroller introduction



PHP in Action:
The one-line web framework
December 16, 2008 @ 12:09:42

On the PHP in Action blog this new post talks about something that's at the core of the front controller for most frameworks - a call to a user function based on the passed in action.

The core of your average web framework is a Front Controller. Front Controllers are commonly considered complex and esoteric. That's a myth. I sometimes brag that I can construct a Front Controller in 15 minutes. Actually, it's doesn't take quite that long. In PHP, a Front Controller can be simplified to just one line of code.

This one line of code, while a very dangerous thing to actually use in an application, illustrates what a front controller does to forward out the request to the rest of the framework. He revises it with a Zend Framework-ish example that splits the request out into a controller/action method.

0 comments voice your opinion now!
web application framework action controller frontcontroller oneline


phpaddiction:
Url Routing with PHP - Part One
March 30, 2007 @ 08:12:00

The phpaddiction website has posted the first part of a series today covering URL routing with PHP (commonly used by frameworks to route requests through a centralized location.

Most PHP frameworks use some variation of the front controller pattern to centralize common code and logic. There are advantages and disadvantages to this. I am going to ignore those for now. In fact the first part of this series will explore a simple procedural URL routing method that contains many of the disadvantages. In later articles we will build upon this basis and address the disadvantages.

He walks through the steps to get things set up - working with mod_rewrite, creating the "entry point" for your application, and finally, how to execute a command based on the request's action.

1 comment voice your opinion now!
url routing framework frontcontroller modrewrite command url routing framework frontcontroller modrewrite command



Community Events









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


zendframework apache microsoft framework developer extension drupal release facebook feature version hiphop opinion codeigniter job conference podcast windows wordpress symfony

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