How niyara-muradova/restaurant-delivery-javafx works
Main Components
• User Interface Layer:
• Login Package: Contains LoginView.fxml, LoginController.java, and LoginDAO.java. This represents the entry point where both administrators and customers log in.
• Registration Package: Provides customer registration through RegistrationView.fxml, RegistrationController.java, and RegistrationDAO.java.
• Customer Package: Handles customer operations with its own FXML views (CustomerView.fxml) and corresponding controllers and DAO classes.
• Administrator Package: Manages administrator functions including adding dishes, managing restaurants, viewing orders and customers (multiple FXML files and controller/DAO classes).
• Application Bootstrap:
• MainApplication Package: Contains MainApplication.java which serves as the starting point of the application.
• Data Access and Utility:
• DBUtil Package: Provides DBUtil.java, a utility helper for connecting to the Oracle Database (as noted by the reference to a precommitted Oracle database project).
• Domain/Model Layer:
• Model classes like Customer.java, Dish.java, Restaurant.java, and Orders.java—these represent the core data entities.
Understand the Architectural Patterns
• MVC (Model-View-Controller) is clearly being employed (each FXML view is paired with a corresponding Controller; the DAO classes handle data persistence).
• The separation of packages (Login, Registration, Customer, Administrator) illustrates modularization by functionality.
• The common DBUtil file shows a centralized database connectivity usage, emphasizing a consistent data access model.
Relationships and Data Flow
• The UI layer (JavaFX FXML views) passes user interactions to the respective Controllers.
• Controllers invoke methods from the DAO classes to retrieve or update data.
• The DAOs connect to the Oracle Database using the DBUtil.
• The MainApplication file acts as the starting point that loads the initial view (login screen) and possibly directs to the correct dashboard based on user privilege.
• After successful authentication through the LoginPackage, either the CustomerPackage or AdministratorPackage is engaged, each having independent FXML-driven screens and business logic.