DEV Community

Discussion on: Introducing the Best 10 Node.js Frameworks for 2019 and 2020

Collapse
noway profile image
Ilia

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?

Collapse
michi profile image
Michael Z • Edited on

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.

Thread Thread
noway profile image
Ilia

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.

Thread Thread
avidcoder123 profile image
avidcoder123

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.

Collapse
chillysource profile image
Nicolas Cacace

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.

Thread Thread
avidcoder123 profile image
avidcoder123

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

Thread Thread
faithfulojebiyi profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Faithful Ojebiyi

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.

Thread Thread
avidcoder123 profile image
avidcoder123

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.

Thread Thread
avidcoder123 profile image
avidcoder123
Thread Thread
faithfulojebiyi profile image
Faithful Ojebiyi • Edited on

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.

Thread Thread
avidcoder123 profile image
avidcoder123

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