A while ago packt sent me another book to review – this time it was “Code Igniter for Rapid PHP Application Development” by David Upton.
Similar in size to the PEAR Installer Manifesto, this book weighs in at 240 pages, is aimed at developers new to CodeIgniter, and is split into 15 chapters:
- Introduction to CodeIgniter
- Two Minute’s Work: Setting up a CodeIgniter Site
- Navigating your site
- Using CI to Simplify Databases
- Simplifying HTML Pages and Forms
- Simplifying Sessions and Security
- CodeIgniter and Objects
- Using CI to Test Code
- Using CI to Communicate
- How CI Helps to Provide Dynamic Information
- Using CI to Handle Files and Images
- Production Versions, Updates, and Big Decisions
- Instant CRUD – or putting it all together
- The Verdict On CI
- Resources and Extensions
Chapter one is a bare-bones introduction to what CodeIgniter is and why it was initially developed.
Chapter two details how to set up an initial site with CodeIgniter.
Chapter three introduces the reader to the concept of the MVC pattern, what it is about and how CodeIgniter implements it.
Chapter four details the ActiveRecord class for interacting with databases.
Chapter five shows the reader how to specify a View, how to nest them for better reuse and demonstrates CodeIgniter’s Validation class.
Chapter six is about session management and securing applications.
Chapter seven, if the reader requires a refresher, explains Object Oriented Programming and through some examples shows that CodeIgniter does not take advantage of PHP5′s enhancements in that regard. It also looks at the object model in CodeIgniter.
Chapter eight details how to perform unit tests, benchmarking, profiling and how to use mock database objects for test purposes.
Chapter nine is about various machine-to-machine communications: FTP, mail and using xml-rpc for providing webservices.
Chapter ten focuses on internationalization, caching and string manipulation.
Chapter eleven is about file uploads, downloads, compression and image manipulation.
Chapter twelve discusses various topics relevant to migrating your code from your development servers to production.
Chapter thirteen details CRUD operations in CodeIgniter.
Chapter fourteen takes an objective look at what the book has covered as regards CodeIgniter’s abilities and what the author chose to not cover – one admitted omission is a lack of focus on AJAX.
Chapter fifteen, the last one, provides a list of resources and extensions that the dear reader will want to investigate. These include, but are not limited to, graphing and AJAX classes, methods of authentication and CRUD libraries.
The book is written well and the inevitable – yet thankfully small – number of spelling and grammar mistakes in the books don’t detract from the book as much as in the SOA one. I got the impression while reading chapter eleven that the author is not particularly knowledgeable about file permissions on linux/unix and specifies the most permissive options for those platforms which is a bit worrying.
I was amused to find the book “PHP Programming with PEAR” gets a mention in the “Resources and Extensions” chapter, more so because CodeIgniter seems to be a framework that has a chronic case of “Not-Invented-Here” syndrome and attacks the PEAR framework on the main page of it’s website and userguide.
All in all, I found the book to be a straight-forward, educational read and that it works very well alongside the CodeIgniter online documentation.
Well worth the read if you are new to CodeIgniter.
Addendum: Kae asked if reading this book might make me inclined to use CodeIgniter; while I found it very interesting I was also shocked that there is no inclination of embracing and utilising PHP5 enhancements and the chronic NIH present in the framework makes me feel very reluctant to use CodeIgniter. There is a spin-off or fork of CodeIgniter called Kohana that takes advantage of PHP5. It may well be worth investigating.