NestJS Roadmap for Beginners

Getting started with NestJS — a tutorial for beginners.

Santosh Shinde
JavaScript in Plain English

--

Introduction

Nest (NestJS) is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript (yet still enables developers to code in pure JavaScript), and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).

Building a platform: Nest from the ground up Kamil Mysliwiec
JSPoland Warsaw 2018

Why use NestJS?

Nest provides a level of abstraction above these common Node.js frameworks (Express/Fastify) but also exposes their APIs directly to the developer. This allows developers the freedom to use the myriad of third-party modules which are available for the underlying platform.

There are superb libraries, helpers, and tools that exist for Node (and server-side JavaScript), none of them effectively solve the main problem of — Architecture.

Nest provides an out-of-the-box application architecture that allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by Angular.

NestJS Overview

Features of NestJS

  • Extensible Approach
  • Easy to use, learn and master
  • Command Line Interface(CLI)
  • Versatile
  • Progressive
  • Implemented Based on SOLID Principles
  • Lazy and Dynamic Modules
  • API Versioning
  • Documentation
  • Open Source
  • Large & Active Community

NestJS Roadmap

Few Core topics every Nest Developer should know:

  • Controllers
  • Providers
  • Modules
  • Middleware
  • Exceptions and Error Handling
  • Pipes
  • Guards
  • Interceptors
Nest JS Roadmap (v1)

NestJS is having a great ecosystem with a huge set of libraries. It does not make sense to know each and every library but yes having an understanding of at least the most commonly used adds value.

Please check the official documentation of NestJS as they are having detailed documentation for each component.

NestJS Request & Response Lifecycle

Nest applications handle requests and produce responses in a sequence we refer to as the request lifecycle.

With the use of middleware, pipes, guards, and interceptors, it can be challenging to track down where a particular piece of code executes during the request lifecycle, especially as global, controller level, and route level components come into play.

In general, a request flows through middleware to guards, then to interceptors, then to pipes and finally back to interceptors on the return path (as the response is generated).

Nest JS Request & Response Lifecycle

Please do share your comments and give a clap if this blog added value to your learning.

NestJS V8

More content at plainenglish.io

--

--