Node.js Essentials Course
2-day advanced JavaScript course in Node.js — NOD
JavaScript Training Course Overview
This Node.js training course, is targeted at web developers, who are good JavaScript programmers. It is designed as both a general introduction to the Node.js library, and as a practical introduction to using Node.js as a platform for building web applications.
This first half of this JavaScript training course concentrates the basics of installing, configuring and using Node.js, including: installing and using Node.js modules (NPM packages); creating and running command line JavaScript programs; creating, running, and interacting with customised web servers via the Connect library/framework.
The second half of the course takes delegates through the process of building and deploying a simple, but complete, web application using the Express.js library/framework. Through that process, students will learn how to manipulate JSON records; interact with databases; use websockets; emit and receive events via websockets; integrate and test their application.
Course contents — 1 Introduction to Node.js
- What is Node.js?
- Standalone JS virtual machine (V8)
- Extensions for general programming
- Features: what can Node.js do?
- Server-side JavaScript
- Servers/clients for any net protocol
- Typically replaces web stacks, e.g.
- Apache/Tomcat+PHP, Ruby on Rails
- Why should you use Node?
- Asynchronous events vs. threads
- Performance
- Server utilisation
Course contents — 2 Getting Started
- Selecting a Node.js installation process
- OS packaged installations
- Mac, Windows, Linux
- Source code installation
- Installing the package manager (npm)
- Running commands
- To test your installation
- Command-line tools, incl. REPL
- Launching a server
- Interacting with a server script
- Starting Node servers at system startup
Course contents — 3 NPM Modules
- Understanding modules
- The
require()
function - Module scopes
- Module caching
- Finding NPM modules
- Using modules
- Maintaining modules
- Using the npm command
- Creating modules
- Getters and setters
- JavaScript patterns
Course contents — 4 Command Line Scripts
- Getting user input
- Reading arguments
- Parsing command lines with Optimist
- jQuery selection without the browser
- Building command-line tools
- Restarting scripts automatically
- Validating JavaScript code
Course contents — 5 Web Servers
- Responding to requests
- Using Connect
- Reading request data
- Sending different response types
Course contents — 6 Building an Express app
- Creating an Express app/project
- Organising/structuring the app
- Generating HTML views with Jade
- Navigating datasets
- Filtering data
- Request variables and routes
- Posting data
- Modifying data through PUT requests
- Handling GET requests returning JSON
- Modifying HTTP response headers
Course contents — 7 WebSockets
- Instant 2-way client-server comms.
- Native browser support
- Node.js and websockets: Socket.io
- Emitting and receiving events
- Communicating with individual sockets
- Messaging across sockets
- Implementing chat interfaces
- Handling event types
Course contents — 8 Databases
- Why MongoDB? Document-oriented
- Connecting to with Mongoose
- Encapsulate DB access in models
- Define a Schema
- Define a Model
- Use validators, modifiers, getters, virtual attributes, default Values
- Define instance methods and static methods
- Reference other docs via DB Refs
- An alternative: connecting to MySQL
- Using node-mysql
Course contents — 9 Testing
- Unit testing methods
- Isolating blocks of code
- The Mocha test framework
- Testing HTTP with SuperTest
Course contents — 10 Conclusion
- Hosting Node projects
- Node.js sites and resources
Dates for Online courses
Dates for Barcelona
Dates for Milan
Dates for Rome
Dates for Florence
Dates for Frankfurt
Dates for Bologna
Dates for Amsterdam
Dates for Berlin
Dates for Paris
Dates for Cologne
Dates for Brussels
Dates for Dublin
Course Objectives
On completion of this JavaScript training course, you should be able to:
- Understand what Node.js is
- Appreciate the advantages and disadvantages of Node.js based web apps
- Select and use popular Node.js libraries
- Use Optimist for parsing JavaScript commands
- Manage HTTP requests using the Connect framework
- Create server applications using the Express framework
- Debug and test web applications using Mocha and SuperTest
- Integrate Node-based applications with MongoDB and MySQL DB
Target Audience
- Experienced JavaScript programmers
- General programmers with some JavaScript knowledge and substantial web development experience
Training Pre-requisites
Successful completion of the following 3-day JavaScript course; or equivalent knowledge and experience:
Training Style
This JavaScript training course, is instructor-led, hands-on practical training.
Hands-on practical work will take 40% to 60% of the contact time, depending on the needs, abilities and experience of the training group.