How gomescandice/yoga-website works
Main components (nodes) of the system
• Frontend User Interface:
• HTML files (embedded in PHP files such as index.php, contact.php, register.php, schedule.php)
• CSS (yoga.css) for styling
• Client-side JavaScript for input validation
• Backend Server Logic:
• PHP scripts (core files located in PHP Files directory and its connection sub-directory)
• A separate connection layer (PHP Files/connection contains connection.php and index.php for DB connection)
• Database:
• MySQL database accessed via phpMyAdmin
• Tables defined in the various SQL files (cSchedule.sql, class.sql, client.sql, contact.sql, days.sql, schedule.sql)
• External Components:
• XAMPP environment for running Apache and MySQL servers
Relationships and data flows between these components
• User Actions ➜ Web Browser:
• Users interact with the frontend (submit forms, request pages).
• Browser ➜ PHP Files:
• Frontend sends requests (form submissions, page loads) to the PHP server.
• PHP Server ➜ Database Layer:
• PHP scripts perform data validation, business logic, and make queries to the MySQL database.
• Database ➜ PHP Server:
• Query results (e.g., client records or class schedules) are returned from the database.
• PHP Server ➜ Browser:
• Processed data is rendered into HTML and sent back to the user’s browser.
Architectural patterns and design principles to capture
• Separation of Concerns: Clearly distinguish between presentation (HTML/CSS/JS) and data processing (PHP backend) as well as data storage (MySQL).
• Client-Server Model: Show that the client (browser) communicates with the server, which in turn interacts with the database.
• Data validation is conducted on the client side (JavaScript) and server side (PHP).