AdonisJS is a great server-side framework built on Express. It’s opinionated way of doing things just makes sense, clears up the initial development problems, and makes development & maintenance easier.
I have completed ~3 projects on AdonisJS so far after switching roles to a web application developer last year. After using FeathersJS, Laravel and a bit of .NET, I find myself increasingly becoming comfortable with what AdonisJS can offer.
Here’s why you should use AdonisJS (my opinions - I am often wrong) -
- You need a functioning Javascript back-end today
- You need a framework that is developer-friendly, provides a comprehensive set of features, and allows easy customization
- You are creating a data-driven application or an application that relies on backend to a fair degree
- You are switching from other structured frameworks like Laravel or .NET, and want a comparable framework
- You need your team to follow an uniform code structure that is already decided for you. Adonis’s structure is clean, and super functional
- Small footprint back-end that is fast - without compromising on features
- Make your life easier with scaffolding tools that generate Controllers, Models, Seeds & Factories and the like
- Great documentation
- Easy unit tests
- Easy migrations across environments
Digging deeper -
- A fully-featured, fast ORM in Lucid. This is the layer that abstracts database from your server logic - you want it to be stable, fast, and error-free
- Great dependency management using IOC containers and service providers
- A fast validation provider
- Redis support out of the box
- A great command line tool (Ace) that works really well
- Add-ons like scheduler, ACL, Persona that sit on top of Adonis and some of the well-known libraries encourage you to fully leverage the power of block-building enabled in Node
You may not want AdonisJS right now if -
- You have money to spend and don’t quite care about the back-end. You are better off using something like Firestore. If you are that - stop reading now and get back to your clicking.
- You are looking for seamless GraphQL support. Yes, there are extensions that integrate the older Apollo v1. But then, there are other frameworks that box everything together in a nice package
- You need a beautiful full-stack application in a single package. The right question to ask yourself - which decade are you from and where were you all these days? Btw, Adonis does provide a front-end - I am not a fan of Edge, but that’s only me.
- You want CMS features delivered out of the box. You are better off looking at something like StrapiJS
- You are looking for the cutting edge features delivered to you at a rapid pace. There appears to be a lot of onus on stability - a good trait but hard to be found in smaller frameworks. AdonisJS community is smaller but active nevertheless.
- You need ‘official’ enterprise support. Your team can solve all the problems they encounter and the community is great
Alternatives -
- NestJS - if you want a larger community, more add-ons, and GraphQL support. On the flip side, it lacks structure, it is not as ‘clean’ (subjective) as AdonisJS, and documentation is not as good. There are discussions about making GraphQL a first-class citizen in next major version, but I can’t confirm or deny that.
- .NET Core and Blazor - If you are looking at web-assembly future. And yes - this is full-stack in one package. I was eating my words around ~2015, and then again will be doing that somewhere around ~2020. Not a pretty sight.