After having stumbled upon the CodeIgniter framework, I fell quickly in love with it.
Following the 2 video tutorials gets you quickly up and running on the very basics and with only those two and the user guide I was able to already write my own, first, small and simple application: a dynamically generated table which list hyperlinked names and locations and clicking on a name opens a popup with more information, such as directions and phone number. The table was sorted by state and a flag allowed turning address lines on or off.
As I really wanted to dig deep into this framework and felt I needed more basics to understand the concept of models and libraries and classes and whatnot, I went on a hunt for a good book on the subject. I only found two.
Professional CodeIgniter did not have too many raving reviews on Amazon and seemed to heavily talk about Agile technologies, something I was not looking for in this instance, I wanted full concentration on CodeIgniter.
CodeIgniter for Rapid PHP Application Development seemed to be geared exactly towards what i was looking for. Explaining the basics and showing how to implement in smaller websites, using forms and so on. The reviews overall on Amazon were promising and even though I was absolutely aware that the book is already somewhat outdated due to the progress on CodeIgniter since, it appeared to be perfect to build some good grounding foundation.
Working with the book has me very disappointed. Only a few code tidbits could be downloaded from the site. Even though I usually write my code, also during tutorials for good practice, it is good to be able to fall back on a working file if one gets lost. Nothing the like here. The Errata sheet was really short and I thought ‘great’ – but unfortunately far from the truth.
This book is riddled with typos and coding errors. Basic coding errors, such as on page 38 when the author writes how to create 2 lines in the header of HTML files:
<base href=<?php echo "$base"; ?> >
<link rel="stylesheet" type="text/css" href="<?php echo "$base/$css"; ?>">
Did you see all the errors in these 2 lines alone? Instead of quoting the whole php string for the base tag, he makes a string out of the $base variable. Then he also does not /> the tag. On the next line he remembers to put the php tag into double quotes but on top of it puts double quotes again around the variables. It’s basic, basic what happens if you put the same type of quotes within each other. The tag itself again has not been self-closed. But worse, he uses the $base variable in the style sheet link when it is no longer needed as only one line above he just set the $base url and in the book explains the purpose of it.
Hello, does nobody cross-check books anymore? This is supposed to help beginners but if one has to debug each step only to figure out that the writer has some missing semi-colon or forgotten to put single quotes around a string, or the opposite, put quotes around a variable and so on… this is pretty pathetic.
Currently I am in the middle of debugging some supplied code – the authors “display” model – errors such as non-closed comment block in the middle of code plus wading through the many question marks why things which he had put into the controller before are now suddenly in the model and trying to get everything sorted out and aligned. This is in the middle of Chapter 5 – out of 13 – and by now I have wasted so much time getting the code to work and to sift through this sloppily produced book – all interest in this book has completely dwindled.
At this point I think you are better off reading thoroughly through the User Guide and go from there.