Book Image

CodeIgniter 1.7

Book Image

CodeIgniter 1.7

Overview of this book

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. 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. This book will start you from the basics, installing CodeIgniter, understanding its structure and the MVC pattern. You will also learn how to use some of the most important CodeIgniter libraries and helpers, upload it to a shared server, and take care of the most common problems. If you are new to CodeIgniter, this book will guide you from bottom to top. If you are an experienced developer or already know about CodeIgniter, here you will find ideas and code examples to compare to your own.
Table of Contents (21 chapters)
CodeIgniter 1.7
Credits
About the Authors
About the Reviewer
Preface

What CI doesn't do


There are some things that CI doesn't do. CI was intended to be a small and lightweight framework. The zipped download for version 1.7.2 is only 2.1 MB and is downloaded in seconds, whereas the Zend framework is 10 MB. It won't answer all the problems you will have. But it does:

  • Make it easy and quick to program in PHP

  • Structure your site and help you through the architectural decisions

As a result of being lightweight, it does not have as many features as some of its rivals. Other frameworks such as Rails, CakePHP, or Symfony have scaffolding and generators. These tools automatically write certain basic scripts for you.

Once you have set up a database, Rails creates out-of-the-box web pages to do basic Create, Read, Update, and Delete (CRUD) operations on the database tables. In addition, Rails allows you to write generators—pieces of code that automatically write other basic scripts. The Rails community has created quite a lot of these, so you can automatically generate scripts that do all sorts of clever things.

CI concentrates on making basic things easy. Some of the things it handles are:

  • Session management and cookies (see Chapter 6)

  • Database access and queries (see Chapter 4)

  • Building HTML stuff, like pages and forms, and validating form entries (see Chapter 5)

  • Communicating on the Internet, using FTP (Chapter 9)

Sounds familiar? All of these are basic processes, which you will have to go through if you're building a dynamic website. CI makes these processes easier, and makes your code more likely to work. Join this outstanding community; it will help you in case you need it (at the CodeIgniter forums). You can even share code at the Wiki (http://codeigniter.com/wiki/), and you will find why CI is so popular.