Originally published at softwareontheroad.com
I’m so tired of reading articles claiming what is the best node.js framework based on biased opinion...
For further actions, you may consider blocking this person and/or reporting abuse
I strongly believe AdonisJS should be like No. 1 on this list. Good thing though is it made the list.
As far as I am concerned, it's my No. 1 for all times when it comes to JavaScript Frameworks
I agree. Not sure how it stacks up against Hapi but this definitely needs to be #1 or at least a #2 behind Express. My approach to learning frameworks is to have one monolithic framework and one micro framework learned per programming language. For PHP, I use Slim and Laravel. For Python, I use Flask and Django. For Java, I use Spark and Spring Boot. In Node.js so far I've only learned Express, but I would say it's like Flask and Slim, it's a micro framework, but for when I'm needing to save time and have something that includes all of the essentials, I would take a look at Adonis.
It is healthy to learn a microframework but I feel like Express can't really be compared to Flask. Flask does all the basics for you like cookies, sessions, and templating engine but Express doesn't. Express is a bit too flexible; you shouldn't have to worry about such rudimentary things when making servers.
We'll I put them side by side because both of them require you to patch in your own libraries for some things, like ORM. A full framework will include most, if not all things that are commonly used to build apps
It’s such a great and easy to learn framework :)
Especially for developers who have been using Laravel. Adonis is inspired by Laravel, hence it is called Laravel of Node.js.
However, I am not sure about its maturity/stability, so I postpone to learn it further. But when it gets wide acceptance from the community, I will use it. Currently, I am considering Hapi.js to be my option.
Curious: what are the benefits of Adonis over Express.js? Would you consider switching existing Express projects to Adonis, or would it only make sense to start new projects from Adonis?
AdonisJs is battery included, comes with db setup, mail, mvc, testing utlities, you name it. It lets you focus on writing the application, so you don't have to focus much about building the architecture around it.
Thanks a lot, that makes sense. I prefer to compile those modules together myself, that tend to achieve maximum flexibility and gives you a better time if there appeared to be a better alternative on the market which needs to be included vs relying on framework devs to bring the support and define the migration path for it. Got very burnt on that with Sails and their ORM. Seems like Adonis is a good alternative to Sails in that regard, so if I need to pick ease of initial setup as a requirement for another project, Adonis would be a good candidate.
Flexibility is truly very important in Node.js, I agree. But it is very powerful to have a default, and AdonisJS doesn't stop you from installing new packages if you want to.
One of the benefits often cited about Node is that it allows you to code in a single language - Javascript.
I see this COMPLETELY flawed understanding of programing languages ALL THE TIME.
The two implementations of front-end Javascript programing in the browser and Node are like chalk and cheese.
....So when I see Adonis JS offering a Laravel-Like environment my radar suddenly 'goes off'
...and when I see that Adonis only offers support for Databases which fundamentally were designed for Multi-Threaded environments I have to say that my suspicions are in the process of being confirmed; you can know any language back to front yet COMPLETELY fail to grasp WHY it's designed the way it is at a fundamental level. (I see it all the time)
...It's like the many C programmers I witnessed in the the 90s adopting C++ yet continuing to write procedural code completely failing to grasp the OOP paradigm.
I would look at one of these for Node...
blog.logrocket.com/forget-express-...
...and if you like Adonis because you're used to Laravel OR like its MVC structure because you have a huge project then GO WITH LARAVEL.....Symfony | Zend (Which are even stricter MVC Frameworks for PHP)
... but it'll will cost you more in Hardware
What you can do is split your tasks that require High demand and delegate those for a Node environment. Intelligent design can save you lots of Money in the long run. Technology is always about Pros and Cons. There is seldom a magic bullet that solves all problems.
Fish are designed for swimming, Animals for walking and birds for flying.
Pick one - Laravel or Node. Two COMPLETELY different paradigms.
Your reasoning is flawed. We aren't using Adonis because we want a carbon copy of Laravel, we are developers who write JavaScript who want an option better than the most popular garbage like express.js
You dare not call a framework that has 5 times the stars of Adonjis Garbage.. Seems like you just started programing or you have no idea what you're talking about.
If you're too lazy to set up your project then use a framework like Adonis... Don't come here bashing Express because you have a hard time setting it up. Apparently, a good developer should be Framework agnostic.
Measuring Github Stars only shows popularity, not quality.
Also, there is a difference between being lazy and being efficient. Isn't driving a car lazy if you can just walk?
The problem about Express is that gluing modules that are not created to work together will only cause headaches. Also Express is poorly designed. Trying to use async/await will cause memory leaks and/or crash your app, the routing is not deterministic, and it is full of bottlenecks. Just search up Netflix's experiences with Express and you will see what I mean.
dev.to/romainlanz/why-you-should-d...
You probably didn't do your research well... And the Author of the Netflix post admitted to using Express API wrongly... Which caused their issues.. they fixed their codebase and the issue was gone.. PS that was express V1 Express is on V5...
stackoverflow.com/questions/273045...
How do async await cause memory leaks... You're talking like an inexperienced engineer. .. You only have memory leaks in a badly designed application.
Express doen't know how to handle async/await. If an error is thrown inside an async handler, instead of the error being handled correctly it throws an UnhandlesPromiseRejectionError in Node 15+ and can cause memory leaks in below versions
I've tried almost all framework (express,koa,nest,adonis,feathers,hapi,etc) and i think Express wins from them all by simplicity. I'm using express with/out Typescript for 5 years and it works very well with no issue. If you face UnhandlesPromiseRejectionError, you might not use try/catch in the first place. Yes, by default it doesn't handle that error. If you face some problems in Express, belive me it's not the framework fault, sometimes its dev lack of knowledges.
And for Romain Lanz article, mostly not true and he tends to drop Express because he is one of the Adonisjs contributor.
Nest doesn't belong on this list. It gets out of control really quickly and suddenly you realize you've landed in an old school ASP MVC or Zend app where new developers have to spend a month ramping up to figure out where everything is and groking the abstraction layers. Nest might be okay for small apps, but it'll get out of control and then you're back to the "memorization driven development" that we used to lean on in old school monoliths.
Take a look at Plant. It's a WebAPI based framework. And it seems like it's the only which supports HTTP/2 pushes. It's transport agnostic what means you can deliver requests via HTTP(S), WebSocket, WebRTC, etc. Also it works in browser without compilation/browserification due to its' WebAPI compatibility and transport agnosticism, though you can develop your server using text editor and DevTools for debugging.
I wrote it and ready to answer questions.
P.S. You place too much advertisement into the post. It's too unfriendly to the readers.
Do you know how does it compare performance wise versus Fastify? Having a benchmark would be nice. (My use case does benefit from performance, so I'm choosing between frameworks mainly on performance + availability of extra plugins and DevEx)
On hello world test its' performance was about express'. But on my machine koa was always behind express and on fastify's benchmarks it's not. Need a verification.
Super high performance has never been the main goal of the current development iteration, I've just been holding it on acceptable level before API became stable. Currently I'm working on improvement which should make Plant faster than others with extra deep optimizations, but it's a piece of work. Not sure if it will be done very soon.
Seems like an amazing framework, I’ll try it :)
Also, Polka should probably get a mention too, considering how dominant it is in benchmark tests vs others, and how highly it ranked in user satisfaction (see Eran Hammer's article on Node framework dominance in 2019)
Thanks for sharing about Polka, seems like a pretty sweet framework to work with!
How does it stack up against Fastify performance wise? Would be nice to see it in the leaderboard here: fastify.io/benchmarks/
Glad to see fastify on this list 👍
For my specific use case (pure rest api with a mobile client) it looks to be the perfect alternative. Actually thinking of switching from Koa+debug.js!
I hope to be using fastify soon !!
If y'all want something more express.js like and really wanna go barbones, I recommend checking out Polka: A micro web server so fast, it'll make you dance! 👯
People who don't really know the inner workings of AdonisJS think it can be used exclusively for MVC apps only.
There is a slim version of AdonisJS that can be used to build out APIs and microservices, if Microservices are your thing.
Even though it favours SQL based databases, it is extensible enough for new additions and we have seen the community create packages that supports the use of mongodb and/or graphql.
The beauty of AdonisJS is it helps you get out of your own way, also you should check out the latest version, AdonisJS v5 which was re-written from the ground-up with support for Typescript
From my perspective, sails.js should be first before adonis because it's battle tested and has an efficient ORM much more simpler than others, its main advantage is its waterline and self validation actions, secondly, why's loopback not in the list?
Loopback is at number 7 in this list.
What about eggjs (eggjs.org) ?
Why is it very rarely mentioned in any articles on node frameworks ? Because it is made in China ?
A lot of people love Vue.js and Ant Design (Antd) which are essentially made by chinese guys, but tend to ignore this node framework.
I read from its official site that its design philosophy and goal are encouraging. However I just cannot get started on it before I am convinced that it has wide acceptance by community. Its Github star is quite impressive, but I suspect it's largely from developers in China.
I am currently learning Express, Feathers and Hapi in parallel. But your introduction of Fastify immediately trigger me to visit its site. The site says Fastify is inspired by Hapi and Express but offers better performance, so I should learn it too. Koa is interesting too.
Only after having sufficient skills in these "traditional" but fundamental frameworks, I can try modern frameworks like Total.js (totaljs.com/platform) that draws my attention too.
What is supporting the abstraction of async/await syntax ?
Generators and coroutines :D
AdonisJS is definitely in the top 3 most used NodeJS MVC Framework.
It’s awesome to see so much community around AdonisJS :)