Posted by & filed under PHP.

Back when I was teaching a PHP/MySQL meetup, I wanted to get my members to use a PHP MVC framework, one that had new PHP 5.3 features at the time (such as namespacing), as well as other good PHP 5 features (like autoloading). The framework had to be so easy to use that the codebase could be explained in an hour presentation. The framework also had to use zero “magic”, and work with IDE features to provide code completion out of the box.

Existing frameworks, such as CodeIgniter, were easy to use, but taught bad/outdated PHP practices. Other frameworks like Zend or Kohana had nice autoloading and code completion support, but would be hard to teach.

My solution was to build a framework from scratch, SleekMVC.

One of the drawbacks which prevented the framework from being useful for major projects was a lack of a routing class. Routing classes (which every popular PHP MVC framework come with) allow a translation between the requested URL and the code to be executed (namely Controller classes, their Action method, and arguments stripped from the URL).

I’m glad to say this feature has finally been added to SleekMVC. While it still needs to be rigorously tested, you can start using SleekMVC for more complex projects. It’s a great way for¬†beginner¬†PHP developers to get familiar with some of PHP’s coolest features, and to keep your projects organized into a nice directory structure.

Leave a Reply

Your email address will not be published. Required fields are marked *