Jump to content

CodeIgniter

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Yuma2020 (talk | contribs) at 22:31, 12 April 2023 (New Big Upgrade Yuma2020). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
CodeIgniter
Original author(s)EllisLab
Developer(s)British Columbia Institute of Technology (2014-2019), CodeIgniter Foundation [1] (2019-now)
Initial releaseFebruary 28, 2006 (2006-02-28)
Stable release
4.6.0[2] / 2025-01-19[±]
Repository
Written inPHP
Operating systemCross-platform
PlatformPHP 5.6.0+ (v3.1.11)[3] and PHP 7.4 or newer (v4.XX)[4]
TypeWeb framework
LicenseMIT License
Websitecodeigniter.com Edit this at Wikidata

CodeIgniter is an open-source web application development framework based on PHP. It was created by EllisLab and is now maintained by the community of developers. CodeIgniter provides a lightweight and simple structure for developing fast and efficient web applications, following the MVC (Model-View-Controller) design pattern.

CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP.[5]

Prominent Features

In general, CodeIgniter is a popular web development framework that offers a combination of simplicity, performance, and flexibility. It is suitable for developers looking for a quick and efficient solution for web application development in PHP. However, it is important to note that CodeIgniter is a mature framework but may not be as actively updated and improved as newer frameworks. Therefore, it is important to evaluate the project requirements and development community before choosing CodeIgniter as the appropriate development tool.

  • MVC Architecture: CodeIgniter follows the Model-View-Controller (MVC) design pattern, allowing for a clear separation of business logic, presentation, and user interaction in a web application. This facilitates code organization and modularity, resulting in cleaner and more maintainable code.
  • Lightweight and Fast: CodeIgniter is known for its lightweight and fast approach, making it ideal for developing high-performance web applications. The core of the framework is small and has minimal dependencies, resulting in quick loading times and efficient performance.
  • Extensive Documentation: CodeIgniter has comprehensive official documentation that includes detailed guides, tutorials, and API references. This makes it easy for developers to learn and effectively use the framework.
  • Rich Library: CodeIgniter comes with a wide range of built-in functions and pre-defined classes that cover many common tasks in web development, such as database manipulation, session handling, form validation, friendly URL generation, file handling, and more. This speeds up the development process and allows for efficient web application development.
  • Flexibility and Customization: CodeIgniter is highly flexible and allows developers to customize and extend its functionality according to their specific needs. It does not impose a rigid directory structure and provides ample freedom in code organization and application configuration.
  • Security: CodeIgniter incorporates best security practices in its design and offers built-in security features such as input filtering, XSS (Cross-Site Scripting) and CSRF (Cross-Site Request Forgery) attack prevention, and secure password handling.
  • Active Community: CodeIgniter has an active community of developers who contribute updates, bug fixes, and new features. There are also numerous online resources such as forums, blogs, and discussion groups where developers can seek help and share knowledge.

CI3

CodeIgniter 3 is a previous version of the PHP-based web development framework that has been widely used and remains popular in the development community. It offers an easy-to-use MVC structure and a wide range of features, such as a rich function library, database support, friendly URL generation, session management, and built-in security. CodeIgniter 3 is known for its lightweight and fast approach, making it suitable for efficient and high-performance web application development. However, it's important to note that CodeIgniter 3 is no longer actively developed and does not receive security updates or functionality improvements. Therefore, developers should consider the latest version, CodeIgniter 4, which offers enhanced features and is actively developed.

CI4

CodeIgniter 4 is the latest version of the popular PHP-based web development framework. It introduces many new features and improvements compared to the previous version (CI3). Some of the notable features of CodeIgniter 4 include a namespace-based approach for better code organization, support for PHP 7.2 and later versions, performance and security enhancements, a new, modern and flexible directory structure, improved routing syntax, native support for Composer, a new event handling layer, and many other advanced features to facilitate the development of modern and efficient web applications. Additionally, CodeIgniter 4 has an active development community and comprehensive, up-to-date documentation, making it an attractive choice for developers seeking a versatile and powerful framework for building next-generation web applications.

PSR/4

PSR-4 (PHP Standards Recommendation 4) is a coding standard defined by the PHP community for class autoloading in PHP applications. CodeIgniter 4 complies with the PSR-4 standard, which means it uses a directory structure and namespace-based autoloading system that adheres to the specifications of PSR-4.

In CodeIgniter 4, controllers, models, views, and other framework components are organized in directories and namespaces following the conventions of PSR-4. This allows for efficient and consistent class autoloading throughout the application, simplifying dependency management and facilitating code reuse in different parts of the project.

