Web Publishing Group

October 27, 2006

Cool PHP Frameworks

Filed under: Web Development, Web Tools — Dan Romanchik @ 10:07 am

While PHP has enabled even the most novice programmer to build Web applications, the result is often poorly-coded websites that are a bear to maintain. I should know. I’ve worked on this kind of project myself.

The problem is that building a proper software infrastructure for each project is a time-consuming process, and the cost of doing this is prohibitive. Enter PHP frameworks. Frameworks aim to provide this infrastructure, allowing developers to focus on the application code and not the underlying code that makes it all work.

The way they do this is by using the MVC (Model-View-Controller) architecture. Models are representations of your data structure, i.e. how your data is stored in the database. Views are template files that tell the framework how to display the data. Controllers are the code that retrieve and modify the data in your database and cause data to be displayed in a view.

There are many different PHP frameworks, but I’m only going to discuss two here:

  1. Cake. Cake is perhaps the most widely-used PHP framework to this point. This framework has been in development for quite a while and the website has quite a bit of information to get you started. The Cake Showcase lists many websites—some of them quite complex—that use the Cake framework.
  2. MODx. The MODx website describes this software as “equal parts custom web app builder and content management system. It lists a couple of features that I think might make it more useful for the application that I have in mind—a trade magazine website. These are:
    • Rich text editors, which should make it easier to add articles and other content.
    • Custom content types, which the website says allows you to transform your content into XML, PDF, and other formats. I can envision using this feature to offer RSS feeds.

Both say they support AJAX, another requirement for this project.

I’m a bit concerned about the learning curve associated with basing this project on an application framework, but if I can use this approach in the future, then I should be ahead of the game. We’ll see.

Powered by WordPress