"PHP5 CMS Framework Development", a book written by Martin Brampton, explores how to approach the typical requirements of a PHP5-based Content Management System and underlying framework.
After contributing for a while to projects like
Joomla! and
Mambo, Martin took on the role of a lead developer of Mambo 4.6.1. The six months spent leading the project gave him a good understanding of its functionalities and limitations. Martin left Mambo (before they
announced to drop support for PHP4 last September) to write his own CMS and "evolve out of the Mambo history", by taking advantage of PHP5 OO enhancements. The result is
Aliro: a CMS, a framework and an extension project with traits and genes of the Mambo family. Aliro code is used throughout the book to support and illustrate his presentation.
The first chapter explains the system's basic needs, critical factors and how PHP5 and design patterns can be used to better address them. Only a few design patterns are used in the book, and only one is largely used (
Singleton). The chapter includes an introduction to Aliro's version of MVC.
Starting from chapter two, all chapters begin with a description of a broad requirement, followed by a framework solution to the problem. Each chapter ends with a summary. Topics addressed in the book include: authentication, lazy loading, session management, security, database access, access control, extensions, caching, menus, languages, content editing and error handling.
You will not find any direct emphasis on
SEO in this edition. Aliro does have a few Search Engine Friendly ('SEF') classes for various purposes, such as removing accents, replacing spaces with dashes, and a redirection class with status 301. A cleaning tool is suggested to produce valid XHTML. I would have liked to see a section on SEO features, since it is a feature commonly requested.
Aliro will remain loyal to the Mambo family as far as authentication is concerned and keep a whole directory (administrator) with its own classes and components, separate from the rest of the framework. The second chapter will cover encryption, storage, password generation and login.
The third chapter has the misleading title of "Organizing Code". This is not a section about code separation or standards. It basically covers the auto loading system. Although most of the code appears to follow some sort of naming convention, sometimes we find a few discrepancies with a class property or method names varying in format like sizelimit, tableName and live_site.
I found the chapter on extensions the most interesting. It discusses the hierarchy of the features that will be added to extend the CMS: modules, components, plug-ins, etc. The chapter also explains how to build the extension interface, the different ways of building them (you can still build them without classes to maintain compatibility with the Mambo family), and, finally, how to install them.
The last chapters of the book cover editing and presenting content. The storage strategy suggested for the menu items is the adjacency list (with a parent node field). Examples cover a WYSIWYG interface and a simple text application to illustrate how to build a text based web site.
If at this point you are worried that this is a book about Aliro, well it is more than just that. The book is well written and aimed to provide you with a good foundation to build your own CMS. Though in many occasions I wouldn't particularly choose the same approaches as the one selected by the author I certainly enjoyed the reading and even learnt from it.
If, for some reason, none of the more than 2000 available CMSs in the world will satisfy your particular needs, and you are up to writing your own in-house implementation - or even if you are looking into extending your current CMS - here is a book that might give you some useful ideas.