Assignment-2 Specification and Marking Criteria
In this assignment, you are to implement a 3-tier enterprise application for a movie and electronic game renting company.
The application scenario
Century Entertainment (CE) is a chained movie and electronic games rental store. To manage its growth CE has planned to implement a Renting Information Management System (RIMS).
The system will be a 3-tier enterprise application that integrates a presentation tier, a business tier, and a persistence tier. The technology department of CE has decided to use Java EE and other open source technologies namely Glassfish application server and Derby database server to build and implement RIMS.
CE has recruited you to deliver RIMS that meets their following tiers of their application specifications (Persistence, Business, and Presentation tiers). To accomplish this task, you will need to design, implement, and document the 3-tiers of RIMS.
The application (or assignment) specification
1. The Persistence tier
a) CE rents movies and electronic games (that play on different platforms such as PC, PlayStation, and Xbox). A major assumption is that both products (movies and games) share some common properties such as ID, title, description, rating (such as PG, G, M, M+, R) and date of release.
b) In order to minimise code redundancy, you should use inheritance mapping. In your design, you should implement three (3) entity classes namely, Product, Movie and Game. You need to implement the Product class as the super class, wherein Movie and Game classes will inherit the Product super class.
c) You may consider the following attributes for Movie and Game entities:
o Movie: Director’s name, Running length in minutes (e.g. 180), language
o Game: Developer Studio’s name (e.g. EA Sports, Microsoft, Ubisoft), platform (e.g. PlayStation, Xbox, PC)
d) The products information must be persisted. You are required to use Java Persistence API (JPA 2.1) to persist them in Derby database. To design the entities, you must use either the Joined-Subclass Strategy (detailed on page 170 of the textbook) or the Mapped Superclass Strategy (detailed on page 174 to 175 of the textbook).
e) Besides their product information, CE also needs to store customer details and renting information. You are required to use entities to persist this information. You must implement the relationship between a Customer and the Rent as one-to-many unidirectional (detailed on page 156 to 159 of the textbook). This means, a customer can rent multiple products (movies, games, or a combination of both).
Note: Customer and Rent entities may be comprised of attributes like:
o Customer: First name, Last name, Street address …
o Rent: Item rented, Number of days hired, Return due date …
f) In summary, you are required to design and use five (5) entities, namely Product, Movie, Game, Customer, and Rent.
2. The Business tier
a) You need to develop business tiers by using Enterprise Java Beans (EJB 3.2). These business tiers will process the data for persistence and/or retrieve the information requests coming from the presentation tier. The EJBs then interact with the persistence tier to persist products, Customer, and Rent information or to retrieve the persisted information later on.
b) To interact with the persistence tier, the EJBs need to use Java Persistence Query Language (JPQL) to query entities, and return the processed results to the presentation tier.
3. The Presentation tier
a) You need to develop presentation tiers by using JavaServer Faces (JSF 2.0). The presentation tiers will provide web-based user interfaces. These interfaces will allow a user to input product details, customer details, and rent details. After collecting the required information, JSF pages will send the information as a persistence request to the business tier.
b) The presentation tier also facilitates the retrieval of product information (given product ID, or title, or ...), customer details (given customer ID, or customer first name, or ...) and his/her rentals (given order ID, or ...). Once the key information (e.g. rent ID) is collected, JSF pages will send it as a retrieval request to the business tier.
c) Note: you need to use Managed Beans as the core of presentation tier and its functions for JSF pages’ navigation (detailed on page 361 to 365 of the textbook). You may need to do some research.
To deliver a successful application, you are required to implement all the required entities, EJB s, and JSF pages (.xhtml files). To submit your assignment, you need to provide documentation and software as outlined in the next page.
Submission requirements (what do you need to submit?)
Part 1: Documentation
The design of all entities:
You are required to provide detailed information about the structures of these entities, their inheritance hierarchy, or relationship.
The design of JSF pages:
You are required to detail the structures of these pages and describe the navigation between them.
The design of EJBs:
You are required to detail how the EJBs perform the business logic for data persistence and retrieval, and how they interact with the persistence tier.
The design of managed beans:
You are required to detail how the managed beans accept requests from JSF pages, how they interact with EJBs and how they maintain the results from EJBs for the use of JSF pages.
The test instruction:
You are required to provide detailed instructions about how a user would use the software to persist at least two products, two customers, where each customer transacts at least two rental activities. Furthermore, your test instructions should clearly write detailed steps to run application:
Unzipping your application
Starting Glassfish application server and Derby database servers
Compiling and packaging the application (if required)
Creating the connection pool
Pinging the pool
Creating the data resource
Deploying the application in Glassfish application server
Part 2: Software
You must submit all the presentation, business tier, and persistence tiers, including Java source codes and executable files, Maven POM files, persistence file, and JSF pages within a standard Maven directory structure (check Figure A-3 of the textbook, page 541 of the textbook). This means the codes can be compiled and run directly in the Java EE environment, without any further revision or redevelopment.
You can also submit all your project developed by the NetBeans IDE.
WHAT AND HOW TO SUBMIT
Your design and test documents must be detailed in a Word document. You must submit all the required files (documentation and software) in a single zip file.