CodeIgniter 1.7 Packt Publishing – Book review part 2

Citește postarea în română

Share on:

1847199488

CodeIgniter is an open-source PHP framework build for RAD.
The book CodeIgniter 1.7 from PacktPublishing, written by  Jose Argudo Blanco and David Upton is trying to build an overall image of of the CodeIgniter framework,  as an addintion to the user guide.

The book is not a reference, and that becomes obvious with every chapter, each time a new feature of the CodeIgniter framework is introduced the user is directed to the corresponding page of the module in the user guide or wiki. Even more, suggestions are made for alternative modules that can achieve a similar task in a different way.

Authors say that only minimal knowledge of PHP is necessary to read this book, a promise that is hard to keep in my opinion, usually books that target novice to medium skill readers are saying something like that. To my surprise they ware right, the reader only needs PHP4 knowledge. And when it comes to OOP not even PHP5 features are required, just the PHP4 object model. In this book even the copping objects by reference is described! Of course copping objects by reference is no longer a relevant issue with PHP5, but taking this in to consideration that is an PHP4 framework it was a good idea to mention and explain it. It seems like there are still PHP4 server on the Internet… that is just sad…

Reading the book flashbacks came to my mind with pieces of code written directly in PHP and the hell of debugging them, trying to understand other peoples code… what times… horribly of course. The reasoning behind this concepts of re usability in a framework is just  great: “Possibly you like typing regex. Some people like lying on a bed of nails…”. When a developer, especially a beginner, is reading something like this it makes him understand that you don’t have to reinvent the wheel each time, but just use solutions already developed by others.

Comparing between different available solutions I believe is the most funny part of a book like this. Is difficult or even impossible to compare for instance Zend Framework or even CakePHP with CodeIgniter. After all almost all frameworks say the same thing, just download and start working. Personally when I need to use a module from Zend Framework I just load the autoloader and get to work. The comparison shows CodeIgniter as a winner for most users, as expected, the reasoning behind that claim is pretty honest.  Afterall is a small framework and does not have complex features like autogenerating CRUD. I remember a Java book where the author was representing the fact that C++ is faster then Java as a disadvantage, of course was just silly.

I sometimes had the impression that the terms were wrongly defined. The authors are using “small” mistakes in terms to explain what’s actually happening in the background. When you are working with MVC frameworks some of the notions are simple and obvious, but for a developer that’s not familiar with that terms there are quite hard to comprehend.

And to continue with the mistakes in the book, I’ve found a few. Quite a difficult moment when you start learning something new. Fortunately there are quite obvious because they result in errors, and if you read chapter after chapter you’ll know what the issue is and how to fix it.

Examples are pretty consistent and well documented. When a new concept or module is introduced it is fully explained in detail.

The resulting apps are not very complex, for instance at the end of the book there isn’t a full complex app like a CMS, rather modules and the way there are combined is explained. The user will have to decide in the end how will his app look and feel. For instance in chapter 13 pagination and ordering is explained. When pagination is used everything is OK, but when ordering is introduced the pagination begin to slip. It took me about 5-10 minutes to fix the issue, but it would have been nice for the authors to fix the issue themselves.

Overall is a good book, especially for users that have no prior knowledge of CodeIgniter, is just like is presented by the authors, a book for developers that want more productivity in there work or just what to see what other tools are out there.  The book does not present full solutions like a CMS or a shopping cart, but rather what this framework has to offer.

An advanced developer can understand from this book the structure of the CodeIgniter framework, possibly to compare it to other popular frameworks, without loosing time with complex and irrelevant examples.