NestJS is a framework designed to make the developer’s life easier, using the right architectural approaches and dictating its own rules.
Therefore, NestJS is not only a backend framework, but also an opportunity to enter the world of advanced concepts, such as DDD, Event sourcing, and microservice architecture. Everything is packaged in a simple and lightweight form, so the choice is yours — whether you decide to use the entire platform or just use its components.
For a long time most people wrote on ASP.NET, then there was the frontend on AngularJS. In October 2016, there was a switch to Angular and Typescript. And here it is! Typing in the frontend, you can do complex things quite easily! Before that (development on nestjs) on node, developing only for fun, and somehow there was even an attempt to introduce good practices and typescript into the popular Koa. But NestJS is still a little different.
It is considered the starting point of a journey into the world of modern web application design concepts such as microservice architectures, Event Sourcing and Domain Driven Design. This framework was created taking into account the support of server scripts and the possibility of creating server applications with its help. Among the main features of this framework are the following:
NestJS is based upon Typescript which enables developers to add types to our variables and provides compile errors and warnings based on them.
Modular structure, the use of which simplifies the division of the project into separate blocks. It facilitates the use of external libraries in projects.
NestJS contains a built-in DI container. Dependency Injection is a design pattern that is used to make our applications more efficient and modular. It is often used to keep your code clean, easy to read and use.
It supports the modular organization of projects, which are built in accordance with the belonging of each logical part of the project (module) to a certain subject area.
Using NestJS simplifies testing by supporting features such as DI containers and modules.
The framework allows you to create extensible software solutions where there is no strong coupling between the components.
The Nest microservice is just an application that uses a different transport layer (not HTTP).
Nest supports two types of communication — TCP and Redis pub/sub, but the new transport strategy is easy to implement by implementing the CustomTransportStrategy interface.
With this establishment, Nest is a platform independent framework, that makes it possible to create and reuse logical parts in different applications. With Nest there are no limitations, you can design a simple web application or a complex possible idea an application can do. You can also employ Nest JS across platforms. You can access specific platform functionalities from @nestjs/platform-express
Nest framework supports middleware, exception filters, pipes, guards, interceptors, GraphQL, Websockets and many other components. Each of these components are available in their own folder, with an application module and a main file residing in the root with additional configuration files. This mechanism removes unnecessary attention and lets you focus on the design and delivery.
Nest JS is in a unique place that many languages have struggled to establish. For every one who is acquainted with Angular, Nest JS is a breeze. The framework aims to benefit mid-tier workers, without compensating a clean finish. The folder view lets you get an organised overview with the awareness of what goes where. And last it uses TypeScript, that provides a perfect landscape for developers. Nest uses a decent CLI, through Package Manager, where you can access the documentation of the architecture at ease.
NestJS is a relatively new solution in the field of backend development, with a large set of features for quickly building and deploying enterprise services that meet the requirements of modern application clients and adhere to the principles of SOLID and twelve-factor applications.