Exploring Node.js Frameworks
Tags: node, beginners, typescript, javascript
Published: 2021-05-01 12:35:36

# Intro

I've spent a fair amount of time coding with javascript and Node.js, Mostly working with express and AWS serverless. 

Today, while I was reading up on more advanced Node.js concepts and refreshing my basics to keep my skill sharp, I ran into the section where node.js recommended several frameworks. Now I've worked with some of them and heard of most of them but never actually experimented with them. In order to stay with the growing market trends, I wanted to spend several hours exploring the different frameworks and the pros and cons of using them, from a beginner's perspective at least.

## Adonis.js - [Link](https://adonisjs.com/)

Adonis happened to be one of the frameworks I have never had the chance to run into, so I dived into installation with a lot of questions and doubts. Due to my familiarity with coding, the installation seemed a bit easy but the default application boilerplate was a bit overwhelming and might take a decent learning curve to get a complete understanding of. However, the code seems to be fairly encapsulated and well structured. But the hassle of the learning curve didn't seem worth the further exploration (At least at the initial stage, I will be diving into deeper research at a later date.)

#### Overall I give the first impression a 4/10;

## Egg.js - [Link](https://eggjs.org/en/)

Egg.js similar to Adonis was something new to me. However, the installation didn't require many steps and I was able to generate an app fairly quickly. Probably due to my experience with the MVC pattern the code structure was a lot more intuitive and I was able to create a sample API pretty fast.
This is definitely a framework I will give another attempt at.

#### Overall I give the first impression a 6/10;

## Express.js - [Link](https://expressjs.com/)

Express.js is something I've used for years so I'm going to withhold most comments on this. but since express doesn't exactly come with a project generator out of the box, I used a recommended package to do so. Unlike the above two frameworks, Express without Nodemon didn't watch for changes and I thought that was worth mentioning. 

#### Overall based on the previous impressions I give it a 6/10;

## Fastify [Link](https://fastify.io/)

Fastify was one of the most interesting frameworks I got to try. I enjoy minimal and elegant code and the simplified code required by Fastify was super nice. I didn't run into any Fastify generator so I'm guessing we can use a Yeoman recommended or an industry-accepted coding structure to create a flexible project. I will definitely be using this framework for quick PoC and Idea validations

#### Overall I give the first impression a 9/10;

## Gatsby.js - [Link](https://www.gatsbyjs.com/)

I have had the chance to work with Gatsby once and despite my initial intention. Which was to judge the frameworks in order to create intuitive and simple APIs. Gatsby.js is a pleasant surprise. It allowed me to create a complete server-side application with an easy-to-use coding structure. It is definitely a good choice if I'm building documentation, landing pages, or any informative content. Definitely a choice I will be making in the future.

#### Overall I give the first impression an 8/10;

## Hapi.js - [Link](https://hapijs.com/)

Hapi installation instructions were a tad bit confusing for me for some reason. I still managed to get a basic server running. But the basic code scaffolding for a simple REST API endpoint was too much. Due to the purpose of Hapi, I'd recommend using it for medium-large scale projects. Since it was created focus on logic reuse.

#### Overall I give the first impression a 5/10;

## Koa - [Link](http://koajs.com/)

Koa is a framework build with the help of express, so those who are familiar with Express will feel comfortable with Koa. The added benefit of the code is that it's slightly simpler and smaller. I was able to get the installation and a server up with extreme ease and I will be doing a deep dive on Koa to see why it might be a better choice over Express.

#### Overall I give the first impression a 6/10;

## Loopback.io - [Link](https://loopback.io/)

I had heard of loopback several years ago but never actually gave it a try. The installation took a bit of time (It might have been my internet, who knows) but the application generated a fair bit of boilerplate code. After a few minutes of skimming through the code, it seemed to be fairly similar to an MVC pattern. The code structure itself was alright but seemed oddly overwhelming for a beginner in my opinion. The biggest plus point I noticed was the Typescript supported project which was very nice. I might consider Loopback for solution development with typescript in the near future.

#### Overall I give the first impression a 7/10;

## Meteor.js - [Link](https://meteor.com/)

MeteorJs has been popular for a long while now, and I've attempted meteor with Angular when it was released but haven't used the framework since then. The Biggest factor I noticed was the fact that it was very compatible with a lot of frontend frameworks with mobile support. But, since my main focus was for Backend I didn't dive much deep into the first code. As for the code structuring, generation, and installation. There was a small snag with installation but overall it wasn't a bad experience. 

#### Overall I give the impression a 6/10;

## Micro.js [Link](https://github.com/zeit/micro)

Micro was the best framework I found that fit my overall goal. It stands true with its name, it is extremely lightweight and small that which caught me off guard. The code was so simple and there was no scaffolding needed to get a basic endpoint. With the function declaration and Simple response string, the code was 3 lines and a working API.
I will definitely keep Micro.js as my first choice whenever I need a quick and easy API. However, I will keep reservations about this library for any production-level work. Simple is good but I'm still not aware of the drawbacks it may hold. I will definitely do further research on the viability of Micro.js with Enterprise applications.

#### Overall I give the first impression a 10/10;

## Nest.js [Link](https://nestjs.com/)

Nest.js is a very compact Typescript-based node.js framework that was actually built quite nicely. I enjoy working with typescript and the generated code was actually very similar to Angular. So anyone familiar with Angular might find themselves and home with this framework. As a beginner to Backend but with some knowledge in Typescript, this would definitely be a good choice. I might explore this further at a later date.

#### Overall I give the first impression a 7/10;

## Next.js [Link](https://nextjs.org/)

Next.js is a React Framework I have heard of but not exactly worked with. After a few minutes into the installation, I actually found the code structure and its intuitiveness pleasant to work with. It was simple and elegant and I was dumbfounded when I was messing around with it. When it comes to faster development cycles I will definitely consider Next.js as an option.

#### Overall I give the first impression a 9/10;

# Conclusions

I did test a few more frameworks but didn't spend enough time to include them in this article. I will however add a follow-up article on those and some deeper explorations on a few selected frameworks from this article.

Just wanted to let any readers know, that these speculations are purely based on my personal opinions and if you think I'm incorrect please let me know, I would love to learn more and improve myself.

If anyone is interested in a collaborative article hit me up :)

# TLDR;

An Engineer spent several hours trying out Node.js Frameworks and found a few interesting ones he liked.

Follow me on social media.
Cheers :)