Professional CodeIgniter

(singke) #1



Here ’ s what this book is not about: It ’ s not a book on visual design. You might openly guffaw at my
creative sensibilities. That ’ s fine, laugh away; just make sure you absorb the information presented in
these pages and apply them to your own spectacular designs. This is also not a book on CSS, but it does
contain some CSS in it. Furthermore, it is not a book on SQL design, but it does have SQL in it — you ’ ll
need it in order to create your tables.

At almost every turn in writing the book, as in my consulting practice, when it came down to a decision
between discussing theory or getting things done, I opted for the latter. For me, getting something done
is better than talking about all the possibilities. Some might fault me for it, but that ’ s just the way I roll.

How This Book Is Structured

The first three chapters of this book introduce you to CodeIgniter, the Agile way, and to how you ’ ll be
working with Models, Views, and Controllers. Chapters 4 through 8 show you how to take the basic
knowledge of CodeIgniter to build public - facing web sites, administrative screens, and much, much
more. Chapters 9 and 10 cover security, performance, and some last - minute additions that lead to a
successful launch of the site.

Throughout the book, you ’ ll note that I keep coming back to certain themes in iterative cycles. For
example, I keep returning to the theme of security — either because I ’ m putting in just enough security
for the moment or because it really is time to slow down enough to do something substantial.

Iteration is at the heart of my working style, and I see a lot of my colleagues turning to this approach in
their own work. I ’ ve learned over the years that it is impossible to predict every single nook and cranny of
the customer ’ s mental model of what the project should look like when it ’ s all done. In fact, I ’ ve stopped
trying. I ask my questions, I build my applications, and then I allow enough space for the client to play too.

I know from experience that most people are incapable of knowing what they want until they see it in
front of them. This is doubly true for something as intangible as software. Does this mean that I throw all
caution to the winds and just create things in a vacuum? Of course not — you always start with a client
meeting and extract client requirements. There ’ s almost always time to polish and iterate.

You ’ ll also notice that I ’ m not afraid to say, “ This is good enough for now, ” and move on to the next
topic. Why? Because in real life, it ’ s often pointless to harp on certain details until the customer has seen
it and gives you a reaction. At other times, it is equally useless to let something go, when you know
exactly what needs to be done and can ’ t rely on the customer to make that call for you. True wisdom for
the developer comes in knowing which way to go.

What You Need to Use This Book

First and foremost, you need a server that can run PHP 4 or 5 (CodeIgniter works with both) and
MySQL 4+. You can set up your own development server with WAMP or MAMP, depending on your
platform. You also need a good copy of CodeIgniter (available at ).

Furthermore, you need to have some familiarity with HTML, CSS, SQL, and JavaScript. I ’ ve kept the
JavaScript down to a minimum, and most of it involves the Scriptaculous framework, and that ’ s for a
good reason: I consider myself to be primarily a back - end developer, and I focus more on those sorts of
processes than JavaScript.

flast.indd xviiiflast.indd xviii 6/10/08 5:39:53 PM6/10/08 5:39:53 PM

Free download pdf