This 241 page book is written by David Upton, published by Packt and available in both paper and electronic versions - I’ll be reviewing the later one. This book is based on CodeIgniter 1.5.3, but should work just fine with the current version (1.6.2), as no dramatic changes were introduced up to this point.

Brief summary by chapter

The 1st chapter is pretty much for novice users, who may not be familiar with frameworks. In this chapter one will find some fundamental information about frameworks in general, followed by a brief introduction to CodeIgniter.

The 2nd chapter goes through the installation procedure, file and directory structure and some basic configuration. I feel that this chapter lacks the info on how to set up a site using mod_rewrite (without index.php part in URL) - many newcomers are asking how to do this on the official forums, over and over, yet it’s not properly documented.

The 3rd chapter contains some essential information about MVC and how that pattern is realized in CodeIngiter. This chapter explains how to use controllers and access their methods (routing basics), as well as how to use views, models, libraries and helpers.

Starting with chapter 4 the book goes into specific areas of CodeIgniter. The 4th chapter shows how to utilize CI’s Database and Active Record libraries. Here you will find how to set up a DB connection, how to manipulate the data (plenty of examples are included), as well as a full set of SQL statements for a practice DB.

The 5th chapter, primarily, focuses on views. Here you will find out how to assign data to views and then render the result in various ways, as well as how to use multiple/nested views. Also, there is a quick intro to CodeIgniter’s validation library. The most interesting thing in this chapter, in my opinion, is the custom display model, which can save you quite a bit of time and hassle.

The 6th chapter mainly covers CodeIgniter’s security aspects. Here you will find how to securely authenticate a user and process, store and pass session data.
Chapter 7 gives a quick intro to OOP, then jumps into the inner workings of the framework itself (which is OOP based, of course). Here you will find a thorough explanation of CodeIngiter’s object model. Those working in PHP5, however, should note that all objects are already passed by reference.

The 8th chapter covers error logging and handling, unit test library, benchmarking class, and profiler feature. All of the above features are extremely helpful - this chapter can save you a lot of time in tracking and squashing bugs.

Chapter 9 covers FTP, XML-RPC and Email libraries. While you are not likely to use the first two very often, the Email class will come very handy in just about any application.

Chapter 10 has an odd and rather misleading name - “How CI helps to Provide Dynamic Information” - the chapter, in fact, discusses and odd collection of features that are not much related to each other. Here you will find info about date and text helpers, HTML table class, an odd implementation of internalization (the Language class) and finally the caching feature. My guess is that the name should have been - “Simplifying work with dynamic template data” - something like that :)

Chapter 11 focuses on libraries that deal with file operations. The following features are discussed: file and download helpers, upload and file compression classes, as well as image processing library. If you want to create a web gallery or a similar application, then this chapter is for you :)

The 12th chapter discusses various issues that may occur when migrating your application to a production server. You will also find out how to upgrade CodeIgniter to a newer version, as well as extending already existing functionality of core libraries.

Chapter 13 talks about CRUD. In my own experience, CodeIgniter’s built in CRUD is not very useful. However, you may find some extensions, mentioned in the final chapter, to make this feature more useful.

The 14th chapter weighs out pros and cones. Here the author outlines where the framework was useful and where it could use some improvement. Personally, I don’t think that CodeIgniter needs an AJAX class. I do, however, think that validation and internationalization could be greatly improved and generic authorization wouldn’t hurt either.

In the final chapter, the author speaks of additional external resources, which may simplify your life even further. Essentially, there are references to forums, wiki, some video tutorials, some libraries, and some AJAX/JavaScript stuff. From myself, I’d like to add the official video tutorials (I found them most helpful), as well as the official documentation. I don’t, however, recommend any of the mentioned AJAX resources, as they use an obtrusive approach and there are much better ways of integrating JavaScript into CodeIgniter.

Conclusion

If you are an advanced CodeIgniter user, this book won’t do much for you, in my opinion. There aren’t many advanced topics, nor there are any PHP5 specific discussions. However, if you are new to CodeIgniter, then this book is definitely worth reading. Generally, it’s straightforward, but most importantly easy to digest. With this book, you will be able to quickly figure out what exactly CodeIgniter is, and how to efficiently utilize it for your projects.


3 Responses to “CodeIgniter for Rapid PHP Application development”

Leave a Reply


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>