How quynh124/decor-vista works
Main components
• EJB Module (FunitureWebsite-ejb): This module contains the enterprise business logic. It includes entity beans (in the “com/entitybeans” folder) that represent database entities (such as Categories, Consultations, Products, etc.) and session beans (in the “com/sessionbeans” and “com/sessionbeansprocess” folders) which encapsulate the business rules and operations, including even specialized processes like cart management.
• Web Module (FunitureWebsite-war): This contains the presentation layer including JSF pages (with various xhtml files under “admin”, “client”, and “design” subdirectories) and Managed Beans (in “com/mbeans”). This module is responsible for rendering the UI and handling HTTP requests.
• Database: The persistence.xml files and the database script (in the “db” folder – e.g., DecorVistaWebsite.sql) indicate that a relational database is used for storage. The entity beans interact with the database via JPA.
• External Libraries and Frameworks: The project utilizes PrimeFaces (as seen in the EJB lib folder with primefaces-11.0.0.jar) along with other typical JEE libraries. Additionally, the presence of configuration files (e.g., web.xml, glassfish-web.xml, and persistence.xml) signals standard Java EE deployment.
Relationships and interactions
• The client (web browser) interacts with the Web Module. The web container (running the WAR) handles incoming HTTP requests. Managed Beans (e.g., LoginMB, DashboardMB) process these requests.
• The Web Module then calls business logic encapsulated in the EJB Module (using session beans and process beans).
• The EJB Module, in turn, manages interactions with the database, mapping data objects to entities (a typical persistence and ORM layer) and processing business rules.
• There is also a clear separation between the administrative and client areas in the presentation layer (with separate directories and xhtml pages).
Architectural patterns/design principles
• Layered/MVC Architecture: The design clearly separates the presentation (view + controllers managed by JSF and Managed Beans), business logic (EJB session beans), and data access (entity beans with JPA connectivity).
• Enterprise Java Beans: Use of stateless or stateful session beans supporting transactional business operations.
• Loose coupling: The modular separation (EJB and WAR modules) supports maintainability and scalability.
Technologies and frameworks
• Java EE (with EJB, JPA, and JSF)
• PrimeFaces (as part of the UI framework)
• Apache Ant/NetBeans build (build.xml and nbproject folders)
• GlassFish (as indicated by glassfish-web.xml and glassfish-resources.xml files)
Elements
• Clear labels for each component (e.g., “Presentation Layer – FunitureWebsite-war”, “Business Logic – FunitureWebsite-ejb”, “Database Layer”).
• “process” components (for example, the CartSB in “com/sessionbeansprocess” for shopping cart processing).