Book review: CodeIgniter 1.7 by Jose Argudo Blanco and David Upton (Packt Publishing)

Published on the 27th February, 2010

The CodeIgniter framework is a secret weapon for many web developers as it allows you to quickly build complex web applications in a structured and organised way. I started using CodeIgniter over a year ago now so I've approached Packt's CodeIgniter 1.7 by Jose Argudo Blanco and David Upson as a way of expanding upon when I've already learnt from the user guide, forums and a book which I had previously read from Wrox called Professional CodeIgniter by Thomas Myer.

CodeIgniter 1.7 book coverThis book not only introduces the CodeIgniter framework but also the MVC design pattern in general, which CodeIgniter and many other frameworks are based on. It offers a good comparison of other open source technologies, including Joomla and CakePHP. You may notice that it's odd to include Joomla in this as it's a Content Management System (CMS) and not a framework, but this is entirely the point of the comparison and I like that this is covered because if you need a CMS, use a CMS – you don't need to build one all over again. However, if you need a framework, and the chances are that you do, why you would choose CodeIgniter (and, to be fair, why you may choose to go with CakePHP instead). It's good to understand why you are going to be using a framework and what the advantages are before you get your teeth into the code, because otherwise you may not take advantage of all the features and for me this is probably one of the best reasons to read a book like this before and while learning a technology.

The book outlines that it will take you through the framework's main features and also explains what goes on “under the hood” by using practical examples and code illustrations, which you would naturally expect from this sort of book. This book is aimed at PHP developers who want to adapt to a more structured and organised way of building web applications. It states that by using CodeIgniter to build websites it will help save you time, make your site more robust, achieve more sophisticated coding and make coding fun again rather than a chore. It is aimed at developers who are new to CodeIgniter, with only a prior knowledge of PHP and HTML required (although, probably SQL too).

If I was reading this book not having used CodeIgniter before I would have found it very useful as it's very easy to follow, provides convincing arguments for the features of the framework and has plenty of practical examples throughout. However, reading it as someone who has been using CodeIgniter for a year or so it didn't add quite as much as I was hoping for in terms of new ways of doing things. That's not to say that there wasn't anything picked up from this, but probably not as much as you'd expect if you were reading the book for that reason. I would like to have seen a bit more on how to plan the building of an application as I feel this is where a book can really add more value than just learning from the user guide and forums. If you've got a complex problem to solve it's not always possible to jump straight into code – it needs to be thought through carefully to make sure you get the best possible design and to save yourself time in the long run, and by choosing to use a framework there is a level of expectation of convention and structure, not just in code but in approach also (something I was expecting to learn more about).

The database Active Record design pattern is covered in a lot of detail and this is probably one of the key reasons that you may choose to use a framework like CodeIgniter as it saves a lot of time writing complex database queries, keeps the query itself easy to understand, and it creates a level of database abstraction which is handy if your application needs to be compatible with more than one type of database management system.

Overall, the book pretty much covered everything I expected it to from explaining the MVC concept upwards. I managed to gain a few little gems and see how other people use the framework to tackle problems, although, as I mentioned before, it would have been nice to have a few tips on planning the application out. I would recommend this book to people who are starting out with CodeIgniter and have no other prior knowledge of MVC frameworks as it's very thorough and covers everything you need in a practical and enthusiastic way. If you're approaching it having used CodeIgniter for a while or another similar framework you could probably get by just fine by using the user guide and forums.

If you're interested in reading a sample chapter of this book Packt have kindly made available Chapter 3 (Navigating Your Site) to give you a taste of what it's about. There's also a full table of contents to show the complete structure of it. If you're interested in buying this book it's available directly from the Packt website for £22.49 (or $35.99) (at the time of writing this).


I was asked to write this review by Packt Publishing so I've tried to be as objective as possible and I hope that it helps you gain a good perspective of what the book is about. If you'd like to leave any comments on this review or book please feel free to drop them into the form below.

Divider

Comments