s23 CSD2103 Project Code Implementation Document

Here is the Instruction Document:

Here is our To Do List:

To Do: Set a GITHUB Repository for your Team Code. See how to use Git Issues and Git Actions to project manage our Application.
To Do: Create a Latex Document to provide the technical Document for our application. In this Design Document: We will make our Technology Design and specify our Use Cases, UML designs, and Traceability Matrix in the Latex Design Document.
DONE: Install and learn to use Node.js
Week 08: Install Mongo DB and make a simple Mongo database: Because Mongo DB is going to be the Datastore for your 3 Tier Model View Controller e Commerce Web Application.
Install and learn to use Expressjs Web server.
Do some labs to learn how to use the Node Modules System: The means that we can write different partitions of our code (For database, For Webserver, and JS objects which provide our Controller): we can put code for various aspects of the system not separate files and connect them together.
June 21: Learn to work with Forms in our front end HTML Client.

In this Project you will be learning Node.js Application Development Skills.
Your hand in will be: NPM publish to
Therefore we start each Node.js application by
npm -init
The purpose of this is to create the package.json file which is the definer of your Node Application.
Your Deliverable Work for the Project will be:
Your team’s Latex Document, which will include:
Your team’s GitHub Repository URL
Your URL for your Uploaded Project on

This project has you build an MVC full stack web application.
The first part of this Document is Template Code to get started.
Deliverables for the Project:
Team presentation at the End.
Latex Document for technical Document.
You will make a Traceability Matrix as part of your technical documentation.
GitHub Repo. We will be using Git Issues and Git Actions for the Project management.
npm Publish: Hand in your Link in your Latex Document.
Note: Your Mongo Database be hosted on MongoDB Realm (cloud based Mongo Database).

Learning Outcomes:
Install Node.js:
Introduce Back End programming with Node.js
Create an application that uses jQuery and CSS with Forms and a backend Node.js program to process the front end form data in the html.
One of the ways for front end Web Page user to send information to the Back End is with forms.
Ajax is another way.
Provide the front end in-Browser JavaScript and HTML. Make a form as follows:
3 fields and a button to run the backend Node.js program. 2 of the fields are for input numbers.
User clicks the operation button (Add, subtract, multiple, divide) to do that operation on the numbers.
When the user Clicks the OPERATION button, the field data is sent to the backend Node.js program to process the operation. We use AJAX to write the result back to the output field.
Project Template to Provide completely written out CSS, JavaScript and HTML which will work perfectly.
Use CSS to decorate the page and the controls and change the page color in response to the result.

Student Lab Learning workbook that demonstrates the use of jQuery, CSS, and a backend Node.js program to process form data.
Step 1: Create the project structure
Create a new folder for your project. Inside the folder, create the following files:
index.html: Contains the HTML structure and form elements.
styles.css: Contains the CSS styles for decorating the page.
script.js: Contains the JavaScript code for handling form submission and AJAX requests.
server.js: Contains the backend Node.js code to process the form data.
Step 2: Set up the HTML structure (index.html)
In the index.html file, add the following code:

<!DOCTYPE html><html><head> <title>Form Processing</title> <link rel="stylesheet" type="text/css" href="styles.css"></head><body> <h1>Form Processing</h1>
<form id="myForm"> <label for="num1">Number 1:</label> <input type="number" id="num1" required> <br> <label for="num2">Number 2:</label> <input type="number" id="num2" required> <br> <label for="operation">Operation:</label> <select id="operation"> <option value="add">Add</option> <option value="subtract">Subtract</option> <option value="multiply">Multiply</option> <option value="divide">Divide</option> </select> <br> <button type="submit" id="submitButton">Submit</button> </form>
<div id="result"></div>
<script src=""></script> <script src="script.js"></script></body></html>
Step 3: Define the CSS styles (styles.css)
In the styles.css file, add the following CSS code:
cssCopy codebody { background-color: #f2f2f2; font-family: Arial, sans-serif; margin: 0; padding: 20px;}
h1 { color: #333333;}
form { margin-bottom: 20px;}
label { display: block; margin-bottom: 5px; color: #333333;}
input[type="number"],select { padding: 5px; border: 1px solid #cccccc; border-radius: 3px; width: 200px;}
button { padding: 8px 16px; background-color: #4caf50; color: white; border: none; border-radius: 4px; cursor: pointer;}
#result { margin-top: 20px; padding: 10px; background-color: #ffffff; border: 1px solid #cccccc; border-radius: 3px; font-weight: bold;}
Step 4: Handle form submission and AJAX request (script.js)
In the script.js file, add the following JavaScript code:
$(document).ready(function() { // Form submission handler $('#myForm').submit(function(event) { event.preventDefault(); // Prevent form submission
// Get form data var num1 = $('#num1').val(); var num2 = $('#num2').val(); var operation = $('#operation').val();
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.