DerekAllard.com

Review: Codeigniter for Rapid PHP Application Development

One of the signs of an application’s popularity is when a community and books start to spring up around it.  The CodeIgniter community has never been questioned, and now it also has a book to accompany it.  CodeIgniter for Rapid PHP Application Development.  The book is written by David Upton, who has a clean, friendly style.  His writing is clear, and examples are plentiful.

I’ve got a copy, and in fact, during the early stages of the books development, I had an opportunity to do some reviewing (with Rick Ellis).  So let’s get this out of the way now shall we.  Should you buy this book?  The answer lies in where you fall in the “audience”.

This book is for developers who are new to CodeIgniter. Basic skills in PHP and MySQL are required, but only rudimentary object-oriented knowledge is required.

This is a well written book, aimed at introducing new users gently into CodeIgniter.  It does a good job of this, and if you are new to CI, and looking to fast track yourself, then I can sincerely say that reading this book is a good first start.  If you have been working with CodeIgniter and have already built something, you may find that your investment of time and money is better used elsewhere - but that said, you will pick up nice little tips, and get reminded of things no matter who you are, so the text is not a “waste” in that sense, even if you are an experienced developer.

Some of the chapters are re-hashings of the userguide, but with a few more examples.  This actually makes sense… there’s only so many ways to explain how to install CI, or how to use the form helper.  But even in these cases, examples flesh out the text nicely, and in a full chapter you are afforded a better opportunity to learn something in depth, vs the shortened userguide.

If you’re struggling with the difference between helpers, plugins, models, views and controllers, then this book is for you.  There is a great discussion of what each are, and how they fit together.  Also, most of the helpers get discussed and useful examples are given.

One area where I thought the text could offer a bit more is in integrating the various CI components.  For example, David writes a chapter discussing the file helper, upload class, image library and zip class.  Each of these items is explained nicely, and the chapter is a great introduction to the concepts, but he stops short of discussing how these could all be integrated together.  There is no example of uploading an image, browsing to it, resizing it and offering it to the user as a zipped download.  That said, I think this was a specific choice - the book is aimed at new users, and insofar as explaining what these parts of the framework are, and how to use them, it does a great job.  It might have just been too complicated for the audience to put it all together.  Also, to be fair, he does do chapter at the end called “Putting it All Together” where Active Record, the Form Helper, and unit testing are all used.

But where the book is good, it is great, and there are a few gems in there.  David encourages building your own Controller and building your app off this.  This is an approach that I don’t see used very much, but offers great flexibility and power.  The chapter on unit testing, benchmarking and profiling is awesome.  He takes an admittedly boring topic, explains the usefulness of it, then offers nice tips on setting up.  This chapter in my opinion should be the first thing you read after you’ve built your first “hello world” application.  Great stuff in there.

He also offers discussion on a few things that can’t be found in the userguide.  For example, “should I update if a new CI version comes out?” is explicitly asked, and he offers his advice (you want his advice, then buy the book ;)).

There’s also a useful discussion of the CI community and community resources, including the forum, the videos, and some of the popular third party CI addons.

The book ends with a chapter called “The Verdict on CI”, in which David reviews where you’ve been, and where to go from here.  So I’m going to end this blog post with…

The Verdict on CodeIgniter for Rapid PHP Application Development

If you’re new to CodeIgniter, and looking to get started working with CI quickly, then go grab the book.  It is like packing the experience of building your first application into a text, and it will save you many hours of “learning the hard way”.  This is where the book really excels in my opinion – getting new users up and running quickly.  You learn from the experience of someone else.

If you’re an experienced CodeIgniter author, the text will feel largely familiar to you, and you aren’t the target audience – but if you’ve got $35, its a small investment to make to improve your work. It’s a useful read, and you may be reminded of things you’ve forgotten, or get inspired for new ways to tackle things.

 

Comments

James wrote on

In all honest, given the excellence of the CI User Guide, coupled with some great tutorials i fail to see what this book can offer anyone.

Anyone looking to use CI should be savvy enough with php/mySql to not need such a basic book and anyone who isnt savvy enough should be learning the basics of php first instead of trying to dive into a framework.

John wrote on

I like something I can take with me to the park at lunch. I ordered the book, since I am switching back to php after a year or so on rails. CI is very similar, but I still like something in print.

Rob Riggen wrote on

I’m an experienced PHP programmer.  I’m not new to MVC development but I like having a book so I can step away from the screen once in a while and I always find good tidbits that I can use.  I just ordered the book and am looking forward to reading it.

Miguel wrote on

I’ve got the book last week for reviewing, for the portuguese community, i’m an expirenced PHP programmer, and i’m using CI for some time now. the book is basic and i think that was intent for the CI newbies, aldo it has some interesting things even for someone that have worked with CI. Our way in not allways the best way, so its coll to se how other people use diferent aproaches to the same problem. I think the book is good, and its worth it to read. Very cool, well explained and interesting to read.