You are required to develop a solution that implements a RESTful
API for your previously generated (Assignment 5) online mobile
phone store that maintains a database of: 1. Personal details for
customers of a hypothetical online mobile-phone store. The database
should contain entities that record customer personal information
[Title, First Name(s)*, Surname*, Mobile*, Email Address*], and
both home and shipping addresses [Address Line 1*, Address Line 2,
Town*, County/City*, EIRCODE]. The fields marked * are required
fields, i.e. they must contain values. 2. Item details for mobile
phones sold by the online store (from a random selection of phone
items; 10 maximum) which contain the following phone details:
[Manufacturer*, Model*, Price*]. The fields marked * are required
fields, i.e. they must contain values. 3. Order details for
customer purchases. Orders contain a list of items (phones) that
have been purchased by customers. Customers may purchase more than
one item in a single order. Customers may make multiple orders
containing multiple items. The system should record item
purchasers; or it should be possible to establish this information
using queries. Your RESTful API should provide CRUD functionality
for Creating, Searching (Retrieving), Updating, and Deleting
customer, item, and order information from a MongoDB database.
Assignment Release Date: 25-04-2022 Submission Due Date: 29-04-2022
Feedback Due Date (estimated): 09-05-2022 (for assignments that
make Due Date) Support Laboratories Lab 10 (One Week) Total Mark:
5% There are no requirements to develop a HTML/CSS/JS “front-end”
for this assignment. You only need to develop the ”back end”
functionality that demonstrates the RESTful API functionality
described above. We will test your routes using Postman or
Insomnia.
You should include appropriate routes for the each of REST
activities for the different entitles using the lecture material
presented in Lectures 19 and 20. You are required to develop a
NodeJS application that implements the functionality outlined above
using ExpressJS, and with the following additional constraints
(note that constraints related to your database setup may be
carried forward from earlier assignments without change):
Please note that you should implement best practice when it
comes to NoSQL (document) database design for this assignment,
i.e., you may choose to have normalised or de-normalised models, or
a combination approach. 3. You may write functions to randomly
create personal and address data and you may use the name generator
functions provided for the Assignment 03 if you wish. 4. Titles
should include Mx, Ms, Mr, Mrs, Miss, Dr or Other (specify). 5. You
may reuse the created (or auto-generated) address as the shipping
address or add a different address. 6. Your code should include a
brief description for the database design (your data modeling
approach) and the impact on your code development. This should be
included as a comment at the bottom of your code submission. 7. For
this assignment you do not need to validate data in the ExpressJS
controllers (Please note that ordinarily I would have this as a
requirement but given the current situation it is not required).
You may validate if you wish, and have time, as shown in Lessons
L20.01 - L20.05 . 8. For this assignment you do not need to
generate online forms to collect and validate data sent to the
database (Please note that ordinarily I would have this as a
requirement but given the current situation it is not required).
Please include an example of routes as comments in your program
code. 9. Please “hard-code” your authentication details into the
database. If you are using MongoDB please allow access from
anywhere (whitelist 0.0.0.0). We will need access to your database
in order to correct your assignment. Please note that a MongoDB
Atlas database is preferable for this assignment, you must create
an account unless you do not have internet access.
. You must use a RESTful framework (for example, ExpressJS) for
this assignment. You may use either NodeJS’s MongoDB or Mongoose
modules for manipulating your database (the latter is recommended).
You may refer to online resources such as MongoDB, W3schools, of
course
You are required to develop a solution that implements a RESTful API for your previously generated (Assignment 5) online
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You are required to develop a solution that implements a RESTful API for your previously generated (Assignment 5) online
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!