The use of PSR-4 in CodeIgniter 4 also makes it easy to integrate external PHP libraries and packages, as they can be installed and automatically loaded using Composer, the PHP dependency manager. This enables developers to leverage the vast community of PHP packages and libraries available in the Composer ecosystem to quickly and efficiently extend the functionality of their CodeIgniter 4 applications.

In summary, the adoption of the PSR-4 standard in CodeIgniter 4 ensures an organized code structure and efficient class autoloading, simplifies dependency management, and allows for easier integration of external libraries and packages in CodeIgniter 4 applications.

Extensibility

CodeIgniter 4 is highly extensible, which means it offers a wide range of options for customizing and extending its functionality according to the specific needs of each project. One of the key features that makes CodeIgniter 4 highly extensible is its module-based architecture. Modules are independent pieces of code that can be easily added or removed to extend the functionality of the framework. This allows developers to create custom modules for specific functionalities, such as authentication, PDF generation, integration with external APIs, etc., and then seamlessly integrate them into their CodeIgniter 4 application. In addition, CodeIgniter 4 uses a plugin architecture that allows the addition of custom libraries and helpers, and its integration with Composer makes it easy to install and use external PHP packages. Furthermore, CodeIgniter 4 offers an extension API that allows developers to create their own custom classes and methods, providing great flexibility to tailor the framework to the specific needs of each project. In summary, CodeIgniter 4 offers a high level of flexibility and extensibility to adapt to the requirements of complex and customized web application development.

Compatibility

Each version of CodeIgniter offers compatibility with different versions of PHP, specific features, and improvements, and caters to different web development needs and requirements. It is important to select the appropriate version of CodeIgniter based on the requirements of your project and keep it updated to take full advantage of the features and improvements offered by each version. CodeIgniter is a popular web development framework in PHP that has evolved over the versions. Below is a summary of the main features and compatibility of the different versions of CodeIgniter:

  1. CodeIgniter 1.x: This is the first version of the framework and was released several years ago. It is compatible with PHP 4 and 5, and offers a simple directory structure, a controller and view system, and basic support for databases. However, it does not have many of the advanced features and tools present in later versions.
  2. CodeIgniter 2.x: This is the second version of the framework and is compatible with PHP 5 and 7. It offers an improved directory structure, a more flexible routing system, support for libraries and helpers, and a wide range of additional features for web development. It is a popular and widely used version in many web applications.
  3. CodeIgniter 3.x: This is the third version of the framework and is compatible with PHP 5 and 7. It offers many improvements compared to the previous version, including increased security, support for session management, improved performance, and enhancements to the database API. It is a stable and widely used version in many web applications.
  4. CodeIgniter 4.x: This is the latest version of the framework and is compatible with PHP 7.2, 7.3, 7.4, and 8.0, but starting from version 4.3.1, the development team has dropped support for PHP 7.4 and earlier versions in order to maintain security and project viability [6] . It offers a directory structure and a namespace-based autoloading system that complies with the PSR-4 standard, allowing for efficient class autoloading and advanced dependency management. It also provides many modern features and tools for web development, such as SEO-friendly routing, dependency injection, authentication and authorization, session management, internationalization, and many more.

Application Areas

CodeIgniter is used in a wide variety of areas and applications, including web application development, websites, APIs, mobile applications, and custom projects, offering a versatile and efficient solution for PHP web application and website development. CodeIgniter (CI) is a PHP web development framework used in a wide variety of areas and applications, including:

  • Web application development: CodeIgniter is widely used in web application development, ranging from enterprise applications and content management systems (CMS) to e-commerce applications, social networks, blogs, forums, and more. It provides an organized directory structure, a flexible routing system, an efficient database API, and many additional features for building modern and efficient web applications.
  • Website development: CodeIgniter is a popular choice for website development of various sizes and complexities. It enables quick and efficient creation of websites with features such as SEO-friendly routing, session management, authentication and authorization, form handling, and much more. It is a preferred choice for many web developers due to its ease of use and ability to create fast and secure websites.
  • API (Application Programming Interface) development: CodeIgniter is widely used for creating APIs, which are application programming interfaces used for communication between applications and web services. CodeIgniter offers a directory structure and specific tools for creating RESTful APIs or APIs based on other protocols, allowing developers to create efficient and scalable APIs for their applications.
  • Mobile application development: CodeIgniter can also be used in the development of mobile applications, particularly on the server-side (backend). Developers can use CodeIgniter to create APIs that are consumed by mobile applications developed on platforms such as iOS, Android, and others, enabling communication and data transfer between the mobile application and the server.
  • Desarrollo de proyectos personalizados: CodeIgniter es lo suficientemente flexible y extensible como para ser utilizado en proyectos personalizados que requieren soluciones específicas y a medida. Los desarrolladores pueden aprovechar la estructura modular y el sistema de extensibilidad de CodeIgniter para crear soluciones personalizadas para proyectos específicos en áreas como educación, salud, finanzas, logística, entre otros.

