Skip to main content
Recently we’ve been developing an interactive online application for a financial services company. It aims to help users understand their financial choices and make better decisions. The application takes the form of an interactive game in which users can complete learning missions like watching a video or setting financial goals. Here’s how it works: after completing each mission, the user can claim a location on the game’s virtual treasure map. At the end of the game, the user which has claimed the location closest to each of the hidden treasures wins the prize.

interactive online application

In the past we’ve developed similar projects with the PHP and MySQL technology stack. For this project we’re also using PHP and MySQL, and have elected to use CodeIgniter as a PHP development framework. CodeIgniter provides a foundation for efficiently developing applications with the model-view-controller (MVC) pattern, and provides additional features such as simplified data access, built-in form validation, and standardized security components.Using the CodeIgniter FrameworkMy primary expertise lies with Microsoft’s ASP.NET development platform, so when beginning this project my experience with PHP was limited to only a few small-scale web sites. I was excited to learn about the benefits that CodeIgniter would offer over traditional PHP development. During the course of this project I’ve become quite comfortable and pleased with CodeIgniter and PHP as a development platform. A substantial assortment of tools are available to help with development and analysis of PHP applications, and I’ve found that the CodeIgniter framework is a robust platform with solid community support. One of the most valuable community contributions to CodeIgniter that we’re using on this project is the CodeIgniter Modular Extensions (MX) package. Before adding these extensions I was having difficulty with reusable page components, such as the page header. This was leading to code duplication and unpleasant workarounds. The Modular Extensions package provides a clean and elegant solution by providing a means of defining a separate model, view, and controller for sub-sections of a page. These reusable modules can fully encapsulate individual elements of a page, ranging from data access logic up through HTML generation. The Modular Extensions package has enabled development of a more maintainable and clean application on top of the CodeIgniter framework.Overall, CodeIgniter offers a solid platform for development of PHP applications. The framework is familiar to developers who have worked with other MVC platforms and offers many helpful features out of the box. The community support for both PHP and CodeIgniter covers many common concerns, and I am pleased with the overall development experience.Room for ImprovementOne point of contention I have with CodeIgniter is that it does not fully embrace many concepts commonly accepted as software development best practices. As projects grow in size and complexity, certain aspects of the framework limit the ability to develop understandable and maintainable code. For example, CodeIgniter primarily features three types of logic-oriented objects: controllers, models, and libraries. Controllers are responsible for managing the user’s request and generating the appropriate response. Models primarily deal with data access. Libraries provide a means for code re-use throughout the application. However, none of these objects are ideal for containing the complex business logic of the application, which leads to bloated controllers, models, or libraries. An ideal solution might involve a separate business layer that encompasses dozens of classes. Unfortunately CodeIgniter doesn’t provide a place for such a set of classes to exist out of the box. Although we have since developed a work-around for meeting these needs, it would be preferable for the framework to allow for a more free-form logic layer rather than attempting to require that all code be located within a small number of pre-defined objects. Despite this shortcoming I would certainly consider CodeIgniter for future projects. However, I feel it would also be prudent to investigate some of the alternative PHP development frameworks, as they may provide a more complete solution. Nonetheless, I have enjoyed the experience of developing this project and look forward to continued PHP development.