DEV Community

Cover image for Node.js Frameworks Roundup 2024 — Elysia / Hono / Nest / Encore — Which should you pick?

Node.js Frameworks Roundup 2024 — Elysia / Hono / Nest / Encore — Which should you pick?

Simon Johansson on November 01, 2024

Node.js web frameworks — where do we even begin? With so many options out there, choosing the right one for your project can feel overwhelming. In...
Collapse
 
mindplay profile image
Rasmus Schultz

Encore is presented as a framework here, which is actually misleading - it is an alternative runtime that replaces Node entirely.

Encore is an entirely different category from the things you're comparing to here. This wasn't even touched on in this article.

To be honest, the whole article reads like another attempt at misleading advertisement for Encore, and it isn't the first time you've attempted something like that:

dev.to/encore/how-to-make-your-exp...

A similarly misleading title (which you declined to change) and essentially a guide to porting your Express app to Encore.

Likewise, this article would have you believe we're comparing frameworks, when Encore isn't even strictly (or at least not only) a framework.

I honestly think you're going about your marketing and placement of Encore all wrong.

Why are you trying to position this as an alternative to Express, one of the lightest lightweight frameworks there is?

You're an entirely different category of product.

I'm not honestly completely sure what category of product you are. You want to be a Typescript framework, but you're really a platform, and you're based on Go?

To be honest, this framework seems to be trying to break out of it's own niche, perhaps because it's a niche that doesn't really exist? 🤨

Collapse
 
marcuskohlberg profile image
Marcus Kohlberg • Edited

Encore.ts does not replace Node, it uses the Node runtime.
In most common uses of the phrase, it is a backend framework.
It also provides an extension to the javascript runtime (Node) by providing a Rust runtime to handle I/O.

Encore.go is a separate framework for Go.

Both can, if you want, be used with Encore's Cloud Platform to automate DevOps.
If you prefer, you can also self-host any way you like only using the Open Source tooling, you don't need an account with Encore or anything like that. So to be clear, the "platform" you a refer to is an optional related piece of kit.

I don't understand why you think it's a bad thing to compare it to frameworks like Express, even if they indeed are quite different you can replace Express with Encore.ts, and not use the other functionality it provides. The fact that there are more features available - if you want to use them - doesn't make it a terrible comparison imo. Only comparing extremely similar things doesn't seem very useful?

Collapse
 
mindplay profile image
Rasmus Schultz

Huh. So, do you mean, it has a bundled copy of Node that it uses internally?

Or how come you have to use a custom tool and a custom executable to install and host it?

Why isn't this a regular NPM package?

Thread Thread
 
eandre profile image
André Eriksson

No, it uses the node binary on your PATH, like anything else. The reason for the tooling surrounding this is to provide a nice developer experience, by handling things like automatically setting up local infrastructure. At the end of the day running it is as simple as invoking node and pointing it at the Encore-generated entrypoint file, exactly like how e.g. Next.js works.

Collapse
 
ibnu_rasikh profile image
Ibnu Rasikh • Edited

but in the docs they say "100% compatibility with the Node.js ecosystem." is it lie?
encore.dev/docs/ts/concepts/benefi...

Collapse
 
eandre profile image
André Eriksson • Edited

It's not a lie; Rasmus Schulz is mistaken. Encore.ts provides a native library (the Rust runtime) which runs within a normal Node.js process, which is how it provides 100% compatibility with the Node.js ecosystem.

Collapse
 
mage1k99 profile image
Magesh Babu

It's good to see someone has good clarity about these things

Collapse
 
eshimischi profile image
eshimischi

And also Elysia isn’t even NodeJS framework too.. based on Bun.

Collapse
 
eshimischi profile image
eshimischi

Thanks for making this statement, i thought to post something already and can’t say it better.

Collapse
 
codexam profile image
Subham • Edited

Honestly, NestJS is the way to go. Once you've tried it, you realize it’s basically like the TypeScript equivalent of Spring Boot but with a lot less headache. Nest is made for scaling, and if you're dealing with microservices or even just a well-organized architecture, it's a no-brainer. Other frameworks? Setting up pipelines, decorators, handling Redis, Kafka, RabbitMQ, gRPC – you’ll be building all that from scratch and probably still not hit the same efficiency.

With Nest, everything's already encapsulated and streamlined through decorators and built-in setups. Even on smaller projects, you’re building faster because you’ve got all these structured modules, and you’re not having to reinvent the wheel. The way it separates business logic, services, and controllers keeps your codebase manageable – you won’t end up with a pile of spaghetti code. Trust me, after trying all kinds of frameworks, Nest just hits different for clean, scalable builds.

You can check one of my blogs about nest - Scalable REST APIs with NestJS

Collapse
 
sackingsand profile image
Yudha Putera Primantika

NestJs does come with significant learning curve compared to others, but later when you really understood what it's opinions are, you'll be flying with your coding and fixing. That thing is crazy good for microservice infrastructure, it's very intuitive and saves lots of time.

Collapse
 
ozzythegiant profile image
Oziel Perez

It's really cool how it's basically Angular for backend

Collapse
 
fasttrackrai profile image
FastTrackr AI

Nice

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
simonjohansson profile image
Simon Johansson

Encore is both a Go and TypeScript framework. If you choose to use Encore with TypeScript you can use it like any other Node framework, works with all NPM libraries as usual etc.
encore.dev/

Collapse
 
Sloan, the sloth mascot
Comment deleted
 
eandre profile image
André Eriksson

You seem confused. Encore.ts is a Node.js framework. It provides a native library (built in Rust) which runs within a normal Node.JS process.

Collapse
 
usman_awan profile image
USMAN AWAN

Bro, nice work. But in 2025 deno might overcome NodeJs soon.

Collapse
 
eshimischi profile image
eshimischi

Bun already did overcome both of them

Collapse
 
naynaingoo2003 profile image
naynaingoo2003

Time to code

Collapse
 
sixman9 profile image
Richard Joseph

No Remix, deploys everywhere, including Cloudflare?

Collapse
 
kokkondaabhilash profile image
Abhilash

Why not ExpressJS added here?

Collapse
 
fredericrous profile image
Frederic R.

you should peak Effect