Through Sails and Rails to AdonisJS

AdonisJS, Development, Opinion ・ Apr 21, 2022

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:

  1. To choose Express.js and then build something kinda reliable on top of it by yourself
  2. 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.