O'Reilly logo

Professional CodeIgniter® by Thomas Myer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Welcome to the MVC World

This book is about CodeIgniter and the world of Model-View-Controller (MVC) web development. Before venturing into the topic of CodeIgniter, it's helpful to put it into some kind of context. However, most programmers who are new to the world of MVC web development find some of the concepts hard to grasp at first — they've been so engrained in the old way of doing things that unlearning is difficult at first.

So even before you can learn anything about CodeIgniter or even MVC, it's probably helpful to start the discussion with something you already know and understand, and then move on from there. Therefore, that's where this book begins: with a description of a prototypical PHP project, most likely very similar to anyone's very first PHP project.

Many PHP programmers learn PHP either as their first language (having only been exposed to XHTML and CSS beforehand) or after learning another similar language (such as Perl). Most of the time, a PHP programmer's first few projects involve a pretty steep learning curve, but eventually the programmer finds a comfortable groove. He ends up with a project consisting of the following components:

  • A series of PHP pages with intermingled PHP commands, SQL queries, and XHTML

  • A series of JavaScript and CSS files that are linked from those PHP pages

  • A series of universal includes — a footer file for all pages and a header file that contain the database connection and session initialization code

  • A handful of database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required