There are many PHP frameworks that can be used to develop web applications. Which one is most suitable for an undergraduate software engineering course? To answer this question, a quantitative and qualitative comparison was undertaken of plain PHP, the CodeIgniter framework, and the CakePHP framework. Complex frameworks with high learning curves did not pass the selection process, nor did those frameworks least mentioned on job search sites. To facilitate the quantitative comparison, a graduate student implemented the same web application using plain PHP and the two selected frameworks.
Table 1 shows that fewer lines of code had to be written using CakePHP, while Table 2 shows that the plain PHP web application had much lower execution times for representative tasks. CakePHP was found to be the best choice in terms of security: the web application built with it survived the attempted SQL injection and cross-site scripting attacks. The qualitative analysis, however, revealed that CakePHP did not score as well on several measures, such as learning curve and developer friendliness. CodeIgniter was deemed best for student use by the investigators.
Experienced qualitative researchers might find themselves skeptical of the results of the qualitative analysis reported in Table 3. Usually such findings are backed up by quotes from individuals, but they are not in this report. By examining only two frameworks in detail, this study may be of limited value to anyone faced with choosing a framework. Nevertheless, this paper is recommended to anyone who needs to know more about frameworks for web applications.