COMP 1537 – Assignment 6 solution

$30.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

Objective

To build the basic architecture of a three-tiered web app.

Overall Structure
This last assignment will focus on being able to connect Node.js to a relational database, MySQL in this
case, and return the data to a web page.

Database Details
Your database will be called ‘assignment6’ – all lower case letters. You will have two tables in the
database that your server code (in Node.js) will generate (like the example provided). The names of the
two tables will have your student number, then an underscore, then the name of the table.

For example,
assuming a student ID of A012345678, the names of the tables would be:
1. A012345678_user
2. A012345678_user_timeline
Of course you will replace A012345678 with your student number. Failure to do so will result in loss of
marks.

The first table (e.g., A012345678_user) will contain the following fields:
1. Primary key
2. User name
3. First name
4. Last name
5. Email address
6. Password

Provide at least one record in this table. The second table (e.g., A012345678_user_timeline) will contain
posts that a given user posted. The following fields will be found:
1. Primary key
2. Foreign key (referencing the primary key in the user table)
3. Date of post
4. Text that was posted (e.g., “Today, we learned how to connect Node.js to a MySQL database
and return that data and display it into a web page.”)
5. Time of the post
6. Number of views

For all data that you put into these tables, please provide actual data, and not copy and pasting the
same thing over and over. Put effort into this. Also, no Lorem Ipsum or random/garbage characters.
For the user timeline table, provide at least five posts for each user, again, no duplicating the same
content and no Lorem Ipsum.

Page Content
At this point in the course, you’ve had enough practice with CSS, grids, media queries, etc. so this part
should not be difficult. You can use any of your previous assignments design that you wish to use. But
you are not required to have any media queries.

Do not use my CSS template. Doing so will lose you marks. Use your own design(s) from previous
assignments that you submitted. Be original.

Requirements

What you pick is up to you, but the following requirements must be met to receive full marks:
• Not using my CSS template – use your own
• Retrieve data from the database
• Retrieve and display the timeline data for one user each based on the user record that you
stored

• Follow all the requirements listed above in this document
• Your node app will be called assignment6.js
And no using frameworks for this assignment. This includes jQuery.
Once you have completed, ensure that your document is valid. You code (HTML, CSS, JavaScript) must
all be free of all syntax errors regardless of what validation tools you use (online, editor plugins, reading
manually, etc.).

Note: you have one week to complete this assignment. Do not leave this until the last couple of
days to complete. Doing so would be an example of poor time management as an adult learner
and will almost certainly results in a failing grade for this assignment. It is worth 20 marks versus
only 10 or 20, like the other assignments.

As well, include a readme.txt file that follows this format:
Figure 1: readme.txt
[Student Name], [Student ID], [Set], [Date]
This assignment is [enter percent]% complete.
[explanation if not complete, what is working/not
working]

Submission
Once you have completed, ensure that your document is valid. It is suggested that you use the HTML 5
validator online at:
https://en.rakko.tools/tools/58/
Ways in which you may lose marks (but not limited to the following list):
• You don’t validate your HTML/CSS
• Your JS has errors in it
• Links to files/resources are broken
• You left the content that I provided in the example in your submission (e.g., title element value,
element ID values, any of my HTML or CSS
• Doesn’t connect to the DB, server runs with errors
• Your app doesn’t auto populate and create the DB in the init function

To ensure that you don’t lose marks. Also use the CSS validator in Visual Studio Code.
Create a zip archive of any and all text files that are part of your assignment submission. Your HTML files
will have the extension “.html”, your CSS files will have the extension “.css”, and your JavaScript files will
have the extension “.js”. If you have images, be sure to include them in this archive that you create.
Once you create your zip archive file, rename it to follow the format
SurnameFirstnameCOMP1537Assignment6. My zip file would be
FergusonArronCOMP1537Assignment6, for instance.
Finally, submit it to the learning hub in the folder labeled “assignment 6”.