Reference no: EM133746787
Enterprise Systems Development
Learning Outcome 1: Investigate and analyse the concepts, theories and processes in enterprise systems.
Learning Outcome 2: Review, apply and evaluate web tier and application components by identifying the most appropriate structural pattern.
Learning Outcome 3: Implement data access/persistence mechanisms including enterprise-grade transactions in a relational database.
Learning Outcome 4: Research and adopt appropriate development strategies and tools to implement enterprise solutions.
Learning Outcome 5: Create robust, reliable and secure applications to meet complex enterprise business needs.
Question 1
Consider a login system that contains the new user registration with following details.
First Name
Last name
Email
Password
Date of birth
City
Hint question
The system allows the user to log in the system with the registration details (only email and password). Explain MVC architecture with respect to a Login system with the proposed J2EE components.
Question 2
In this question, you'll modify the servlet that's used by the email application.
Open the ch06_ex1_email project using NetBeans, which is available to download from LMS, and review its files. This should include an EmailListServlet class. Note that the EmailListServlet class validates the data entered by the user and that this class does not contain a doGet method. Run the application. Then, enter some valid values on the first web page and click on the Join Now button to run the EmailListServlet class. This should use the HTTP POST method to request the /emailList URL, and the browser should not show any parameters in its URL. Take a screenshot of this run and paste it in the box below.
Click on the Return button. This should use the HTTP POST method to request the /emailList URL, it should display the first page of the application, and the browser should not show any parameters in its URL. Take a screenshot of this run and paste it in the box below.
Click the Join Now button without entering any values. This should display the same page again, but with a validation message that indicates that all three values are required. Take a screenshot of this run and paste it in the box below.
Append two parameters to the /emailList URL that's displayed by your browser like this:
This uses the HTTP GET method. Since the EmailListServlet doesn't have a doGet method, this should display an error page that indicates that the HTTP GET method isn't supported by the URL. Take a screenshot of this run and paste it in the box below.
Open the code for the servlet and add a doGet method that calls the doPost method of the servlet. Then, run the application again and enter the /emailList URL with the same parameters. It should display the first page of the web application with a validation message. This tests whether your development environment automatically reloads servlets after they have been changed. If the change you made to the servlet isn't working, you may need to manually reload the servlet class. One way to do that is to stop and restart Tomcat. Take a screenshot of this run and paste it in the box below.
Open the code for the servlet and add a statement that prints a debugging message to the Tomcat console. This message should show the value of the action parameter that's passed to the servlet. Run the application and click the Join Now button to display the message in the console. If you're using NetBeans 8.2 or higher, it should display a tab for the Tomcat console within the Output window. If it doesn't, you can usually display this tab by using the Services tab to restart the Tomcat server. Take a screenshot of your statement in the code as well a screenshot of this run and paste them in the box below.
Repeat the previous two steps but use a log file this time. Take a screenshot of the content of your log file and paste it in the box below.
Part B
This assessment focuses on coding tasks using Javae Servlet, JSP and Hibernate J2EE for database interactions using NetBeans 8.2 or higher. The database server for assessment must be MySQL server.
Coding Task: Implement a Product Management System
Create a product management system that allows admins to add, view, update, and delete products. The system should use Hibernate 4.3.1 (or higher) framework for database interactions.
TASKS:
Create a database table and an entity class named Product with attributes id (as the primary key), brand, description and price. Add the necessary Hibernate annotations. You will also need to justify the data type for each listed attribute.
Create another table and an entity class named User with attributes email (as the primary key), full_name, role (admin or client) and password. Add the necessary Hibernate annotations. You will also need to justify the data type for each listed attribute.
Configure Hibernate in your project using hibernate.cfg.xml.
Develop a homepage that incorporates an Admin login module and provides an overview of your product management system. Feel free to include any background photos to enhance the design.
Create a servlet to handle HTTP requests for managing products:
Implement a form to add new products.
Display a list of existing products.
Implement the ability to edit product details.
Implement the ability to delete products.
Create a JSP (JavaServer Pages) page to interact with the servlet and display product information.
What to submit:
Put your NetBeans project folder, database file and the report below in one zipped file and submit it by the due date via LMS.
A report in MS Word (not PDF) should include the following information:
TOC
Introduction
Database Tables and Entity Classes
Hibernate Configuration
Servlet Implementation
JSP Integration
Functionality (CRUD operations)
Error Handling and Validation
Code Quality and Comments
Screenshots
Use Case 1: Adding a Product
Use Case 2: Viewing Products
Use Case 3: Updating a Product
Use Case 4: Deleting a Product
Conclusion
Introduction
This report provides an assessment of the Java JSP and Hibernate J2EE project developed in tutorial B.
Database Tables and Entity Classes
Discuss the implementation of the Product, Users entity classes and highlight any key code snippets and Hibernate annotations.
Hibernate Configuration
Explain the configuration details in hibernate.cfg.xml.
Servlet Implementation
Provide a summary of the servlet implementation, including key code snippets, and discuss the handling of HTTP requests.
JSP Integration
Explain how the JSP pages interact with the servlet and provide code snippets. Discuss user interface design and layout.
Functionality (CRUD operations)
Detail how CRUD operations (Create, Read, Update, Delete) are implemented. Highlight code snippets that showcase functionality.
Error Handling and Validation
Explain how error handling and validation are implemented to handle user errors effectively.
Code Quality and Comments
Discuss the quality of the code, organization, and use of comments. Emphasize best practices.
Screenshots
Use Case 1: Admin Login
Insert screenshot here Use Case 2: Adding a Product
Insert screenshot here Use Case 3: Viewing Products
Insert screenshot here
Use Case 4: Updating a Product
Insert screenshot here
Use Case 5: Deleting a Product
Insert screenshot here
Conclusion
Summarise the overall assessment, mention any challenges faced, what was learned, and improvements if more time were available.
List of References
List all used references in tutorial B if any. Don't forget to cite them in your
report.
Sample Test
Explain the concept of a Servlet filter and its use in a Java EE web application.
Discuss the importance of using JavaBeans in JSP for developing enterprise applications.
Write a Java Servlet that handles a POST request to delete a customer from the Customers table. The form submitting the data includes a field for customerID. Use JDBC for database access.
Write a JSP code snippet that retrieves and displays the current date and time.
Write a Java Servlet that handles a GET request to list all orders from the Orders table, and display the order details in a HTML table.
Use the IEEE referencing style
Project Description
This is a group assessment. In this assessment, you are required to develop a J2EE project with MVC architecture using NetBeans environment and MySQL database component. The aim of the project is to enhance your skills by applying the theoretical knowledge to develop enterprise application using J2EE. You are requested to use J2EE specifications and techniques including session management, custom tags, Enterprise Java Beans, Hibernate framework in the given project.
The project consists of three parts: Part A, Part B, and Part C. The objective of the project is to create a small-scale enterprise application system of your choice. The application should have fundamental functionalities similar to those found. You are required to implement all the features and functionalities outlined in the sub- sections below. Additionally, you are encouraged to explore and incorporate further features to achieve higher marks. The provided information is comprehensive enough for you to complete the project, but you will need to determine any unspecified details independently.
Part A - Proposal, Design and SRS
In this part, you are required to submit a project proposal along with the details of the group members involved in it. The group members should not exceed the count of four. The project proposal should contain a B2C (Business to Consumer) online store company/organisation name with details of the goods to be sold by it. The student must provide clear indication of the organisation and the online goods they propose to work on in the proposal.
Software Requirements Specification (SRS) Documentation
An SRS is a description of a software system to be developed. It lays out functional and non-functional requirements and may include a set of use cases that describe user interactions that the software must provide. Follow the guidelines below carefully to develop one.
Introduction:
Begin with an overview of the document, including the purpose, scope, and context of the software project.
Identify the document's intended audience and stakeholders.
System Overview:
Provide a high-level description of the software system. Explain its goals, objectives, and the problem it aims to solve.
Functional Requirements:
Detail the system's functionality in a clear, concise manner.
Use use-cases, user stories, or flowcharts to describe how the system should respond to different inputs or user interactions.
Specify the expected behaviour, input parameters, and output results for each function.
Non-Functional Requirements:
Include non-functional requirements such as performance, scalability, security, usability, and reliability.
Define specific metrics, benchmarks, and constraints related to each non-functional requirement.
System Architecture:
Describe the system's architecture, including its components, modules, and their interactions.
Provide system diagrams or flowcharts to illustrate the architecture.
User Interfaces:
See User Interface Design (UI)
Data Requirements:
Specify the data structures, databases, and data sources used by the system.
Define data storage, access, and retrieval requirements. See Database design section for more information.
External Interfaces:
Describe any external systems, services, or APIs that the software must interact with. Include protocols, data formats, and communication methods.
System Constraints:
List any limitations, constraints, or dependencies that impact the system's design or implementation.
Use Cases and Scenarios:
See Use case diagram.
Business Rules:
Document any business rules or logic that affect the system's behaviour or decisions.
Security Requirements:
Outline security measures, authentication, and authorisation mechanisms to protect the system and its data.
Testing and Validation:
Describe the testing approach, including test cases, scenarios, and acceptance criteria. Specify performance, stress, and load testing requirements.
Maintenance and Support:
Define maintenance and support expectations, including software updates, bug fixes, and troubleshooting procedures.
Appendix:
Include additional information, such as glossaries, references, or supplementary diagrams.
Review and Approval:
Provide space for stakeholders to review, comment, and approve the SRS document.
References:
List any external references, standards, or documentation that influenced the SRS. All references should be in IEEE style.
Database Design
The database design will depend on the choice of your project website. Here are the general outlines to design one.
Understand the Requirements:
Before you start designing a database, it's essential to have a clear understanding of the requirements. This includes what kind of data needs to be stored, how it will be used, and what functionality the system should support.
Identify Entities:
The main entities or objects in your system. These are the core elements for which you will store data. Entities could include admin, customers, products, orders, employees, etc.
Define Attributes:
For each entity, define the specific attributes or properties that need to be recorded. These attributes represent the details or characteristics of each entity. For example, a "Customer" entity might have attributes like Email, Password, Name, Address, and Phone Number.
Determine Relationships:
Determine how these entities are related to each other. Identify the nature of the relationships, such as one-to-one, one-to-many, or many-to-many. This step helps you understand how data is interconnected.
Create an Entity-Relationship (ER) Diagram:
Develop an ER diagram to visualise the entities, attributes, and their relationships. Use standard symbols to represent entities (rectangles), attributes (ovals), and lines connecting them to show relationships. Label the lines with the relationship type (1:1, 1:N, N:N).
Choose Primary Keys (PK):
For each entity, select or define a PK. The primary key is a unique identifier for each record within an entity. Common choices include an ID field, social security number, or any unique attribute.
Establish Foreign Keys (FK):
When one entity is related to another, create FK in the related entity. These are attributes that reference the PK of another entity, ensuring referential integrity.
Normalise the Database:
In complex systems, consider normalising the database to eliminate data redundancy. Normalise the data into separate tables to minimise duplicate information and improve efficiency.
Document Business Rules and Constraints:
Document any business rules, constraints, or validation rules that apply to the data. This might include rules for data validation, default values, or unique constraints. Include this part in your SRS as well.
Test and Optimise:
Test the database thoroughly to ensure it functions as expected. Optimise its performance by creating indexes, using appropriate data types, and refining queries.
Documentation and Maintenance:
Maintain detailed documentation of the database schema, relationships, and business rules. Regularly update and maintain the database as your application evolves Include this part in your SRS as well.
Backup and Recovery:
Implement a robust backup and recovery strategy to safeguard against data loss. Regularly back up your database and test the recovery process.
Class Diagram
A class diagram is a type of UML (Unified Modelling Language) diagram that represents the structure and relationships of classes in a software system. It's used in software engineering to visualise and document the high-level design of a system. Here are the general outlines to create one.
Class:
The primary element of a class diagram is the class itself, which represents a blueprint for an object. Each class is depicted as a rectangle with three compartments: the top compartment contains the class name, the middle compartment lists the class attributes, and the bottom compartment lists the class methods.
Attributes:
Attributes represent the properties or data members of a class. These are usually shown in the middle compartment of the class rectangle. Attributes are accompanied by their visibility (public, private, protected) and data types.
Methods:
Methods represent the behaviours or operations that can be performed on an object of a class. Methods are listed in the bottom compartment of the class rectangle. They include their visibility (public, private, protected), return type, and parameters.
Association:
Association lines represent relationships between classes. They show how classes are connected or related in the system. Multiplicity (e.g., 1, 0...1, *) can be used to indicate the number of instances involved in the association.
Aggregation and Composition:
These are special forms of association representing "whole part" relationships. Aggregation is a weaker form of association, where the part can exist independently, while in composition, the part is dependent on the whole and cannot exist separately.
Inheritance (Generalisation):
A solid line with a hollow arrowhead represents inheritance (or generalisation). It shows that one class (the subclass or derived class) inherits attributes and methods from another class (the superclass or base class).
Dependency:
A dashed line with an arrowhead represents a dependency between classes. It indicates that one class relies on another class for some functionality but doesn't have a direct relationship.
Association Class:
An association class is used to add attributes and methods to an association. It's represented as a class placed in the middle of an association line.
Abstract Class:
An abstract class is denoted by italicised class names and is used when you want to define a common structure without creating instances of it.
Interface:
An interface is represented as a class with the name in italics and a label that says "<<interface>>." It defines a contract that classes implementing the interface must adhere to.
Multiplicity:
Multiplicity is used to specify how many instances of one class are associated with another class. It is often depicted near the end of an association line in the form of "0..1," "1," "0..*", etc.
Use Case Diagram
A use case diagram is a type of UML (Unified Modeling Language) diagram that provides a visual representation of the interactions and relationships between actors and use cases within a system. It's commonly used in software development to describe the functionality and requirements of a system. Here are the key elements and concepts of a use case diagram that you'll need to follow:
Use Case:
A use case represents a specific piece of functionality or a distinct interaction between an actor and the system. Use cases are represented as ovals within the diagram and are named to describe the action they represent, e.g., "Place Order."
Actor:
An actor is an external entity or role that interacts with the system. Actors are typically represented as stick figures on the diagram. Actors can be human users, other systems, or even hardware devices.
Association:
A solid line connecting an actor to a use case represents an association between the actor and the use case. It signifies that the actor interacts with the system through that use case. For example, a "Customer" actor may be associated with the "Place Order" use case.
System Boundary:
A boundary box or rectangle encloses the use cases and actors within the system. It represents the scope of the system under consideration. Everything inside the boundary is part of the system, while actors outside the boundary interact with the system.
Include Relationship:
An include relationship is a dotted arrow that shows that one use case includes another. It indicates that one use case can trigger another use case as part of its behaviour. For example, "Make Payment" may include "Verify Payment."
Extend Relationship:
An extend relationship is another dotted arrow that indicates optional behaviour that can extend the behaviour of a base use case. It is used to model variations in a use case's behaviour.
Generalisation:
A generalisation relationship between use cases indicates that one use case inherits the behaviour of another. It's often used when multiple use cases have similar behaviour, and one is considered a more general or abstract case.
Multiplicity:
Sometimes, use case ovals include multiplicity notation to indicate how many instances of a use case are involved in the interaction, for example, "1..*," "0..1," etc.
<<extend>> and <<include>> Labels:
When using extend and include relationships, you may add <<extend>> and
<<include>> labels to clarify the type of relationship and when it's invoked.
System Boundary:
A system boundary, represented as a rectangle, encloses the actors and use cases within the system. It defines the boundaries of the system under consideration.
User Interface Design (UI)
The registered customer may want to search for a product based on the category, or name of the product. A search functionality that displays a detailed description with an image(s) of the product needs to be provided. Based on the search, the customer may want to buy the goods online. They can buy product(s) of different category and add them in the shopping cart. Further, functionality may be added to the shopping cart: adding products, listing products and empty cart. A checkout page must display the selected product by the customer to purchase. The purchased product quantity needs to be updated in the database accordingly.
You may want to follow the general guidelines below to design UI for a website.
Define the Project Scope and Goals:
Start by understanding the project's objectives, target audience, and the problem you're solving through UI design. Clarify the project's scope and goals.
Research and User Analysis:
Conduct research to understand your target users. Analyse user needs, preferences, and behaviours. This information will guide your design decisions.
Create User Personas:
Develop user personas that represent different user types. These personas help you empathise with your users and design for their specific needs.
Plan Navigation:
Create a clear and intuitive navigation structure, including primary menus and submenus if needed.
Labelling and Naming:
Use consistent and user-friendly labels for sections and pages, ensuring clarity and ease of understanding.
Information Architecture:
Plan the structure of your interface. Design an information architecture that organises content and functionality logically and intuitively.
Wireframing and Prototyping:
Create wireframes and prototypes to visualise the layout and structure of your UI. This step allows you to explore different design options and get early feedback.
Visual Design:
Design the visual elements of the UI, including colours, typography, imagery, and overall aesthetics. Ensure that your design aligns with your brand's identity and resonates with your target audience.
Interaction Design (IxD):
Design the interactive elements of the UI, such as buttons, forms, navigation menus, and animations. Focus on providing a seamless and engaging user experience.
Usability Testing:
Test your UI with real users to gather feedback and identify any usability issues. This step helps you refine your design based on user input.
Implementation and Development Support:
Collaborate with developers to ensure the UI design is implemented correctly. Provide design assets, style guides, and support during the development process.
Continuous Evaluation and Iteration:
After the UI is live, monitor user feedback, analytics, and performance. Continuously iterate and improve the UI based on real-world usage and changing user needs.
Shopping Cart
Your website project should include a shopping cart module, allowing customers to add items. Customers should be able to view their shopping cart at any time, even when it is empty. Additionally, customers should be able to edit or delete items from their shopping cart. Follow the guidelines below carefully to develop your shopping cart module.
Define Your Requirements:
Start by defining the requirements of your shopping cart. What kind of products will it sell? What payment methods will you support? Do you need user accounts or guest checkouts? Understanding your requirements is crucial.
Design the User Interface:
Create a user-friendly and responsive user interface for your shopping cart. Ensure that users can easily add, view, and remove items from their cart.
Implement Product Listings:
Display products with details like name, price, description, and images. Users should be able to select products and add them to their cart. You can do this part later when you start to implement your project.
Shopping Cart Functionality:
Implement the core shopping cart functionality. Users should be able to add, remove, and update the quantity of items in their cart. Show the total price and the number of items in the cart.
Checkout Process:
Create a smooth checkout process. Gather shipping and billing information, and provide payment options.
Payment Integration:
Integrate with a payment gateway to handle payment processing securely. Popular payment gateways include PayPal and bank credit cards. However, you can create a dummy payment gateway as it is for education purposes.
User Authentication:
If you offer user accounts, implement user registration and login. This allows users to track their orders, save their shipping information, and more.
Testing and Quality Assurance:
Thoroughly test your shopping cart application. Check for bugs, security vulnerabilities, and usability issues. Ensure that the user experience is smooth.
Responsive Design:
Ensure that your shopping cart is responsive and works well on various devices, including desktop, tablet, and mobile.
Documentation and Support:
Provide documentation for users and developers. Offer customer support to address any issues or inquiries. Include this part in your SRS as well.
Site map
Design a site map representing the JSP/Servlet/html/CSS to be used in the system with a flow diagram. Follow the guidelines below to develop one.
Define Objectives:
Start by clearly defining the purpose and objectives of your website. Understand what you want to achieve with it.
Identify Key Sections:
List the main sections or categories of content your website will feature, such as home, about, services, blog, contact, etc.
Establish Hierarchy:
Organise the sections and pages in a logical hierarchy, with the most important or high- level content at the top.
Plan Navigation:
Create a clear and intuitive navigation structure, including primary menus and submenus if needed.
Labelling and Naming:
Use consistent and user-friendly labels for sections and pages, ensuring clarity and ease of understanding.
Review and Iterate:
Regularly review your site map to ensure it aligns with your objectives and make iterations as necessary.
Document and Share:
Maintain documentation of the site map and share it with your team members to ensure alignment and understanding.
What to Submit for Part A
The template of the project proposal can be found in LMS. Only one group member (team leader) needs to upload the group project proposal. Please ensure the same student submits rest of the linked submissions in Session 11 and Session 12 respectively.
In your project proposal, you will need to state that:
The main IDE to implement this project is NetBeans 8.2 or higher.
The programming language is Java.
The database server is MySQL.
Note, if the project is implemented without using the above three mentioned points, then it will not be marked.
Submit your project proposal along with 3.1 to 3.7 in one MS Word document.
Part B - Implementation
Database Development
You are required to:
Create the physical database design based on the conceptual model.
Map entities and relationships to actual database tables and columns.
Decide on storage and indexing options based MySQL database server.
Populate the database with sample data to test the schema and ensure it functions as expected. This can help identify any issues with data types or constraints.
Maintain documentation of the database design, including the schema, constraints, indexes, and relationships.
Review the database schema for accuracy and completeness. Validate it against your initial requirements and verify that it aligns with the application's needs.
User Authentication, Login and Logout
The component authenticates the user before the access to the online store. The interface needs to be professional with appropriate logo, header and footers. The system needs to have more than one type of user e.g., administrator and customers (it may include more). It allows a new user to register into the system. A new user registration interface with input fields may include email, full name, password, re-typed password and contact number (optional). Required client and server-side scripts for field validation needs to be provided. A login interface is must for the registered user to login to the system with the email address/username and a password. The inputted email address and password needs to be checked against the database. Otherwise, login failure message will be displayed. The system needs to have a logout button that redirects to the login page and clears the resource in use. As the user logs in, it displays the index page. This page can be used to add, update or delete products. The system needs to have customised interface for each user with their functionalities.
Product Maintenance
A series of pages needs to be created that allows a user to add, update or delete a product that is available for a particular category in the system. The administrator/vendors can enter new product categories and add list of products with their details within a category. The category and product details may include name, description, image, cost, quantity and any special features about the product. The information of the goods for the online store is stored in MySQL database. An interface to update/delete the products should be provided. The stock of the product based on the purchase/sale needs to be updated automatically.
Code Related Guidelines
Your J2EE application should include the following:
The code should have a consistent, professional and well-organised appearance.
Carefully chosen, meaningful identifier names
Code is well organised: clear, simple, & DRY (Don't repeat Yourself)
Thoughtful comments, where needed, expressed in concise, precise English.
Code should compile without errors.
The developed system takes input and handles the error in friendly manner.
Connects to given database operating the basic CRUD operations following the proposed data model in Session 11.
Your project must adhere to MVC architecture with implementation guidelines including modularity, reusability, extensibility, maintainability and adaptability.
You can find all the required software installations freely on LMS.
What to Submit for Part B
Follow the links in LMS to upload your report on or before the deadline.
The J2EE application along with the database queries developed must be submitted in a zip folder on the LMS in the available link. The zip folder should include:
A document that consists of introduction, requirements, database model with the attributes, screen shots and output with references.
The NetBeans project folder with all the source codes (JSP, html, .java), configuration files, document containing database model and the database (.sql) file.
A readme.txt file, which includes your information and how to run your project.
A revised version of your SRS documentation.