5.5. Conclusion

In this chapter, you expanded the original site with a shopping cart and polished the final product. In the next two chapters, you'll build out the administrative panels for this site and add any custom features that the client wants.

As you continue your CodeIgniter career, keep the following points in mind:

  • When in doubt, work incrementally. It's OK to start simple and work your way to a complex solution.

  • When updating look and feel, it's sometimes useful to think about what controller and model updates are needed to support the UI changes.

  • It's always helpful to think logically about the division of labor within your application. If you're dealing with data, create a model (Remember that session data are data, they don't have to live in a database table!). If you're dealing with application flow or logic, make sure it's handled in the controller. If it involves something the user can touch, see, or interact with, put it in the view.

  • Although CodeIgniter doesn't come with any native Ajax support built-in, there are plenty of Ajax-capable frameworks available. This chapter featured the use of Scriptaculous and Prototype, but you could easily go with any of the others. CodeIgniter is very flexible this way.

  • Work on what's easiest for you first. In this chapter, you were guided through the process by working out the intricacies of the model and controller first, and then moving on to the view, and then to the CSS to support the HTML in the view. If you feel more comfortable ...

Get Professional CodeIgniter® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.