News Feed
Sections




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

Gonzalo Ayuso's Blog:
Building a small microframework with PHP
August 23, 2011 @ 09:48:27

In investigating microframeworks and some of the offerings out there Gonzalo Ayuso has done a little exploring of his own. He's worked up a basic microframework and shared it in a new post as a sort of academic exercise.

Nowadays microframewors are very popular. Since Blake Mizerany created Sinatra (Ruby), we have a lot of Sinatra clones in PHP world. Probably the most famous (and a really good one) is Silex. But we also have several ones, such as Limonade, GluePHP and Slim. Those frameworks are similar.

He looks at how several of these frameworks handle routing and setup, mostly using the closures/anonymous function callbacks available in PHP 5.3. His simple example framework does some basic URI handling to find the requested module, class and function (action) to call. You can even define the output format from options like json, txt, css, js and jsonp. A sample "controller" is included with a "Hello world" and there's a mention of some other options he's exploring including Twig and Assetic integration.

2 comments voice your opinion now!
microframework exercise routing callback anonymous function


blog comments powered by Disqus

Similar Posts

Devis Lucato's Blog: Anonymous objects in PHP - Composition, Mocks, Refactoring

Joshua Thijssen: Internal PHP function usage: revisited

Gonzalo Ayuso's Blog: Building a small microframework with PHP (Part 2). Command line interface

Brendon's Blog: 10 PHP functions you (probably) never use

Ilia Alshanetsky's Blog: Filter Extension Revamped (and PHP 5.2 news)


Community Events





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


list zendserver release introduction symfony laravel api development framework bugfix conference series podcast deployment language tips community code interview threedevsandamaybe

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