Popularity

CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller classes are a necessary part of development under CodeIgniter, models and views are optional.[7] CodeIgniter can be also modified to use Hierarchical Model View Controller (HMVC[8]) which allows the developers to maintain modular grouping of Controller, Models and View arranged in a sub-directory format.

CodeIgniter is most often noted for its speed when compared to other PHP frameworks.[9][10][11] In a critical take on PHP frameworks in general, PHP creator Rasmus Lerdorf spoke at frOSCon in August 2008, noting that he liked CodeIgniter "because it is faster, lighter and the least like a framework."[12]

Source code and license

CodeIgniter's source code is maintained at GitHub,[13] and as of the preview version 3.0rc, is certified open source software licensed with the MIT License. Versions of CodeIgniter prior to 3.0.0 are licensed under a proprietary Apache/BSD-style open source license.[14]

A 2011 decision to switch licensing to the Open Software License (OSL) sparked some community controversy,[15] especially about the GPL incompatibility of the new license, to which EllisLab has responded with a series of articles entitled Software License Awareness Week.[16]

History

CodeIgniter is a PHP-based web development framework that offers an MVC (Model-View-Controller) architecture for creating dynamic and scalable web applications. In this article, we will review the history of CodeIgniter, from its origins to its current state, and see how it has evolved over the years.

On 2006, CodeIgniter was born as a project by EllisLab, a software company that was developing ExpressionEngine, a PHP-based content management system (CMS). EllisLab aimed to create a lightweight and fast framework that would make web application development easy without the need for a steep learning curve or complex configuration. This gave rise to CodeIgniter, which was inspired by other frameworks such as Ruby on Rails or CakePHP, but with a more minimalist and flexible approach. The first public version of CodeIgniter was released by EllisLab on February 28, 2006.[17]

  • CodeIgniter quickly gained popularity among PHP developers for its simplicity, clear documentation, and superior performance. CodeIgniter offered several advantages over other frameworks, such as:
    • A MVC (Model-View-Controller) structure that separated logic from presentation and allowed for better code organization and maintenance.
    • An integrated library of functions and classes that facilitated common tasks such as database handling, session management, data validation, email sending, etc.
    • An automatic loading system that loaded only the necessary resources for each request, optimizing memory usage and execution time.
    • A routing system that allowed customization of application URLs and improved Search Engine Optimization (SEO).
    • An active and collaborative community that provided solutions, extensions, and technical support.

On 2007, Kohana created a fork from CodeIgniter 1.5.4, as a result of the community's dissatisfaction with the lack of bug fixes and the desire to incorporate other features demanded by users.

On 2008 It should also be noted that CodeIgniter is faster than many other environments. Even in a discussion about development environments with PHP, Rasmus Lerdorf, ​.[18][19][20] the creator of PHP, expressed that he liked CodeIgniter «because it's fast, lightweight, and doesn't seem like an environment».

On 2013 date July 9, EllisLab announced that it was seeking a new owner for CodeIgniter, citing a lack of resources to give the framework the attention they felt it deserved. [21]

On 2014 date October 6 However, CodeIgniter did not disappear. EllisLab transferred the project to the British Columbia Institute of Technology (BCIT), a Canadian educational institution that took over the development and support of CodeIgniter. BCIT created a new team of volunteer developers who were dedicated to improving the framework and releasing new versions. [22]

On 2019, date October 23, the CodeIgniter Foundation took control of CodeIgniter, as announced on the official forum. CodeIgniter is no longer under the care of the British Columbia Institute of Technology. [23]

On 2020 date January 15 dead Jim Parry, who was the project manager of CodeIgniter 4, and the project is now being continued by other project managers. [24]

On 2020 date January 24 on the birthday of Jim Parry the first beta of CodeIgniter 4 is released. With the release of CodeIgniter 4 in 2020, the framework underwent a complete rewrite, maintaining its philosophy of simplicity and speed, but adopting modern technologies and standards to offer an even more efficient and updated development experience. [25]

On 2021 The latest version of CodeIgniter in that year is 4.1.4, released in August. This version represents a significant leap compared to previous versions, as it introduces significant changes to the structure, syntax, and functionalities of the framework.

  • Full support for PHP 7.2 or higher, taking advantage of its advanced features such as scalar types, return type declarations, anonymous classes, etc.
  • A modular system that allows dividing applications into independent and reusable components.
  • An integrated authentication system that facilitates user and permission management.
  • An improved migration system that allows controlling changes in the structure of databases.
  • A more powerful and flexible validation system that allows validating data both on the client and server side.
  • An event system that allows executing custom actions for certain events in the application.
  • An integrated unit testing system that allows verifying the proper functioning of the code.

