News Feed
Sections




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

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


blog comments powered by Disqus

Similar Posts

Dan Horrigan's Blog: Security in FuelPHP

Paul Jones: Publish Your Failures; or, The Way Of All Frameworks

IBM developerWorks: Locking down your PHP applications

Sanisoft Blog: Radio button issues while migrating from cakePHP-1.2alpha app to 1.2prebeta

Padraic Brady's Blog: An Example Zend Framework Blog Application - Part 1: Introductory Planning


Community Events

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


interview symfony2 release podcast library configure language example opinion voicesoftheelephpant framework introduction application api php7 series conference performance laravel community

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