How hjosuelb/ceo-orbe_pruebatecnica works
Main Components
• Client/Frontend:
• The user interacts with the system via a web browser.
• Frontend technologies include HTML and CSS (with styling files located under the “estilos” directory), along with Bootstrap for responsive design.
• The “index.php” file serves as the entry point.
• Backend Components:
• PHP files handle the server-side logic. These include the main page (index.php) and the files in “Modulos” which implement different functionalities such as listing students (estudiantes.php), adding new students (estudiantesAgregar.php), and editing student data (estudiantesEditar.php).
• Shared UI components (like header, footer, and navigation menus) are located in the “componentes” folder under “Recursos/componentes”. These files are reused across various pages to maintain consistency.
• Database Layer:
• The “BaseDatos” folder contains:
• db_conexion.php – responsible for establishing the database connection.
• db_query.sql – containing the SQL queries and likely instructions for stored procedures (as indicated by the README).
• MySQL is used for the data storage, and stored procedures are invoked to manage the CRUD operations.
Relationships and Interactions
• The user (via a browser) sends HTTP requests which hit the main entry point “index.php”.
• “index.php” then calls the appropriate module (from the “Modulos” folder) depending on the user’s actions (list, add, or edit a student).
• Each module includes UI components (from the “Recursos/componentes” directory) to maintain a consistent look and feel.
• When a database operation is required, the PHP scripts use the connection details in “BaseDatos/db_conexion.php” to connect to the MySQL server and run queries or stored procedures described in “BaseDatos/db_query.sql”.
• Feedback from the backend (like confirmation messages or errors) is then passed back to the user interface, potentially enhanced by JavaScript or SweetAlert2 for alerts.
Architectural Patterns/Design Principles
• Separation of Concerns: Different directories separate the application’s UI (“estilos”, “componentes”), business logic (“Modulos”), and data access (“BaseDatos”).
• Modular Design: Each PHP module handles a specific function (list, add, edit), making it easier to maintain and extend the system.
• Reusability: Shared components and styles ensure consistency and simplify updates across the system.
• Client-Server Interaction: Clear layering separates the frontend (client) from the backend (server) and the database layer.
Final Touches
• Block has a title reflecting its role (e.g., “Frontend”, “Backend – PHP Modules”, “Database – MySQL”).
• Adding annotations or notes for clarity—for example, explain that stored procedures handle database operations, or mention that “estilos” contains custom styles.