How omargt8/pruebacodeigniter works
Main components
• Framework Core: Label “System” – this folder holds the core libraries, helpers, and components (e.g., routing, security, sessions, database drivers) that power CodeIgniter.
• Application Layer: Label “Application” – this includes controllers, models, views, libraries, helpers, hooks, and configuration files. These components follow the MVC (Model-View-Controller) pattern:
• Controllers (in application/controllers): Manage user requests and flow.
• Models (in application/models): Handle data retrieval and business logic.
• Views (in application/views): Render the user interface.
• Third-party Libraries & Assets: Identify any additional libraries (for instance, the mPDF integration found under application/libraries/third_party/mpdf) as well as assets (JS, CSS, images in assets and js directories).
• Configuration & Supporting Files: Include configuration files (under application/config) and other supporting files (like .htaccess, index.php, etc.) that influence request routing and server behavior.
• External Documentation: Although not part of the runtime architecture, note the inclusion of the user guide, license, and contributing files for completeness.
Interactions and dependencies
• Data Flow: Show how a web request enters via index.php, gets routed through the system’s routing component (in system/core/Router.php), and then is handled by the appropriate controller within the application folder.
• Controller to Model/View: Indicate that controllers fetch data via models and pass it to views, which render the UI.
• Database Layer: Although not explicitly a separate directory, include an abstract “Database” component. This is represented by the CodeIgniter database drivers in the system/database folder and the configuration in application/config/database.php.
• Helper Components: Include helper files as modules that support different functionalities (URL processing, form handling, etc.) used across controllers and views.
Architectural patterns and design principles
• MVC Pattern: Clearly separate the three layers (Model, View, Controller) within the “Application” folder.
• Modularity & Reusability: Emphasize the use of libraries and helpers that encapsulate common functionality. Also, note the inclusion of third-party libraries (like mPDF) to extend functionality.
• Config-driven Behavior: Point out that a significant amount of configuration (in application/config) determines how routing, caching, and other aspects function.