How prasad25904/movie_booking_system works
Main Components
• User Interface (UI) Layer: This includes files like Login.java, Home.java, and Movies.java, which likely serve as the front end where users interact with the system.
• Business Logic Layer: Classes such as BookTickets.java, BookingDetails.java, CancelTickets.java, and Payment.java encapsulate the core functionalities of ticket booking, management, and payment processing.
• PDF Generation Service: The PDFGenerator.java file is a distinct module dedicated to generating PDF outputs (tickets/invoices) using the iTextPDF library.
• Data Access Layer/Database Connectivity: The project leverages JDBC as indicated in the README and integrates with MySQL. You might also highlight the “MySQL File” directory, which contains initialization scripts or sample SQL setups (e.g., movie_details.txt and logins.txt).
• External Libraries: The lib folder contains several jar files (e.g., flink-connector-mysql-cdc, pdf libraries) that showcase integration with external services or libraries which are important to note.
Relationships and Interactions
• The UI Layer acts as the front door through which users interact with the system. It passes requests (login, view movies, book or cancel tickets) to the Business Logic Layer.
• The Business Logic Layer processes these requests and interacts with the database via JDBC. All data such as movie details and user logins/read mechanisms are managed here.
• The PDF Generation Service module is invoked by the Business Logic Layer when a PDF (for tickets/invoices) needs to be created.
• The Data Access Layer, typically using JDBC, directly interacts with a MySQL database (initialization details provided under “MySQL File”), facilitating CRUD operations.
• External Libraries in the lib folder provide essential functionalities – for example, iTextPDF helps in generating PDFs, while other libraries may augment data processing or external connectivity.
Architectural Patterns and Design Principles
• Separation of concerns is evident. Each component (UI, Business Logic, Data Access, PDF Generation) is separated into different Java classes and files.
• You might note a layered architecture: the User Interface is decoupled from the business logic, which in turn separates the data access concerns.
Including Detailed Elements
• UI Layer (Login, Home, Movies)
• Business Logic (BookTickets, BookingDetails, CancelTickets, Payment)
• PDF Generation (PDFGenerator)
• Data Access Layer/Database (MySQL Database, with notes referring to “MySQL File” for initial scripts)
• External Libraries (with a note about iTextPDF and others)
• From UI components to Business Logic
• From Business Logic to Database and PDF Generation