Even though Node.js has been around since 2009, 11 years so far, the web framework options are still very limited, basically you have two main paths:
- To choose Express.js and then build something kinda reliable on top of it by yourself
- To choose something based on top of Express.js and built by somebody else
Combine it again and again đ€Ż
To be honest I am not fan of the first path, if not say more, you have to combine multiple packages, choose template language, ORM, think about error handling, logging, folder structure, body parser, security, authentication, authorization, validation and many many other little aspects that are not really cool to deal with, basically you waste your developer time to a battle that may not be won. I tried this way, It blew my mind, I did not like it.
High hopes đ€
The second path is the path I tried multiple times. Sails.js was my hope at that time, being based on express.js it was pretty promising, but no luck. Then Feathers, LoopBack, Kraken, Keystone - no luck, all these tools were just okay really, nothing that may be compared to Ruby on Rails or Laravel.
A revelation đ€
It was 2014 outside, I lost my hope and started digging Ruby on Rails to finally stop and find something production ready, a developer heaven. That was a revelation of how a framework and an ecosystem around it should work and should be built.
While still working with Rails full-time I was looking for something new in Node.js web-frameworks world that may catch my eye and make me somehow try it. I've been googling here and there and then finally found something new that was really different - Adonis.js.
Adonis.js - the god of beauty on a Node.js Olympus â°ïž
Adonis is built with developer happiness in mind, inspired by Laravel and Rails, very structured and opinionated from the very beginning, the new v5 uses Typescript everywhere (but you still can use plain JavaScript).
It is created from the ground up by a very talented engineer Harminder Virk, has a nice and vibrant community and multiple packages that extend possibilities even more.
Basically, Adonis is an integrated system, and it serves you well in a myriad of situation. You'd like to create an API, no problem, just don't install views and then serve JSON directly, you'd like to serve views, no problem it has its own Edge temple engine, a very advanced one, you'd like to use PostgreSQL or MySQL or combine them, no problem, it has it's own Lucid ORM based on top of Knex.js and typed through out, it has validations, security, caching, routing, folder structure, service providers and many many other little things that will definitely make you happier. Using Adonis you don't have to spend hours and hours combining things, you take your idea on paper and implement it in a flawless way.
I used Adonis for some of my pet and commercial project that I built for the last 3 years, it had it's own problems and caveats but the way it improves and develops makes me confident about its future.
You may learn more about it here adonisjs.com, here Github Discussions and here @adonisjs.
Top comments (6)
I've had adonis on my radar for months but still couldnt find the time to give it a try. I just check their site and realized it has Typescript support out of the box, which is a big plus.
I would say that overall it is ready for production, most components are ready and work well, you may encounter lack of rewritten community packages, but this is a matter of month or two. I use v5 in production without any problem, but this is really very specific to your use case.
I also had Adonis on my radar. I do enjoy working with micro-frameworks like Express, Flask, and Slim, as they are easy to set up and are very lightweight but combining libraries and so forth can be time consuming and a pain if you're on a deadline, which is why I think these types of tools are better suited for websites, REST APIs and very small apps. More traditional or complex apps require something well structured, like Laravel, or Django, so I've been hoping to see something like that in Node.js, and I think Adonis might be the answer I've been looking for. Typescript, web sockets, sessions and included ORM are a huge plus!
Hi Chirill, thanks for the info - I have been looking into using a nodejs framework similar to Django and have come down to two options - FeathersJS and AdonisJS. You mention you tried both, and obviously Adonis was you choice. Could I ask about your impressions on feathersjs and how it compares to AdonisJS, why Adonis was your choice in the end? Thanks!
What about nestjs.com? Did you try? Can you compare?
I tried it, but as as I understood it is heavily inspired by Angular, follows its module pattern and etc. what is a bit weird for me after Rails, so can't say anything about it.