I wrote recently about a new book from Packt Publishing covering the CodeIgniter PHP framework that I’ve used in a number of my personal projects. I’ve now had time to read through the book, and this is what I found.

CodeIgniter 1.7, written by Jose Argudo and David Upton, aims to help you “improve your PHP coding productivity with [...] the powerful and popular CodeIgniter framework” and is designed as a companion to the excellent user guide that ships with CodeIgniter itself. It is aimed at both newcomers and more experienced developers alike. Books on CodeIgniter are thin on the ground, so as a long time CodeIgniter user (and fan, I’ll admit) I jumped at the invitation to review this new book shortly after its publication.
I’ve been using CodeIgniter in many of my personal and freelance projects for a number of years. I chose CodeIgniter over other PHP Model-View-Controller (MVC) structured frameworks initially for its lightweight approach, where the framework provides a basic skeleton for the developer to build an application on and then gets out of the way. This simplicity means that learning to use CodeIgniter is relatively easy compared to, say, CakePHP or the Zend Framework, but is balanced against the extent of the functionality that the framework provides.
But if the framework is so easy to pick up and the supplied documentation is of a high standard, who needs a book? If you’ve never developed an MVC patterned web application before and are about to attempt one based on CodeIgniter, then you do.
The book starts with a comparison of CodeIgniter with CakePHP and Joomla!. I see what the authors were trying to achieve here, comparing the lightweight CodeIgniter with a more popular and feature heavy framework and again with a full content management system, but this chapter comes across as clumsy and a little confusing. I also would have liked to have seen other popular PHP frameworks such as Symfony or Zend included in the comparison, or at least mentioned in passing.
The meat of the book begins by covering the very basics of downloading CodeIgniter, walking through it’s directory structure and then getting a “Hello World” application up and running on your development environment. Further fundamental topics are then addressed such as accessing databases, creating controllers and views and using sessions, before upping the pace and moving on to more advanced material on caching, file handling, creating your own CodeIgniter extensions, internationalisation of applications and even using XML-RPC remoting. There’s also a useful chapter on moving your development site on a live server, something that always causes problems even if you’ve done it before. A summary of the framework and a list of external resources wrap up the contents list.
Each chapter is written in a relaxed, personal and conversational style that’s easy to follow, and there are plenty of well explained code examples. The style works well enough but I think an extra editing pass would have been of enormous benefit, to pick up on spelling mistakes and more than occasional awkward phrasing. This omission is unfortunate as it gives a bad impression of a book that’s actually quite good technically. Much effort is made to underline good, sensible development practices and highlight the benefits of building web applications using the MVC pattern. There’s nothing on source control or testing of your web applications though, which I thought would have been obvious subjects to cover.
CodeIgniter 1.7 on it’s own won’t teach you how to develop web applications using CodeIgniter but, by working through the book and cross referencing with the CodeIgniter user guide for further and more detailed information on the classes and functions touched upon in the text, I think you could progress a long way very quickly. The user guide is good as a reference source, but I recall that when I was starting out I would have welcomed some material that gave a “bigger picture” view of the framework and acted as a tutorial and best practice guide. CodeIgniter 1.7, I think, gives this high level view that I was missing.
However, I’m not sure how much experienced CodeIgniter developers would gain from reading this book. Reading it, I found myself skipping through a lot of the text as obvious, for example. There is still good advice to be found in the later chapters if you persevere, and they are more densely packed than the introductory ones, but I’m not quite sure this material alone would be reason enough to convince me to buy the book.
Without hesitation I’d recommend CodeIgniter 1.7 to anyone with some existing PHP knowledge who is starting out building web applications with the CodeIgniter framework. If you’ve been around the CodeIgniter block a few times, have a think about it first.
CodeIgniter 1.7 is available now in printed and eBook format. A sample chapter is available (PDF), as well as the full table of contents. Find out more from the official Packt Publishing website.
Disclosure: I have no association with Packt Publishing other than they contacted me to ask if I would review this book. I was provided with both a paper and electronic copy of the book for review purposes with no obligation. No other payment or payment in kind was offered or requested.


Interesting dissection John. I would love to hear a breakdown of the differences between Cake, which I use in the day job, and CI, which I have *never* used….