PROG2002 Assignment 2
Weight: 40% of your final mark
Due: Week 6 (Please see MySCU for the assessment due date)
Please note that this is an individual assignment
Specifications
Your task is to develop a one-page web application using AngularJS that displays movies and
their schedules in a cinema. The web application is expected to have the following
requirements
A MySQL database using NodeJS that stores the movies and their show times.
An Angular app for displaying the list of movies and their show times, including update
and delete actions.
A RESTful API to fetch the details of the list of movies and their show times, including
update and delete actions.
Getting Help
This assignment is to be completed individually. It is the opportunity to gain an
understanding of the concepts of building a dynamic website. It is important that you
master these concepts yourself. You are permitted to work from the examples in the study
guide or textbook but you must acknowledge assistance from other textbooks or
classmates. In particular, you must not use online material or help from others, as this
would prevent you from mastering these concepts.
Who can you get help from? Use this diagram to determine from whom you may seek help
with your program.
Encouraged
Attribution Required
Ask tutor
Not acceptable
Lecturer Tutors
Online
Forums
Relatives
Students
outside unit
Hired coders
Classmates
Private
Tutors
Other
Please note that if your marker has any suspicion that you had help with your code or that
your work is not your own, you will be asked to come to a meeting with your marker to
explain your code. Any student who is unable to explain their code will be submitted for
academic misconduct.
Part 1 – Setup MySQL database using NodeJS
You are required to complete the following requirements using NodeJS (see Module 4):
Install a MySQL server, connect to the MySQL server, and create a new database called
“cinema_db” by creating a file named “cinema_db.js”.
Create two new tables called movie and showtime that store the list of movies and
the showtimes that the movies are playing.
o In the movie table, create the following fields: movie_ID (PK), title, genre,
rating, description
o In the showtime table, create the following fields: showtime_ID (PK), movie_ID
(FK), time (you either can use string or datetime type), and location (i.e. the
suburb where the movie is playing). Note that one movie can be played in
multiple locations at the same time.
o For the two tables above, use appropriate data type for each of the fields
Insert at least 5 records into the movie table and at least 10 records into the showtime
table
Part 2 – Create a RESTFul API and Angular project
You are required to complete the following requirements:
Create an Angular project and import all the required modules such as HttpClient etc.
Using Angular component, add a page in your Angular project to display the details of
movies including their times and locations (see Module 5).
You are free to decide the layout of this page as long as it shows the required
information
Create a RESTful API using Node and ExpressJS to fetch data from the database and
display the data on the page (you will need to use GET request).
Part 3 – Extend the RESTful API and add more components
You are required to complete the following requirements:
Add two new Angular components to your Angular project to implement the
following pages:
o A page to create a new record in the showtime table
o A page to update and delete existing records in the showtime table
3
You are free to decide the layout of these pages as long as it can perform the required
actions
Extend the Restful API to implement the above functionalities (you will need to use
POST, PUT, and DELETE requests) – see Module 4. Each page in your project must
correspond to a unique URL, and users should be able to navigate between the pages.
You may use Angular router to handle multiple components (see Module 6)
Please note that you are not required to add, edit, or delete any records from the movie table.
Submission instruction:
- You are required to upload your codes to the SCU server so the website will be fully
working. Each student has been sent a cPanel login to access your account (please
check your email). There will be a video shared on Blackboard to guide you on how to
upload your website to the server
- You are also required to upload your codes to the submission link on Blackboard.
There will be a submission link provided.