See all articles

Node.js & Frameworks - guide for beginners

Node.js is a wonderfully multi-purpose technology. It’s efficient, performant, fast to use, and it supports good collaboration within the development team. It also offers a free toolbox, full of solutions helpful in a number of contexts. We’ve prepared this Node.js beginner guide with an overview of the most important frameworks, to help you determine whether this JavaScript runtime environment is for you.

What is Node.js

Node.js is an open source runtime environment that executes JavaScript code. It’s cross-platform and used for the back end of applications to produce dynamic web content. Because it operates outside of web browsers and is based on JavaScript, Node.js allows development teams to build nearly any web app fully in this programming language.

What’s it used for? Thanks to its event-driven architecture and asynchronous I/O capabilities, Node.js became a popular choice for applications with real-time functionality, such as streaming. Netflix uses it, along with IBM, LinkedIn, Microsoft, PayPal, SAP, and Amazon Web Services.

Node.js frameworks - a guide

Due to its popularity, Node.js offers a vast array of attractive frameworks. They allow development teams to focus on delivering specific features and experiences. They also make Node.js app development more efficient. Let’s take a look at our top picks and what they are best at.

Express

This one is more of a routing library with middleware support than a proper framework. Some Node.js developers call it a minimalist framework. Express is used for building complete applications or APIs. Its current version is 4.17, and the project has gathered around 54 000 stars on GitHub. It was created by the same company that’s responsible for Loopback - StrongLoop, an IBM company. We find the Express framework great for smaller apps or microservices.

Koa

Conceptually, Koa is similar to Express - and it is designed by the team behind Express. It’s a very minimalistic framework powered by middleware. The current version is 2.13, and the project has some 31 000 stars on GitHub. Just like Express, it’s a great option for smaller apps or microservices.

Hapi

This framework provides a plugin-based architecture with separate modules. Hapi contains authentication, validation, and templates rendering. It provides plugins for common functionality like SQL (via the `sequilize` library), MongoDB, as well as AWS or Algolia search. 20.1.5 is Hapi’s current version, and the project has around 13 000 stars on GitHub. It’s developed by multiple open-source contributors. We like it for smaller apps or microservices.

Loopback

This API framework includes: DI, SQL support (via entities and repositories), authentication, and authorization. It’s current version is 4, which has around 4 000 stars on GitHub. Loopback is developed and supported by StrongLoop, an IBM company. To us, it seems to contain Java ideas ported to Node.js - e.g. dependency injections, authentication rules, and route paths defined via annotations. (For more examples, check out Loopback’s official docs here and here). In our opinion, the framework could work well for enterprise software development. It’s definitely a tool for bigger teams.

Nest.js

Nest is a framework that provides building blocks (controllers, middleware, interceptors, a CQRS system, web-sockets, and GraphQL support) for creating web applications. It uses Express under the hood but also requires additional libraries (ORM) if you want to build a fully featured app. Nest.js also fully supports TypeScript.

Its current version is 8.0.6. The project has about 39 000 stars on GitHub. It’s created by Polish programmer Kamil Myśliwiec, and seems similar to `Loopback` - it relies on decorators heavily to specify route paths, injected parameters, etc. It also requires external libraries for ORM, authentication, and so on. Nest looks like an option for enterprise software development, and a framework ready to support bigger teams.

Sails

This full stack MVC framework was inspired by Rails. Sails includes authentication and authorization (via policies), file uploads, ORM, and web-sockets support. 1.0 is its current version, and the project has some 22 000 starts on GitHub. It is mainly developed by 2 people, Scott Gress and Mike McNeil, backed by the Sails company. According to their website, Sails is used by big players like Microsoft, Dell, Verizon, and Philips.

AdonisJS

Adonis is a full stack MVC framework that provides authentication (including 3rd party services like Facebook, GitHub, Google, etc.), SQL ORM, migrations, file uploads, mailing, validations, and support for testing (most of the packages that are used within the framework have been handwritten just for it). It uses modern ES features like async / await. The current version is 4.1, and the project has around 11000 stars on GitHub. It’s mostly developed by single person, Harminder Virk, with help of other developers. They are currently working on version 5 and have many supporters on Patreon.

Conceptually, AdonisJS looks similar to Rails (both are RAD-type frameworks), but it is more flexible - you can pick up the modules you need. Although it’s not as popular as the other frameworks mentioned here, it looks really polished and well designed. It uses the concept of DI (Dependency Injections) with plugins. Adonis also has all the batteries included to develop modern backend applications. We would recommend giving this a try if you are an SME or a startup.

MeteorJS

This open-source framework helps build web, mobile, and desktop applications with JavaScript. It allows you to create solutions using your favorite frameworks like React or Vue that work on all platforms, whether you are developing for iOS, Android, Web, or Desktop.

Meteor automatically manages the data flow between cloud and client applications, as well as the client UI state and rendering, regardless of which UI framework you use. You can also use Meteor with GraphQL or REST if you prefer. What’s more, you can easily install Meteor on Windows, Mac OS, or Linux. It’s easy to start using it, as the official website offers many tutorials that will help you discover and practice the core fundamentals of the framework.

Looking for Node.js web development experts? Or maybe you need a cross-platform solution?

iRonin.IT provides full project teams as well as team extension services using top technologies.

Similar articles

Previous article

Setting up QA processes and teams