October 22, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Top 10 Lightweight Frameworks for PHP Development

  • April 23, 2010
  • By Jason Gilmore
  • Send Email »
  • More Articles »

Using a framework makes the development process faster, more secure, and more enjoyable. However, a developer who uses a major framework, such as the Zend Framework, Ruby on Rails, and Grails, must invest time in order to understand the particular approach embraced by each solution. Additionally, they come with a number of bells and whistles that may never be required in many of your projects.

The Rails community recognized this quandary early on, creating alternative solutions such as Camping and Sinatra, which continued to embrace the framework approach, yet minimized both the resource requirements and time investment. Although often referred to as lightweight frameworks, in reality such solutions are quite capable of implementing a great many projects that would have otherwise been built using Rails, which might have been overkill for smaller, less-complex projects.

Recently, the lightweight framework movement has been catching on within the PHP community, with a great many lightweight frameworks beginning to gain followings. In this article I'll introduce the 10 best examples I've found of these solutions. They should at least serve as a jumping-off point for doing further investigation.

1. DooPHP

Although all of the lightweight frameworks attempt to position themselves as the fastest and least intrusive, perhaps no other does so more explicitly than DooPHP. Presenting a series of benchmarks that claim to lay waste to high-profile frameworks such as CakePHP and CodeIgniter, the DooPHP website identifies the framework as being "the fastest MVC-based PHP framework," while still managing to offer an impressive array of features including authentication and authorization, front- and back-end caching, and a RESTful API.

The DooPHP website offers a fair amount of documentation, including tutorials and an API reference, in addition to several demo applications.

2. Fat-Free

The PHP Fat-Free Framework is the only one on my list that was built specifically to take advantage of PHP 5.3-specific features. Weighing in at just 42kb, it's also the smallest, a feat accomplished by bundling features into three separate modules, or "packs." The Core Pack contains the minimal set of features required to construct a website, including a router, HTML forms processor, template engine, and development tools such as a code profiler and unit testing suite. An optional Database Pack adds database interaction capabilities via the Fat-Free Axon ORM. Finally, an optional Expansion Pack bundles together a number of useful extensions, including a CAPTCHA generator, thumbnail generator, sitemap generator, and other useful features.

3. Kohana

Kohana began life as a fork of the popular CodeIgniter framework. However, the 2.0 release was a complete rewrite of the codebase, which exclusively supported PHP 5. In addition to the strict support for PHP 5, Kohana differentiates itself by advertising easy extensibility, a rapid development cycle, API consistency, and an intuitive ORM interface. Further, a module ecosystem has begun to flourish, with almost 60 projects currently available on the site. Interestingly, several projects are ports of components found in the Zend Framework, such as the Zend ACL project.

4. Limonade

The Limonade website names the aforementioned Camping and Sinatra frameworks as sources of inspiration. It's perhaps the most compact of the solutions described here in terms of the amount of code required to build something useful, with powerful demos such as the Wikir wiki (written in under 200 lines of code). But perhaps the most powerful evidence of Limonade's minimalistic approach is the example included with the project README, which includes all of the code necessary to power a one-page website:

require_once 'lib/limonade.php';
    dispatch('/', 'hello');
        function hello()
        {
            return 'Hello world!';
        }
    run();

Minimalistic indeed!

5. Recess

Apparently the Recess developers and I went to different elementary schools, as my recollection of recess resembles something more akin to a scene from "Lord of the Flies" than the fun and delightful experience that apparently prompted their namesake framework. Either way, the developers have clearly worked hard to make the Recess user experience a fun one from the beginning, starting with a well-designed website consisting of well-written documentation and a number of tutorial-based screencasts.

In addition to supporting standard features such as REST, ORM, and custom routes, Recess offers a number of unique features such as modular support similar to that found in Django, in addition to diagnostics and a GUI-based wizard named Recess Tools that helps new users easily build their first Recess-powered application.


Tags: PHP, framework



Page 1 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel