Recently, we developed 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 carry out learning missions such as 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 who claimed the location closest to each of the hidden treasures wins the prize.
n 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 Framework
My main expertise lies in Microsoft’s ASP.NET development platform, so when I started this project, my experience with PHP was limited to a few small-scale websites. I was delighted to discover the advantages that CodeIgniter would offer compared to traditional PHP development. During this project, I became very comfortable and satisfied with CodeIgniter and PHP as a development platform. A wide range of tools is available to assist in the development and analysis of PHP applications, and I have found the CodeIgniter framework to be a robust platform with strong community support.
One of the most valuable community contributions to CodeIgniter that we are using in this project is the CodeIgniter Modular Extensions (MX) package. Before adding these extensions, I had problems with reusable page components, such as the page header. This has led to code duplication and unpleasant workarounds. The modular extensions package provides a clean and elegant solution by providing a way to define a separate model, view and controller for the subsections of a page. These reusable modules can fully encapsulate individual elements of a page, ranging from data access logic to HTML generation. The Modular Extensions package allowed the development of an easier to maintain and cleaner application in addition to the CodeIgniter framework.
Overall, CodeIgniter provides a solid platform for developing PHP applications. The framework is familiar to developers who have worked with other MVC platforms and offers many useful out-of-the-box features. Community support for PHP and CodeIgniter covers many common concerns, and I am satisfied with the overall development experience.
Room for Improvement
One point of contention that I have with CodeIgniter is that it does not fully embrace many commonly accepted concepts as software development best practices. As the size and complexity of projects increase, certain aspects of the framework limit the ability to develop understandable and maintainable code. For example, CodeIgniter mainly offers three types of logic-oriented objects: controllers, models and libraries. Controllers are responsible for handling the user request and generating the appropriate response. The models deal mainly with data access. Libraries provide a way to reuse code throughout the application. However, none of these objects is ideal for containing the complex business logic of the application, which leads to inflated controllers, models or libraries. An ideal solution could involve a separate business layer that spans dozens of classes. Unfortunately, CodeIgniter does not provide room for such a set of classes to exist from the start. Although we have since developed a workaround to meet these needs, it would be better if the framework allowed a freer form logical layer rather than trying to require that all the code be located in a small number of predefined objects. .
Despite this gap, I would certainly consider CodeIgniter for future projects. However, I think it would also be prudent to study some of the alternative PHP development frameworks, as they can provide a more complete solution. Nevertheless, I appreciated the development experience of this project and I look forward to continuing the development of PHP.
Leave A Comment