Introduction to Server Side Javascript with Node.js

Course Description

Node.js is a server side javascript framework that has gained a lot of popularity over the last number of years. If you are a web developer who is familiar with PHP, .NET, Java or any of the Java server side technologies and would like to understand how Node.js works then this would be an excellent introduction to what is possible. Node.js is very developer friendly and there can be a lot of productivity gains obtained by using javascript for server side development. This course focuses on node.js and the express framework to create a web server or web application. It will use mongodb as the database and will conclude with a brief introduction to the Angular framework. At the end participants will have a good understanding of the MEAN stack (Mongo, Express, Angular and Node.js) but even if you are not planning on using Angular understanding Node.js and Express could transform your approach to web applications.
3 Days
€995.00
28-30 Aug, 27-29 Nov
18-20 Sep, 11-13 Dec

Prerequisites

Some server side programming experience would be useful but is not mandatory. If you are a programmer who is new to web technologies then this course is a good introduction to developing server side applications using javascript.

We can customise this course to match your architecture. If you use a different database, templating engine, build pipeline or development environment then we can tailor the course to match your environment.

Introduction

Server side technologies overview
Introduction to node.js
Introducing the development environment
Installing node.js and npm
What is package management?
Initialising a new application - npm init
Adding dependencies
Hello world script
Running the script

Development Techniques

Running your application
Debugging your application
Test driven development
Adding commands to package.json
Automatically rerun your server (nodemon)
Get your browser to auto refresh
Installing your application on a web server
Running your application

Core node.js development

General javascript
Some ES6 features we will use
The require function
The module pattern
Using an iife (immediately invoked function expression) to initialise your module
Object oriented javascript
File I/O
Event driven programming using EventEmitter

Asynchronous Programming

Making an asynchronous call from your server
Callback functions
The this object and arrow functions
Promises
The node.js event loop, timers and nextTick()

Express

What is express?
Creating a simple web server using express
Creating an endpoint
Passing parameters
Returning content
Returning json
Redirects
Routing requests
Configuring Express to serve static content
The request and response objects

Using mongodb

Introduction to mongodb
Installing and running mongodb
Creating a database and some test tables
Simple inserts and queries
Adding Mongoose to your node.js web application
Making some simple calls to mongodb
Return json

Creating a RESTful web service with Node and Express

Understanding Routing in Express
Creating REST style endpoints
RESTful verbs / methods
Reading from the database (Get)
Modifying the database (Insert, Update, Delete)

Middleware

app.use()
Chaining calls with next()
Creating a simple filter chain
Using sessions and cookies
Create your own middleware module
Creating a simple authentication mechanism using middleware

Templating

Templating engines ejs & jade
Configuring a template engine
Express.render()
Partial files and includes
Passing parameters to a template

Introduction to Angular

What is Angular?
The history of Angular; what is difference between angular.js and Angular?
Which version should I use?
Understanding the Angular philosophy
Creating a simple Angular application

JavaScriptMEANnode.jsModern Web DevelopmentWeb DevelopmentFullStack Web Development