How mdtalalwasim/doctor-patient-portal-advancejavawebproject works
Main Components
• Frontend (Presentation Layer):
• JSP pages and web components in the "src/main/webapp" directory.
• Separate folders and pages for Admin (e.g., admin_login.jsp, admin dashboard pages), Doctor (doctor_login.jsp, doctor dashboards, profile and comment pages), and User interfaces (user_login.jsp, signup.jsp, appointment pages).
• Backend/Controller Layer:
• Servlet classes found under packages for admin, doctor, and user (e.g., AdminLoginServlet, DoctorLoginServlet, AppointmentServlet, etc.). These handle the request routing, session management, and other business logic.
• Business/Data Access Layer:
• DAO classes (DoctorDAO, UserDAO, AppointmentDAO, SpecialistDAO) that encapsulate the database interactions.
• Entity classes (Doctor, User, Appointment, Specialist) that represent the data model.
• Database Connectivity:
• A dedicated DBConnection class for establishing connections to the MySQL database.
• Build and Configuration:
• Maven’s pom.xml for dependency management and build rules.
• web.xml for servlet configurations.
Relationships and Interactions
• HTTP requests enter through the browser to the appropriate servlet based on user role.
• Controller Servlets interact with DAO components to perform CRUD operations on the database via DBConnection.
• Once processed, responses are forwarded to the corresponding JSP pages to generate the HTML that the user sees.
Architectural Patterns & Design Principles
• MVC (Model-View-Controller) is the core pattern used.
• Views: JSP pages organized in the webapp directory.
• Controllers: Servlets located in the admin, doctor, and user packages.
• Models: Entity classes and DAO layer.
• Separation of concerns is maintained:
• Different user roles have their own dedicated packages (com.hms/admin, com.hms/doctor, com.hms/user), which makes the system modular and easier to understand.
Relevant Technologies & Frameworks
• Java Servlets/JSP for dynamic content generation.
• JSTL and Bootstrap 5 for view design and responsiveness.
• MySQL for persistent data storage.
• Maven for build and dependency management.