Professional CodeIgniter

(singke) #1

Chapter 3: A 10,000 - Foot View of CodeIgniter


75


Conclusion


The goal of this chapter is to walk you through the initial setup of CodeIgniter, explaining the key
features that require your attention during configuration. As you continue working with CodeIgniter,
keep the following points in mind:

CodeIgniter files can be divided into main areas, to wit: a core that you shouldn ’ t mess with,
and everything else.

If you have any doubts, the “ everything else ” usually resides within the /system/application/
folder. Just about anything you do to the files in this folder won ’ t cause serious problems (unless
of course, you have bugs in your own code!).

If you absolutely must extend the core, do so with hooks and custom libraries placed safely
within the confines of the /system/application/ folder. However, most of the time, you ’ ll find
that the CodeIgniter developers have provided you with most of what you need to get the
job done.

Certain configuration settings accomplish the basics that give you the peace of mind you need.
For example, properly configuring your database settings (in /system/application/config/
database.php) and autoload preferences (/system/application/config/autoload.php) will make
your work go a lot more smoothly.

You ’ ll use certain libraries and helpers (particularly those dealing with databases, sessions,
URLs, and forms) over and over again — having a good working knowledge of them will save
you a great deal of time and energy.

Depending on your project ’ s needs, your models, views, and controllers will all have varying
degrees of complexity. In most cases, though, having certain basic tools in place (such as basic
querying functions in your models or base templates for your views) at the start of the project
will save you a lot of time.

Don ’ t be afraid to work iteratively. If something doesn ’ t work at first, tweak a configuration file
or test a new view. CodeIgniter ’ s setup is very forgiving and makes it easy to incorporate
iterative development styles.

❑ ❑ ❑ ❑ ❑ ❑ ❑

Free download pdf