[major=SE | course_id=SDN302 | syllabus_id=12175 | semester=7 | combo=SE_COM4.1 | title=Server-Side development with NodeJS, Express, and MongoDB]
Course ID: SDN302
Title EN: Server-Side development with NodeJS, Express, and MongoDB
Title VI: Phát triển Server-Side với NodeJS, Express và MongoDB
Credits: 3.0
Prerequisites: DBI202, FER202
Description: This course tackles all the problems related to NodeJS-based web servers. Contents to be implemented include:
- Overview of Web protocols: HTTP and HTTPS.
- Introduction of NodeJS and frameworks such as ExpressJS, NestJS, Hono to build a web server.
- Introduction of simple templating languages such as EJB and HandleBar .
- Deploy the application on a web server with basic CRUD operations. Work with NoSQL databases, specifically MongoDB and Mongoose, to access MongoDB from NodeJS.
- Overview of REST and building a RESTful API.
- Learn Authentication and security-related issues for web applications.
- Integrate React app with server NodeJs
- Deploy server-based applications with Hosting Services
Student tasks: - Students must attend at least 80% of contact slots in order to be accepted to the final examination.
- Student is responsible to do all exercises given by instructor in class or at home and submit on time
- Constantly follow announcements on FU CMS at https://cmshn.fpt.edu.vn/ and FU FLM at https://flm.fpt.edu.vn/ for up-to-date course information regarding assignment submission and feedback on assignments and project work.
Tools: - Visual Studio Code (https://code.visualstudio.com)
- Postman
- MongoDBCompass
- Internet
Course type: traditional
Decision: 1286/QĐ-ĐHFPT dated 11/22/2024
Approved date: 2024-11-22
CLO1: Understand Node, Node modules, API and the Node HTTP server
[1] category=Assignment; type=on-going; weight=20.0; duration=Guided and reviewed in tutorial sesions;
Cont. at home; question_type=All CLOs; grading_guide=problem(s) to solve by programming using LO1 - LO8; completion_criteria=; clos=>0
[2] category=Practical Exam; type=on-going; weight=25.0; duration=85'; question_type=All CLOs; grading_guide=problem(s) to solve by programming using LO1 - LO8; completion_criteria=; clos=4
[3] category=Progress test; type=on-going; weight=15.0; duration=20'-40'; question_type=PT1: CLO1,2,3,4,5,8
PT2: CLO6
PT3: CLO7; grading_guide=PT 1
LO1,2,3,4,5,8
PT 2
LO6
PT 3
LO6, 8
Number of questions:
3-8 for each LOx; completion_criteria=; clos=>0
[4] category=Project; type=on-going; weight=15.0; duration=Guided and reviewed in tutorial sesions;
Cont. at home; question_type=All CLOs; grading_guide=problem(s) to solve by programming using LO1 - LO8; completion_criteria=; clos=>0
[5] category=Final exam; type=Final exam; weight=25.0; duration=60'; question_type=All CLOs; grading_guide=all topics;
more than 70% new questions (for the current semester);; completion_criteria=; clos=4
[1] desc=Full Stack Web Development Guide: Everything Node JS, Express, APIs, Embedded JavaScript (EJS), React JS, Database Fundamentals, SQL Databases, NoSQL …; author=Sammie Smith; publisher=Independently published; edition=; isbn=979-8848179330; main=True; online=; note=
[2] desc=Ultimate Full-Stack Web Development with MERN_ Design, Build, Test and Deploy Production-Grade Web Applications with MongoDB, Express, React and NodeJS; author=Nabendu Biswas; publisher=Orange Education Pvt Ltd; edition=; isbn=978-8119416424; main=; online=; note=
[3] desc=https://www.mongodb.com/; author=; publisher=; edition=; isbn=; main=; online=True; note=
[4] desc=https://ejs.co/; author=; publisher=; edition=; isbn=; main=; online=True; note=
[5] desc=https://expressjs.com/; author=; publisher=; edition=; isbn=; main=; online=True; note=
[6] desc=https://nodejs.org/docs/latest/api/; author=; publisher=; edition=; isbn=; main=; online=True; note=
[7] desc=https://handlebarsjs.com/; author=; publisher=; edition=; isbn=; main=; online=True; note=
[8] desc=NestJS - A progressive Node.js framework; author=; publisher=; edition=; isbn=; main=; online=True; note=
[9] desc=Hono - Ultrafast web framework for the Edges; author=; publisher=; edition=; isbn=; main=; online=True; note=
Session 1: Course Introduction:
1.1 Full Stack Web Development: The Big Picture
1.2 NodeJS Introduction
Topic: Offline; Teaching type: CLO1; LO: I
ITU: Slot1.1_What-is-Back-End-Development
Materials: SDN302_Slides_1
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 2.1 Features of node.js
- Single Threaded but Highly Scalable
- Event-driven and Asynchronous
- Event Loop
Topic: Offline; Teaching type: CLO1; LO: I, T, U
ITU: Slot1.1_What-is-Back-End-Development
Materials: SDN302_Slides_2
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: 3.1 Node.js - Environment setup
- Setting up node.js and npm
- Basics of node.js and npm
3.2 Node.js - First application
Topic: Offline; Teaching type: CLO1; LO: I, T, U
ITU: Slot1.2_NodeJS
Materials: SDN302_Slides_3
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: API:
4.1 What is API
4.2 How do APIs work?
4.3 What does an api do?
Topic: Offline; Teaching type: CLO1; LO: I, T
ITU: Slot2.1_API
Download: Read textbook
Learn materrials,
Discuss key points
CLO2: Understand Express, NestJS and Hono framework, operating principles, and methods of building a web server that supports REST API
Session 1: HTTP:
5.1 HTTP Overview
5.2 Receiving an HTTP Request with Express
Topic: Offline; Teaching type: CLO1; LO: U
ITU: Slot2.2_Node&Http
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: NodeJS and HTTP:
6.1 Node.JS HTTP Module
6.2 Node.JS as a web server
Topic: Offline; Teaching type: CLO1; LO: I, T, U
ITU: Slot2.2_Node&Http
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: EXPRESSJS:
7.1 Express Introduction
7.2 Using Express js to create your first program
Topic: Offline; Teaching type: CLO2; LO: I, T, U
ITU: Slot3.1_ExpressJS
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: NODE and EXPRESS:
8.1 Restful routing with express
8.2 Understand and use middleware for node applications
8.3 Types of middleware in node.js
8.4 Writing express middleware
8.5 Express- Generator
- Express Generator Introduction
- Using Express - Generator To Create Your First Program
Topic: Offline; Teaching type: CLO2, CLO3; LO: T, U
ITU: Slot3.1_ExpressJS
Download: Read textbook
Learn materrials,
Discuss key points
CLO3: Be able to use the Express Generator tool to generate Express applications
Session 1: Nosql Databases With Mongodb:
9.1 Nosql Introduction
9.2 Document Databases (Mongodb)
9.3 Create-Read-Update-Destroy (Crud)
Topic: Offline; Teaching type: CLO4; LO: T, U
ITU: Slot3.2_NoSQL-Database-With-MongoDB
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 10.1 Nosql Best Practices
10.2 Mongodb Mongo Shell Features
10.3 NodeJs and MongoDB
Topic: Offline; Teaching type: CLO4; LO: T, U
ITU: Slot3.3_NodeJS-with-MongoDB
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: Mongoose:
11 What is Mongoose
Topic: Offline; Teaching type: CLO4; LO: I, T, U
ITU: Slot4.1_Mongoose
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: Mongoose Population
12 Use Mongoose population to cross-reference users within a comment
Topic: Offline; Teaching type: CLO5; LO: T, U
ITU: Slot4.1_Mongoose
Download: Read textbook
Learn materrials,
Discuss key points
CLO4: Understand MongoDB basics, develop Node applications that work with data through MongoDB and Mongoose ODM
Session 1: 13 Populate the comments with the users’ information upon querying
Topic: Offline; Teaching type: CLO5; LO: T, U
ITU: Slot5.1_Mongoose Population
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 14 Match with mongodb regex
Topic: Offline; Teaching type: CLO5; LO: T, U
ITU: Slot5.1_Mongoose Population
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: REST API with Express, MongoDB and Mongoose:
15 Develop a full-fledged REST API server with Express, MongoDB and Mongoose
Topic: Offline; Teaching type: CLO5; LO: I, T, U
ITU: Slot6_RestfulApi-with-Express-mongodb-and-mongoose
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 16 Implement the end-to-end solution integrating Express, Node and MongoDB
Topic: Offline; Teaching type: CLO5; LO: T, U
ITU: Slot6_RestfulApi-with-Express-mongodb-and-mongoose
Download: Read textbook
Learn materrials,
Discuss key points
CLO5: Be able to implement REST APIs with Express, MongoDB, Mongoose and Mongoose Population
Session 1: 17 Model - View - Controller
Topic: Offline; Teaching type: CLO5; LO: T, U
ITU: Slot6_RestfulApi-with-Express-mongodb-and-mongoose
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: ASSIGNMENT 1
Topic: Offline; Teaching type: CLO5; LO: U
ITU: 
Download: Read textbook
Learn materrials
Redo sample examples
Do Assigment 1

Session 3: Embedded Javascript (EJS):
19 What is EJS?
Topic: Offline; Teaching type: CLO8; LO: T, U
ITU: Slot7_EJS(EmbbedJavascript)
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 20 Understand what EJS does and how to use it with node and express
Topic: Offline; Teaching type: CLO8; LO: I, T, U
ITU: Slot7_EJS(EmbbedJavascript)
Download: Read textbook
Learn materrials,
Discuss key points
CLO6: Be able to implement user authentication mechanisms for applications
Session 1: 21 Templating with EJS
Topic: Offline; Teaching type: CLO8; LO: T, U
ITU: Slot7_EJS(EmbbedJavascript)
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: HandleBars:
22.1 What Is Handlebars?
22.2 Understand What Handlebars Does And How To Use It With Node And Express
23.3 Templating With Handlebars
Topic: Offline; Teaching type: CLO8; LO: U
ITU: Slot8_HandleBars
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: Progress Test - 1
Topic: Offline; Teaching type: CLO1,2,3,4,5,8; LO: 
ITU: 
Download: Do Progress Test - 1

Session 4: ASSIGNMENT 2
Topic: Offline; Teaching type: CLO1,2,3,4,5,8; LO: U
ITU: 
Download: Read textbook
Learn materrials
Redo sample examples
Do Assigment 2
CLO7: Be able to use Backend as a Service (BaaS) to enhance secure communication between client and server applications
Session 1: Authentication And Security:
25 Authentication And Keeping User Details Secure
- Password authentication
- Multi-factor authentication
- Biometric authentication
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 26.1 Encryption And Useencryption To Keep Your Database Secure
- Database Encryption
26.2 Hashing Passwords With Bcrypt
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: 27 Sessions And Cookies
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: Authentication And Security (Cont'd)
28 User Authentication With Passport
- Use Passport Module Together With Passport-Local
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points
CLO8: Be able to use EJB and HandleBar
Session 1: 29.1 use passport-local-mongoose for setting up local authentication within server 29.2 use passport together with sessions to set up user authentication
Topic: Offline; Teaching type: CLO6; LO: I, T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 30 Token Based Authentication
Topic: Offline; Teaching type: CLO6; LO: I, T, U
ITU: Slot9-10_Authentication_and_Security
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: HTTPS and Secure Communication:
31 Configure a secure server in Node using the core HTTPS module
Topic: Offline; Teaching type: CLO6; LO: I, T, U
ITU: Slot11_HTTPS_Secure-communication
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 32.1 Generate the private key and public certificate and configure the HTTPS server
32.2 Redirect traffic from the insecure HTTP server to a secure HTTPS server
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot11_HTTPS_Secure-communication
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: Uploading Files:
33 Configure the Multer module to enable file uploading
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot12_Upload-Download-Files
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 34 Setup Express server to use Multer to upload files to a designated folder
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot12_Upload-Download-Files
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: Download Files:
35 Configure the module to enable file downloading
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot12_Upload-Download-Files
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 36 Setup Express server to use Multer to download files to a designated folder
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot12_Upload-Download-Files
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: Cross-Origin Resource Sharing:
37 Use the CORS NPM module to enable CORS support
Topic: Offline; Teaching type: CLO6; LO: I, T
ITU: Slot13_Cors
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 38 Enable Express application to support CORS requests by configuring the CORS module
Topic: Offline; Teaching type: CLO6; LO: T
ITU: Slot13_Cors
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: OAuth and User Authentication:
39 Use an OAuth providers for authenticating users within server
Topic: Offline; Teaching type: CLO6; LO: T, U
ITU: Slot13_Cors
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 40 Setup server using Passport OAuth modules
Topic: Offline; Teaching type: CLO6; LO: I, T
ITU: Slot13_Cors
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: Progress Test - 2
Topic: Offline; Teaching type: CLO6; LO: 
ITU: 
Download: Do Progress Test - 2

Session 2: ASSIGNMENT 3
Topic: Offline; Teaching type: CLO6; LO: U
ITU: 
Download: Read textbook
Learn materrials
Redo sample examples
Do Assigment 3

Session 3: Backend as a Service (BaaS):
43 Introduction
Topic: Offline; Teaching type: CLO7; LO: I, T
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 44 Hosting static websites with GitHub Pages
Topic: Offline; Teaching type: CLO7; LO: I, T
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: 45 Understand and use to quickly build backend support for applications
Topic: Offline; Teaching type: CLO7; LO: T
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: Deployment:
46 Web hosting
Topic: Offline; Teaching type: CLO7; LO: I, T, U
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: 47 Website Deployment
Topic: Offline; Teaching type: CLO7; LO: T, U
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 48 Deploying Server-Based Applications with Heroku
Topic: Offline; Teaching type: CLO7; LO: I, T
ITU: Slot15-16_Backend-as-a-Service-(BaaS)
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: Frameworks: NestJS:
49 Introduction
Topic: Offline; Teaching type: CLO2; LO: T, I, U
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 50 Installing
Topic: Offline; Teaching type: CLO2; LO: I, T
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: 51 Using Nestjs To Create Your First Program
Topic: Offline; Teaching type: CLO2; LO: T, U
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 52 Overview Techniques
Topic: Offline; Teaching type: CLO2; LO: I, T
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: 53 Overview Techniques
Topic: Offline; Teaching type: CLO2; LO: T, U
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 2: 54 Overview Security
Topic: Offline; Teaching type: CLO2; LO: T, U
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 3: Framework Hono:
55 Introduction and Installing
Topic: Offline; Teaching type: CLO2; LO: I, T
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points

Session 4: 56 Using Hono To Create Your First Program
Topic: Offline; Teaching type: CLO2; LO: U
ITU: Slot17-18-19_Frameworks-NestJS-Hono
Download: Read textbook
Learn materrials,
Discuss key points
Session 1: ASSIGNMENT 4
Topic: Offline; Teaching type: CLO7, 2; LO: 
ITU: 
Download: Read textbook
Learn materrials
Redo sample examples
Do Assigment 4

Session 2: Project Presentation
Topic: Offline; Teaching type: All CLOs; LO: 
ITU: 
Download: Do Project Presentation

Session 3: Project Presentation
Topic: Offline; Teaching type: All CLOs; LO: 
ITU: 
Download: Do Project Presentation

Session 4: Progress Test - 3
Topic: Offline; Teaching type: CLO7, 2; LO: 
ITU: 
Download: Do Progress Test - 3