Code Igniter It is developed by the fine people over at pMachine, creators of the Expression Engine CMS. Code Igniter (CI) uses the Model-View-Controller (MVC) approach similar to that of Ruby on Rails. However, it is a bit loose in it’s approach toMVC as a model does not have to be used. CI is lightweight, which means it starts you off with just the basic libraries and you can load more if needed. Speaking of libraries, CI comes with a nice selection of libraries to get you going quickly, such as connecting to a database, sending email, validating form data, maintaining sessions, manipulating images, and more. Another thing to keep in mind is that CI’s user guide is superb and the forums are alive with people who are more than willing to help. Both will prove to be invaluable when starting kout!
Within that application folder you have:
Within that application folder you have:
- Config – deals with the setting up of your database connection, base URL, auto loader (which loads other classes and helper functions as well as plugins) and routes.
- Controllers – are like traffic cops, directing requests to the proper models and views.
- Errors – deals with your 404 errors.
- Models – contains database functions such as inserting, deleting, updating and retrieving information from your database.
- Scripts – a place to store your own script includes or classes.
- Views – which are the pages your visitors will see.
Conclusion
I hope you enjoyed Part 1 of this series introducing you to the PHP framework Code Igniter. This was just a peek into CI and some of it’s functionality, in Part 2 we’ll take a look at making the form send an e-mail to the organizers and adding the registrant to a database. Until Part 2 comes out feel free to take a look at the the introductory videos on the CI website and also have a read through the User Guide to learn more.
The code for this tutorial is also available for download: regform.zip
No comments:
Post a Comment