Backend Development
Our training sessions are meticulously planned by our trainer and are designed in a manner geared toward the maximization of efficiency. Your time is valuable, so our goal is to best prepare you while taking up the least amount of your time possible.
TRAINING SCHEDULE
9-Week Backend Development Training Module (Node.js & JavaScript)
Delivery Methodology:
This course is available in virtual modes.
Course Content
Introduction to Node.js & JavaScript Fundamentals
Introduction to Node.js:
- What is Node.js? Why use Node.js for backend development?
- Install Node.js and use the Node Package Manager (NPM).
- Basic Node.js environment setup
- Overview of the Node.js Event Loop and Non-Blocking I/O.
- Introduction to core Node.js modules: `fs`, `path`, `http`, `URL`.
JavaScript Refresher:
- Variables, Data Types, Operators.
- Functions, Arrays, Objects.
- Understanding scope, closures, and `this`.
- Asynchronous JavaScript
- Callbacks, Promises, and `async/await`.
- Error handling in asynchronous code.
Working with HTTP in Node.js:
- Creating an HTTP server with the `http` module.
- Routing basic requests and responses.
- Creating a basic RESTful API with Node.js.
Practical:
- Build a simple “Hello World” API using Node.js.
- Implement a small app that reads and writes files asynchronously using the `fs` module.
Building RESTful APIs with Node.js
Introduction to REST:
- What is REST? Understanding REST principles (Statelessness, Resource-based URIs).
- HTTP Methods: `GET`, `POST`, `PUT`, `DELETE`.
Building RESTful Routes:
- Setting up routes using the `http` module or Express.js.
- Understanding route parameters and query parameters.
- Handling JSON requests and responses with `express.json()`.
CRUD Operations:
- Create, Read, Update, Delete operations in a RESTful API.
- Implementing CRUD operations using Express.js.
Basic Error Handling:
- Using `try/catch` blocks.
- Creating custom error messages.
- Handling 404 and 500 errors.
Practical:
- Build a RESTful API for managing a simple resource (e.g., tasks or products).
- Implement CRUD operations using Express.js, with error handling for each operation.
- Test API endpoints using Postman or curl.
Working with Databases (SQL & NoSQL)
Introduction to Databases:
- What is a database? SQL vs. NoSQL databases.
- Introduction to MySQL (SQL) and MongoDB (NoSQL).
Working with MySQL (SQL):
- Setting up MySQL database.
- Using the `mysql2` library to connect Node.js with MySQL.
- Performing basic SQL queries (SELECT, INSERT, UPDATE, DELETE).
- Setting up a simple CRUD API using MySQL.
Working with MongoDB (NoSQL):
- Introduction to MongoDB and Mongoose (ODM for MongoDB).
- Setting up a MongoDB database.
- Performing CRUD operations with Mongoose.
- Introduction to schema design in MongoDB.
ORM/ODM:
- Introduction to Object-Relational Mapping (ORM) and Object-Document Mapping (ODM).
- Setting up Sequelize (SQL ORM) for Node.js.
- Using Mongoose for MongoDB operations.
Practical:
- Build an application with both SQL and NoSQL database connections.
- Implement CRUD operations for the same data in both MySQL and MongoDB.
- Compare the different approaches for structuring data in SQL and NoSQL.
Authentication & Authorization
Introduction to Authentication & Authorization:
- Difference between Authentication and Authorization.
- Why use JWT (JSON Web Tokens) for authentication?
User Authentication:
- Implementing user sign-up and login with Express.js.
- Introduction to Passport.js for handling authentication.
- Storing user passwords securely with bcrypt.
JWT Authentication:
- How to generate JWT tokens for user sessions.
- Protecting routes with JWT and middleware.
- Token expiration and refresh tokens.
Role-based Access Control (RBAC):
- Implementing role-based access control in a Node.js application.
- Protecting routes based on user roles (admin, user, etc.).
Practical:
- Create a login and registration system using JWT.
- Implement middleware for role-based authentication (e.g., only admins can access certain routes).
- Secure your API with token-based authentication.
Middleware & Error Handling
Understanding Middleware:
- What is middleware? How does it work in Express.js?
- Built-in middleware in Express.js (`express.json()`, `express.urlencoded()`).
- Creating custom middleware for logging, validation, etc.
Advanced Error Handling:
- Handling asynchronous errors in Express.
- Custom error handling middleware.
- Sending appropriate HTTP status codes and error messages.
Request Validation:
- Using libraries like `Joi` or `express-validator` for input validation.
- Handling bad requests and sending meaningful error responses.
Logging Requests:
- Logging requests with `morgan` or `winston`.
- Understanding request life cycle.
Practical:
- Implement custom middleware for logging and authentication.
- Create custom error-handling middleware.
- Validate request bodies with `express-validator`.
Deployment, Testing, and Best Practices
Testing Node.js Applications:
- Unit testing with Mocha and Chai.
- Writing integration tests for REST APIs
Deployment:
- Setting up a production environment with Docker.
- Deploying a Node.js app on Heroku or AWS EC2.
- Environment variables and configuration management.
- Continuous Integration (CI) and Continuous Deployment (CD) pipelines with GitHub Actions.
Performance Optimization:
- Caching with Redis for performance improvement.
- Load balancing and scaling applications.
- Optimizing database queries.
Best Practices:
- Code structure and project organization.
- Using environment variables for configuration.
- Keeping sensitive data safe (e.g., database credentials, API keys).
Practical:
- Write unit and integration tests for your app.
- Dockerize your application and deploy it to Heroku.
- Optimize and deploy your app using CI/CD.
Understanding Cross-Origin Resource Sharing (CORS)
- Enabling CORS for Secure Web Applications
- CORS Configuration and Best Practices
HTTPS
- Securing Web Traffic with HTTPS
- Implementing HTTPS: Certificates, Encryption, and Redirects
- HTTPS Best Practices and Troubleshooting
SQL
- SQL Injection
- Preventing SQL Injection
- Best practices
Build a Full-Stack Web Application
Project Requirements:
– A RESTful API built with Node.js and Express.js.
– User authentication using JWT.
– Store data in a SQL or NoSQL database.
– Implement CRUD operations for a specific resource (e.g., users, posts, comments).
– Secure routes and manage different user roles.
– Add error handling and validation.
– Dockerize and deploy the application on a cloud platform (Heroku, AWS).
Key Deliverables:
– A fully working backend with RESTful API.
– Authentication system (JWT).
– Deployment to cloud (e.g., Heroku or AWS).
– Complete source code repository (GitHub).
Conclusion & Certification
At the end of this 9-week training, you’ll have gained hands-on experience in backend development with Node.js, from building APIs to deploying them in production. This module prepares you for creating real-world backend applications using best practices.
Online Class
For Individual
Date: The course will be held on Saturday 13th July, Saturday 20th July, and Saturday 27th July 2024.
Time: Class runs from 10 am – 5 pm. Participants are entitled to an hour refreshment break.
Attractions: Lunch, Parking spaces, Wi-fi connectivity, Course materials, Gift items and more