Book Review: PHP5 CMS Framework Development
PHP5 CMS Framework Development is a 322 page book that covers all aspects of creating a full featured content management system (CMS) in PHP5. The author Martin Brampton has a history of developing extensions for the Mambo and Joomla CMS projects. He became lead developer of the CMS Mambo before starting his own CMS, Aliro. The book is split up into 14 chapters. The first is an introduction to CMS and PHP5 concepts and the remaining 13 each look at a key feature of the CMS.

The book starts by defining what a content management system is and what features it needs to have. It then gives some background into the Model View Controller and Object Relational concepts as well as the Factory, Singleton, Observer and Command design patterns. If you haven’t used a CMS before and don’t know PHP5 OOP, this chapter prepares you excellently for the rest of the book.
The remaining 13 chapters each cover a feature of the framework. This includes:
- Database abstraction
- Access control, user authentication
- Framework extensions/plugins
- Caching
- Internationalization
- Error handling
- Menus
Brampton has done a great job at explaining each feature before he shows any code. This ensures someone new to content management systems will understand the feature before being bombarded with snippets of code. For example, the chapter on Menus opens by explaining what function a menu has in the context of a CMS (as opposed to a static HTML website). It then talks about how menus can be represented in code and how they can be stored efficiently in a CMS. A screenshot of the database schema is then shown and each field is explained in detail. Finally we are walked through the important methods from the menu class.
Overall I found the book to be a great learning experience. It gives a good insight into how Aliro and other content management systems work under the hood. I feel it is important to emphasis that all implementations of framework features (database abstraction, menus, plugins etc.) are shown as code take directly from the Aliro framework. The book doesn’t teach you how to implement a feature, it shows you how the feature is implemented in Aliro. I found this to be a positive because Aliro is a full featured CMS. In many other books that teach you how to build a web application, the web app that is made has an absolute minimal feature set and you don’t learn a whole lot. Because all code is taken from Aliro, no corners are cut and the detail is superb.
There are a few negative points about PHP5 CMS Framework Development. Unfortunately one comes from the fact that all code snippets are taken directly from Aliro. There are several design decisions Brampton made that now contradict modern day PHP best practice. For example Aliro uses its own style of class naming, not the Zend_Style_Names (namespaces were implemented in PHP a year after this book was published). It also makes very heavy use of singletons which depending on what developer you ask, is a bad thing. There is no chapter on testing which is surprising considering the nature of application that is being built.
If your thinking about writing your own PHP framework or large web application then I recommend you read this book. Brampton does a great job at introducing each framework feature, so even if you have no experience with content management systems, you will be able to understand what he is talking about. Just keep in mind that this book shows and explains one way of implementing a feature, and that way isn’t necessarily the best or only way.
A 2nd edition of PHP5 CMS Framework Developed his since been published.
New for this edition is a chapter discussing the transformation of URLs to turn ugly query strings into readable strings that are believed to be more “search engine friendly” and are certainly more user friendly. This topic is then extended into a review of ways to handle “friendly” URLs without going through query strings, and how to build RESTful interfaces.
The final chapter discusses the key issues that affect a wide range of specific content handlers and explores a practical example in detail. – source