On 2022 date date November 28th, according to the development team, PHP 7.4 has been deprecated from future updates starting from version 4.3.0., [26] Starting from version 4.3.0, CodeIgniter is compatible with PHP 8.2. The latest versions of the framework, [27] which can be downloaded from CodeIgniter's official website or from GitHub.

CodeIgniter remains a valid and current framework for web development with PHP. Its philosophy remains the same: to offer a simple, fast, and effective tool for creating web applications without complications. However, it has also adapted to the times and has incorporated new features that make it more competitive and versatile.

Since its initial release, CodeIgniter has become one of the most popular and widely used PHP frameworks in the web development community. Over the years, it has undergone several updates and improvements to adapt to the changing needs of web development and stay relevant in a constantly evolving technological environment. One of the distinctive features of CodeIgniter is its focus on simplicity and speed. Unlike other heavier and more complex frameworks, CodeIgniter has remained a lightweight and user-friendly framework, making it a popular choice for many web developers.

Currently, CodeIgniter continues to be a popular choice for web development in PHP, used by numerous developers and companies worldwide for creating efficient, secure, and high-performance web applications and websites.

See also

References

  1. ^ "The CodeIgniter Foundation is finally here". 2019-10-23. Retrieved 2020-06-10.
  2. ^ "CodeIgniter Releases". github.com. Retrieved 2025-02-23.
  3. ^ "Server Requirements — CodeIgniter 3.1.11 documentation". www.codeigniter.com. Archived from the original on 2019-07-11. Retrieved 2017-06-23.
  4. ^ "Server Requirements — CodeIgniter 4.x documentation". www.codeigniter.com.
  5. ^ "CodeIgniter – The lightweight of the PHP frameworks". IONOS Digitalguide. Retrieved 2022-03-30.
  6. ^ "Dev: drop PHP 7.4 support #6921".
  7. ^ "CodeIgniter User Guide: Models". CodeIgniter.com. Archived from the original on 2015-02-03. Retrieved 2015-02-03.
  8. ^ "wiredesignz / codeigniter-modular-extensions-hmvc — Bitbucket". bitbucket.org. Retrieved 2016-05-05.
  9. ^ "7 Best PHP Frameworks". TISindia.com. 2014-02-12.
  10. ^ "PHP Frameworks Benchmarks". Sellersrank.com. Archived from the original on 2014-12-15. Retrieved 2014-08-05.
  11. ^ "Benchmark update: Cake vs. CodeIgniter vs. Kohana". Pr0digy.com. 2008-09-03. Archived from the original on 2014-06-14. Retrieved 2014-08-05.
  12. ^ "Rasmus Lerdorf: PHP Frameworks? Think Again". Sitepoint.com. 2008-08-29. Retrieved 2014-08-05.
  13. ^ "bcit-ci/CodeIgniter · GitHub". Retrieved 2015-02-03.
  14. ^ "CodeIgniter License Agreement". CodeIgniter.com. Retrieved 2016-02-28.
  15. ^ "CodeIgniter changes license to OSL 3.0?". CodeIgniter.com Forum. 2011-10-21. Archived from the original on 2014-08-08. Retrieved 2014-08-05.
  16. ^ "Software License Awareness Week". EllisLab.com. 2011-10-31. Archived from the original on 2016-03-22. Retrieved 2012-12-28.
  17. ^ "CodeIgniter User Guide: Change Log". CodeIgniter.com. Archived from the original on 2016-03-22. Retrieved 2016-03-21.
  18. ^ CakePHP and CodeIgniter Benchmark
  19. ^ PHP Frameworks Benchmarks Archived 2014-12-15 at the Wayback Machine
  20. ^ Benchmark update: Cake vs. CodeIgniter vs. Kohana
  21. ^ "EllisLab Seeking New Owner for CodeIgniter - Blog". ExpressionEngine.
  22. ^ "Your Favorite PHP Framework, CodeIgniter, Has a New Home". Retrieved 12 April 2023.
  23. ^ "The CodeIgniter Foundation is finally here". 2019-10-23. Retrieved 2020-06-10.
  24. ^ "Important News about Jim Parry and the Project". forum.codeigniter.com. Retrieved 2020-01-15.
  25. ^ "CodeIgniter 4.0 is here!". Retrieved 2020-02-24.
  26. ^ "Dev: drop PHP 7.4 support #6921".
  27. ^ "CodeIgniter 4 releases".