StrongLoop Certified Node Developer Study Guide
The guide below elaborates on the key concepts that will be covered in the exam. It provides some online resources to learn or brush up on the stated topics.
Concepts covered in the exam include:
1. What is Node?
There are two additional videos worth watching that introduce the fundamentals of Node:
2. Working with npm and modules
3. Node Concepts
The exam will test your knowledge of these core Node concepts:
- Event loop: An event loop is “an entity that handles and processes external events and converts them into callback invocations”.
- Callbacks: At an I/O call, your code saves the callback and returns control to the runtime environment. The callback will be called later when the data actually is available.
- Event emitters: In Node.js an event can be described simply as a string with a corresponding callback. An event can be “emitted” (or in other words, the corresponding callback be called) multiple times or you can choose to only listen for the first time it is emitted.
- Streams: The main tool in Node’s evented toolbox is the Stream. Stream instances are basically Unix pipes. They can be readable, writable or both.
- Buffers: Buffers are instances of the
Bufferclass in Node, which is designed to handle raw binary data. Each buffer corresponds to some raw memory allocated outside V8.
4. Working with Express
The Express framework is arguably one of the most popular npm modules and what many developers start and build applications with.
What is Express? Express is a minimal and flexible Node-based web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications. For the purposes of the exam you should know how to build a basic web application using Express.
5. Working with the Process API
process object is a global object and can be accessed from anywhere. For the purposes of the exam you should understand signal events, accessing environmental variables and dealing with child processes.
6. Error Handling
Error handling in Node can be tricky so it’s import to understand how to do proper error handling. The exam will test your understanding of:
- Domains: Domains provide a way to handle multiple different IO operations as a single group. If any of the event emitters or callbacks registered to a domain emit an
errorevent, or throw an error, then the domain object will be notified, rather than losing the context of the error or causing the program to exit immediately.
- Exceptions: In Node, errors can occur either explicitly, implicitly, on an error event or as a callback argument.
- Error objects: The error object is a built-in object that provides a standard set of useful information when an error occurs, such as a stack trace and the error message.
Adam Crabtree of Linkedin has done an excellent presentation on the fundamentals of control flow and error handling. You can watch his presentation here.
WebSockets in Node commonly manifest themselves when developers make use of the socket.io framework. WebSockets is a protocol providing full-duplex communications channels over a single TCP connection. For the purposes of the exam, you should have a basic understanding of how WebSockets work, why they are advantageous in Node and how they can be integrated into your application with the socket.io framework.
8. Clustering and Multi-Process
Before deploying a Node app, it’s important to understand what your options are for scalability not just around performance, but also for uptime. For the purposes of the exam you should have a general understanding of how Node’s Cluster API works and how it might be leveraged to create scalable applications.
For the purposes of the exam it it’s import to understand some of the fundamental tasks you’ll need to preform in the application deployment process. For example high-availability, clustering in multi-core environments, zero downtime deployments and log rotation. Qasim Zaidi has put together an excellent “Node in production” post on these topics.
It is important for Node developers to have an understanding of what development tools are at their disposal and how to leverage them. For the purposes of the exam, you should have a general understanding of the following tools:
- Debugging: Understanding the built in debugger and Node inspector
- Memory leak detection: Using event listeners to catch memory leaks