Tree days ago there was a BIG update. AdonisJS 5.0 Preview is released and we have waited for this for so long.
This tweet is from January
Adonis Js@adonisframeworkI heard that people like good news... 👀
Adonis 5 Preview will be released by the end of the month with a brand-new website and documentation!
In addition, @AmanVirk1 is recording few videos to cover the behind the scene of all the work made on this version.18:35 PM - 08 Jan 2020
and just 4 days ago
reasonably, this isn't that long. But for me at least, I wanted to test it so badly that I couldn't wait. I forked some modules and played with them before the release date. I liked the ideas behind Adonis from the beginning and even built and shipped projects with it back when version 3 was the latest.
I had so much fun when this was released! I'm in their Discord channel (if you're not, I recommend you joining). The moment I received the notification I started downloading and testing.
So I had an idea of what is inside and what to expect when this hits a stable version.
The first big change is the release process. It's now a 6-week release cycle. This is important for a framework that is increasing in popularity very rapidly. This can help keep expectations in alignment with what is realistically possible, and for community modules and their maintainers to follow changes.
This is so cool because this aspect can be a huge plus to code quality (especially in a large team setting), allows for more (accurate) help from the IDE and above all and provides ahead of time type checking and all the cool stuff that comes with Typescript.
If you have tried AdonisJS before, you know the long story of
use and how it magically solves bindings from the IoC and falls back to good old
require call if the binding is not resolved.
This was a great technique that I actually liked very much and built my module provider around.
With the 5.0 release, this is no longer the case. We can now use standard ESM imports and prefix it with
@ioc: if we intend to resolve a name from the IoC container.
The adonis CLI is being dropped in favor of ace. This way, ACE will always live inside your project and no longer need a global package to be installed. This should save us so much trouble with maintaining the right versions of tools across different projects.
To start a new project, all you have to do is
npx create-adonis-ts-app blog
The new documentation is so good to follow!
For the time being it's still incomplete, but this makes it no less interesting. It's even been structured into smaller guides.
There has been an interesting effort put towards making small parts (that count) perform much better. The announced parts to receive most of the performance gain are the validator and the HTTP server (which is now decoupled in a standalone package)
Introduced in the new release are some new features and additions that personally felt the need for before (and thus find very interesting):
- Signed Routes
- Health Checks
- Support for read/write replicas
- Support for configuring runtime connections
At the time of writing this, some work still needs to be done to have a final release of the 5.0. An overview of the ready to use feature vs pending ones are explained in this blog post by Harminder Virk, the creator of AdonisJS. I'll list here the content of that section of the blog post (don't hesitate to take a look at it though):
- Request, Response, and Templates
- Cookies and Sessions
- Lucid and its Active Record ORM
- The Bodyparser with support for file uploads
- Validator (some of the validation rules are missing)
- Health checks
- Mailer (some of the drivers are missing)
- Encryption and Hashing
- Ace Commands
- Social Authentication
- Tests Runner
- and Intl
- Support for RBAC
- Caching (including Database queries)
You can also follow the roadmap on trello for more details about what is coming next weeks.
I have been testing this release in isolation, I haven't tried to migrate one of my projects yet (understandably because it's not a final release yet), but I've read some tweets from people saying it was really easy to do it
Just migrated my personal website to Adonis 5 from 4.1.
It's just awesome. I thought migration will take so much of time to get things done with preview release. But It just works. Thanks @adonisframework @AmanVirk1 @romainlanz21:05 PM - 02 Mar 2020
In the end, if you haven't tried AdonisJS yet, I recommend you give it a try. Consider the bigger picture and all the good stuff that comes with it, and expect some missing features here and there (temporarily).
I hope you enjoyed reading this! Cheers!