How raveen522/restaurant_management_system_java works
Project’s Main Components
a. User Interface Layer:
• GUI Screens/Forms – LoginScreen_Cashier, LoginScreen_Manager, CashierScreen, ManagerScreen, MainScreen, SplashScreen, FoodMenu.
• Custom Widgets – e.g., RoundedButton from customPackages.
b. Business Logic Layer:
• Classes under restaurant_management_system that handle application logic such as processing orders, handling user roles (cashier and manager), and navigation between screens.
c. Data Access/Persistence Layer:
• Although not explicitly separated into a “dao” folder, the README mentions MySQL. So assume this layer is responsible for connecting to and querying the database to manage orders, user credentials, menu items, cashier data, etc.
d. Reporting/Printing Module:
• JasperReports integration – bill.jasper and bill.jrxml are used to generate bills and reports.
e. Build and Deployment Components:
• Build scripts (build.xml), compiled classes (build/classes), and distribution packages (Restaurant_Management_System.jar in the dist folder).
• External libraries included in dist/lib (e.g., JasperReports libraries, MySQL Connector, Apache Ant, etc.) which each play a role in functionality.
Relationships and Data Flow
a. The user (either a cashier or a manager) interacts with the UI through different screens (login, cashier screen, manager screen).
b. On login, the UI passes the user credentials to the business logic, which then accesses the Data Access Layer to verify credentials against the MySQL database.
c. For transaction processing, the business logic updates or queries orders and menu information via the Data Access Layer.
d. When generating reports (daily or monthly sales, bills), the business logic triggers the reporting module (JasperReports), which fetches data and formats it into printable documents.
e. Additional services such as custom UI components (custom packages for custom widgets) support the UI but may not interact directly with the database.
Important Architectural Patterns and Design Principles
a. Separation of Concerns – even if not strictly imposed by separate packages, conceptually separate the GUI, business logic, and database interaction.
b. Model-View-Controller (MVC)-like Structure – the GUI (Views) is decoupled from the business logic (Controller) and the data (Model via the MySQL database).
c. Integration of Reporting – use of external libraries distributed with the project demonstrates modular integration.
d. Use of build and dependency management via Ant, showing that the project eases deployment and distribution.
a. Clear labels for each component (for example, “UI Layer” with individual screens, “Business Logic”, “Database – MySQL”, “Reporting Module – JasperReports”, etc.).
1. User Interface/Presentation Layer:
• Also mention custom components from customPackages.
2. Business Logic Layer:
3. Data Access Layer:
• A connection to an external MySQL database.
4. Reporting Module:
5. Build & Deployment:
• From UI → Business Logic (user commands)
• From Business Logic → Database (data queries/updates)
• From Business Logic → Reporting Module (bill/report generation)