Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

Server-Side RAD

Order Tracking System


1 Description ...................................................................................................................................... 3
2 Requirements .................................................................................................................................. 3
3 Marks .............................................................................................................................................. 3
4 Submission ...................................................................................................................................... 3
5 Skeleton .......................................................................................................................................... 3
6 Functionality ................................................................................................................................... 4
6.1 Main Screen ............................................................................................................................ 4
6.2 List Products ............................................................................................................................ 5
6.3 Add New Product .................................................................................................................... 6
6.3.1 Success Conditions .......................................................................................................... 6
6.3.2 Invalid user input conditions........................................................................................... 7
6.4 List Customers ......................................................................................................................... 8
6.5 Add New Customer ................................................................................................................. 9
6.5.1 Success Conditions .......................................................................................................... 9
6.5.2 Invalid user input conditions......................................................................................... 11
6.6 List Orders ............................................................................................................................. 12
6.7 Add New Order ..................................................................................................................... 13
6.7.1 Success Conditions ........................................................................................................ 13
6.7.2 Business Logic for Order Creation:................................................................................ 15
6.7.3 Invalid user input conditions......................................................................................... 16
6.8 Security ................................................................................................................................. 18
6.8.1 Logout ........................................................................................................................... 18

2
1 Description
Write a Spring Boot MVC application that allows a logged-in user to manage orders of
products for customers.

2 Requirements
The application should be written in Spring Boot based on the skeleton application available on
Moodle, and should use the Spring MVC n-tier architecture – Controllers, Services, Repositories,
Views, with the appropriate data/logic in each tier.

The Model for the application consists of three objects:

 Product
o Product ID
o Description
o Quantity In Stock
 Customer
o Customer ID
o Customer Name
 Order
o Order ID
o Order Quantity
o Order Date
These models have been given in the skeleton code for the project and their dependencies
already set up.

3 Marks
This project is worth 50% of the marks for the module.

4 Submission
A zipped file containing the source code of the entire application should be uploaded to
Moodle before 5:00pm on Friday April 28th 2017.

5 Skeleton
The application should be created by updating the skeleton application available on Moodle.

3
6 Functionality
6.1 Main Screen
When the application starts, the user should see the following screen:

Figure 1 Main Screen

4
6.2 List Products
This screen shows the list of Products in the sales database:

Figure 2 List Products

5
6.3 Add New Product
This screen allows the user to add a new Product.
6.3.1 Success Conditions
If all information is entered correctly, the sales database is updated with the new product
information:

Figure 3 Add New Product – OK

And the user is immediately brought to the List Products page, where the product just
entered is shown:

Figure 4 List of Products after new product added

6
6.3.2 Invalid user input conditions
If the product description is blank, or the quantity in stock is less than 0 (assume it will
always be a number – never blank or a string) the following errors should be displayed, and
no product should be added to the sales database.

Figure 5 Add New Product – NOK

7
6.4 List Customers
This screen shows the list of Customers in the sales database.
Underneath each Customer is the list of orders they have placed, if any.

Figure 6 List of Customers

8
6.5 Add New Customer
This screen allows the user to add a new Customer.
6.5.1 Success Conditions
If all information is entered correctly, the sales database is updated with the new customer
information:

Figure 7 Add New Customer – OK

9
And the user is immediately brought to the List Customers page, where the customer just
entered is shown:

Figure 8 List of Customers after new customer added

10
6.5.2 Invalid user input conditions
If the customer name is blank the following error should be displayed, and no customer
should be added to the sales database.

Figure 9 Add New Customer – NOK

11
6.6 List Orders
This screen shows the list of Orders in the sales database, together with the name of the
customer who placed the order and the name of the product that was ordered.

Figure 10 List of Orders

12
6.7 Add New Order
This screen allows the user to add a new Order.
6.7.1 Success Conditions
If all information is entered correctly, the sales database is updated with the new customer
information:

Figure 11 New Order - OK

13
And the user is immediately brought to the List Orders page, where the order just entered is
shown:

Figure 12 List of Orders after new order added

14
6.7.2 Business Logic for Order Creation:
 The Order date (the current date) is automatically inserted by the application – the
user does not have to enter the date.

 The Product table is updated to reflect the new quantity. I.e.


Quantity in Stock = (Quantity in Stock minus Order Quantity).
In the above example, the Order Quantity for Product 100 was 12 (see Figure 11 New
Order - OK).

Before the order was placed the Quantity in Stock for Product 100 was 54 (see Figure
4 List of Products after new product added).

After the order was placed the Quantity in Stock for Product 100 will be 42 (54 – 12).

Figure 13 List of Products updated after successful order

 If the user enters a Quantity for an order greater than the Quantity in Stock the
following error page should be displayed:

Figure 14 Order Quantity too large error

15
6.7.3 Invalid user input conditions
If the Order Quantity is less than 1 (assume it will always be a number – never blank or a
string) the following errors should be displayed, and no product should be added to the
sales database.
(Assume the Customer ID and Product ID will never be blank)

Figure 15 Order Quantity < 1 error

If an invalid Customer ID and/or Product ID is entered, the following page should be shown to the
user:

Figure 16 Invalid Customer ID and Product ID

16
Figure 17 Invalid Customer ID and Product Quantity too large error

17
6.8 Security
The application should implement security so that unless a user is logged in they will not be
able to navigate to any URL.
The only page they should be able to see is the index.html:

Figure 18 index.html always accessible

If user has not logged in and they attempt to access any of the applications URL endpoints, they
should be presented with the following form allowing them to log in:

There should be one user (user) with password user.

6.8.1 Logout
There should be a logout button on the List Customers screen (see Figure 6 List of Customers).

18

You might also like