Book Image

CodeIgniter for Rapid PHP Application Development

By : David Upton
Book Image

CodeIgniter for Rapid PHP Application Development

By: David Upton

Overview of this book

<p>CodeIgniter (CI) is a powerful open-source PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. CodeIgniter is an MVC framework, similar in some ways to the Rails framework for Ruby, and is designed to enable, not overwhelm.<br /><br />This book explains how to work with CodeIgniter in a clear logical way. It is not a detailed guide to the syntax of CodeIgniter, but makes an ideal complement to the existing online CodeIgniter user guide, helping you grasp the bigger picture and bringing together many ideas to get your application development started as smoothly as possible.</p>
Table of Contents (21 chapters)
CodeIgniter for Rapid PHP Application Development
Credits
About the Author
About the Reviewers
Preface
Index

Summary


The MVC framework is a widely used and very effective way of organizing a complex website. CI uses it to help you sort out your own code, but it is also fairly flexible about how it does so.

Try to keep in mind the two principles of 'loose coupling' and 'component singularity' when you write your own code. Don't worry too much whether your application conforms to the strict theory of MVC or not. The crucial thing is to understand what the different types of file are, and how they relate to each other. Then, you can decide whether to write your own code in library or model files, or as helpers or plug-ins.

We've looked at the CI file structure, and seen how you can, if you want, inspect all the CI code, but (thankfully!) you don't have to.

We did tinker with one of the original files: the config file, which holds critical site information in one place to make it easier for us to upgrade or change later on.

We've seen the basic object structure of a controller, and used a simple constructor...