Why aren't you using Fastify? Or Koa? Or NestJS?
VloĆŸit
- Äas pĆidĂĄn 15. 06. 2024
- Express.js dominates the Node.js framework landscape. It seems as if almost every Node.js developer is using it.
But why is that the case?
All Podcast episodes: maximilian-schwarzmueller.com...
Want to become a web developer or expand your web development knowledge?
I have multiple bestselling online courses on React, Angular, NodeJS, Docker & much more!
đ academind.com/courses
I am using NestJS. Express is simple. But, you have to build an architecture around it when building more sophisticated applications. Whereas NestJS just takes care of everything out of the box.
NestJS is fantastic!
Yes, Nest Js follow SOLID principle.
Long time React&Express user, Nest made me forget about express in minutes literally. I even got the occasion to use Angular after all the negative content I heard about but man Angular and Nest is a match made in heaven, so productive to work with those two. If you read this and you want to build enterprise grade apps, learn Next you won't go back to express.
I like Nest a lot. Its very similar to Spring Boot (Java), so if you have experience using that, its a no brainer.
same thought here. well said.
Iâm sad that Adonis didnât quite take off yet. It is a great framework
The same reason that in enterprise projects people use Spring Boot and not e.g. Micronaut / Helidon etc. It's the most developed one, the most battle tested one, has the most documentation etc.
As for the reason this dev doesn't use express (or any Node backend for that matter), lies in the previous personal experience and the state of current workplace, a mostly Java oriented shop where backend is concerned, therefore a Spring Boot place (couldn't even persuade higher ups for the value of Quarkus, an arguably far better and streamlined experience, or even standardized JEE - Jakarta).
This video was about Nodejs frameworks and not Java đ
ââ@@ademineshatdid you even understand what he's saying?
â@ademineshat wow... completely missed the point there, didn't ya?
Spring Boot is also my backend solution of choice
What's the value of Quarkus compared to Spring Boot? On an unrelated note, I was considering giving Micronaut a try to compare memory usage, most Java microservices seem to be using a lot more than they should for basic REST APIs
It's just because most teacher teaches using express js. And this is all students who downloaded it. If the student switch they choose different path and hence other framework has less download
We use NestJS at work. Having a framework that supports DI was important to us for testing and switching dependencies based on certain requirements. NestJS uses Express underneath the hood (with an option to plugin Fastify as well). What people don't realise is that it is really hard to build a large backend with express because of it's un opiniated nature.
We also use Quarkus for certain projects that use Kafka very heavily.
But I use express.js for both small, mid-sized and large backends and never face issues that most people describe. I actually use rabbitmq often and kafka less aften. I never face issues most people who don't use it for large scale back-ends describe.
@@abeinevincent5585 Suuure you don't. Have your code reviewed by someone more experienced.
@@nou4605 I actually do use it on a daily. I think the difference comes on experience, just like any other technology, after using it over and over, you get a way of handling everything and including its drawbacks thats why I never have an issue anymore, I use it with typescript often for both small, midsized and large backends,
@@abeinevincent5585 Good engineers can build using pretty much any tool.
@@abeinevincent5585 do you have some public repo for large project using expressjs? Thanks
same reason people use React even if it's not the best framework technically
It was but now its mess thanks to hooks and vercel đ
Which is the best then?
@@octane-nn1rk Fiddle with the top 5 most downloaded in that category and pick the one that resonates best with your style. That's the best way I think one can get "the best"
@@programmerjowo agreed, vercel ruined react.
@@octane-nn1rk theres nothing called best, if you're a hobbyist you'd like solid or svelte but if you're looking for a job you're better off with react. And in terms of development/coding, svelte feels faster but svelte lacks a huge ecosystem like react, a good ecosystem means a lot of tools already available and doesn't need you to code it manually. I chose react as a beginner because I wanted to launch an app and a dev mate suggested me react because he knew i was a total beginner and that react has the most tutorials, articles, packages, you name it... available on the internet that I could learn from as i build. So as a starting point, pure react with vite (not nextjs) would be the best starting point because of a lot of tuts, tooling, jobs, etc. After that svelte and other frameworks will almost always feel the same. I learnt svelte in 1 month, vue in 1 and half a month, just by reading a couple of documentation. Also, nextjs is just a combination of react and express, and you basically know half of nextjs if you know react and other half of nextjs if you know express.
Im using ElysiaJS and im in love with it.
im glad that you made this video because if i had to make a nodejs server supre quickly i probably would use one of the other options like koa or fastify. I hadent heard of adonis but ill check that out. The reason I dont use any of these at the moment is because im using Axum with Rust and it's a phenomenal experience.
Edit: Adonisjs looks great!
I use Koa and I love its simplicity and minimalism. Also its cascading middleware system is an obvious win over Express.
Thanks! Using Django for decade and incredibly happy with it.
Here here
Developers using Ruby on Rails, Django and Laravel use them and live happily ever after.
Really not a troll comment, but I had the opposite experience. Everything in Django felt antiquated or poorly thought out. We constantly had migration conflicts, even on a small team. I couldnât believe the framework was unable to handle that. Maybe this was user error?
Moreover, the DRF wasnât fun either. Too much magic. Set a serializer class and then add a serializer with specific methods? Gross.
Python is a nice language though.
I totally agree with you on why express js is popular. And the reason I will use it is consist of many things, including it is popular it has great ecosystem, and it is simple (Mean I can have my own directory structure and have my own philosophy on how every thing should be organized) This make me feel that I know everything about my project. Unlike NestJs where I will always feel I don't know about the full capabilities of the framework (because I am new to it).
I may like Fastify if I used it because I saw its tutorials looking awesome. But my project was using Express, so I had to stick with Express, which is simple and good.
NestJS is actually my favorite.. I come from Symfony in PHP.. so I like to use OOP design patterns and have things like events, dependency injection, a typed orm.. it's just perfect for people who wanna make realy big complex apps
The same for me. Symfony is for me the most professional framework for php and i really wonder, why Laravel is so hyped.
@@GGGGGGGGGG96 they just too.lazy to learn symfony and just follow the trend, just like in Js world.
with js* not perfect for really big complex apps between all mainstream languages out there
â@@programmerjowo Laravel has been maintained with far better docs than any other php frameworks including Symphony. I have been using Laravel since 4.2 and all I can say that it's super stable and far easy to upgrade 5-6 year old apps on the framework. Although Laravel is based on top of it, it's also greatly benefited from the popularity of Laravel in the community.
not perfect but it's doable, as long as you know how to manage the hosting/deployment part, manage memory leaks and have a solid monitoring/logging strategy I don't see why js is bad for big projects. The reason I prefer js/ts over PHP is because nowdays, frontends are based on js.. so it's much more efficient to have everything in js.. you don't redo things like data validation etc... yes you can still use things like graphql but in our particular case (small team) having a full js ecosystem makes more sens.
I absolutely love Nest. I think that comparing it to Angular kind of shines a bad light on it, so I don't really like to make comparisons, even though I am a fan of Angular. In my opinion, a backend should have a well-defined architecture and strong type safety, all of which Nest offers out of the box, among many other things. I spent years making backends in Express, but I could never go back to it. Well, Nest does use Express under the hood so I guess I'm still using it, but it just feels much more solid this way.
I use Nest because it resembles Java Spring to some extent
for me at this point of my early career, ive been using nest for work,
and planning to use elysia and adonisjs for side projects
adonis is basically one guy taking care of everything. He discontinued v4 before 5 was available and no LTS was warranted. I would avoid it like the plague.
The simplicity of express allows me to easily separate business logic from the framework. While battery-included frameworks are convenient, they sometimes force the logic to "marry" them, which I'm personally not a fan of. But still, it depends on what kind of project we're building
Nestjs use express under the hood, you can also switch to fastify later if you want. Nestjs is very good when you need order, and it's customizable when you know how to use it properly.
Nestjs is anything but order. Anything written with it is a complete mess.
â@@Patrk38 Why you say that?
@@lukas.santiago because thatâs the truth.
I've bought several of your courses in the past. Didn't knre u had a youtube channel. cool.
Express actually doesn't qualify to be called a framework, a framework is more of a Laravel or a ruby on rails. Express is just a library essentially, a routing libraryđ
Please stop spreading this misinformation. Express has a middleware / plugin system so its technically a framework. There used to be a separate routing library used by Express, it was called Connect (now it is fully integrated, the same package). Bloated ROR-like frameworks are one extreme case, featureless Express-like frameworks are the other.
Max, when is the NestJs course coming out?
Hono JS is also another NodeJS framework that I see has potentials. I did not find you mentioned it. What is your take on hono.js and May be a course on it. Just may be...đ
Glad to see a comment on it haha.
Express was built with a lot of flexibility in mind and that's why even other high-end frameworks only add opinion on top of it. It's middleware architecture makes it easy to build plugins and extend it's capabilities. You can still have DI without nestjs if you properly use available libraries like inversify. I can summarise it that it's quite easy to pick up and build complexities along the way. That way the learning curve is not steep for Junior devs and also it's stability now plays a key role
I will just use spring boot if I need di or enterprise framework đ
@@programmerjowo A framework does not justify whether you write quality code or not. It's all on the developer because we can achieve all this with whichever language you wish
Some of the frameworks are using express under the hood (eg NestJS). So this is adding up I guess.
Personally I don't use any frameworks (I am PHP dev) but if I could, I would probably try NestJS as it seems to have good microservice solution, which is what I am currently working on.
I use Express with React SSR for my personal blog. It's a bit of a weird setup. It probably has room for improvement. But it's serving me well for now.
I use Node.js because I have many years of experience working with the JavaScript ecosystem, and it's where I'm most comfortable. PHP would probably make more sense for my specific use case (rendering Markdown files from the server's file system, in a traditional LAMP stack hosting environment), but I wanted to get something put together quickly, so I went with what I know.
I use Express because when I learned Node.js back in 2015, Express was the "in" framework at the time. Better frameworks exist, but for this, Express is fine.
I use React because I have a lot of experience with it, and because it's pretty good for building UI components. I use SSR because I want my site to work without JavaScript on the client. Call me old fashioned, but it's a very simple website, and I think it should be usable without JavaScript.
OMG this is my comment
This video encourage me to explore alternatives
I have used nestjs a lot, after started to angular on frontend opposite to react. It has a good architecture and scalability
I like NestJS as it's straight-forward and if you have a team you have rules that you must follow. We did some projects on ExpressJS but depends on project, experience and size of team.
Nest is the best thing that can happen for node , with di and everything, it is the best choice for building big server side applications.
Somewhat disagree in terms of maintainability. What are the pros of using NestJS over ExpressJS?
Do you actually know that nestjs uses express under the hood? It's just more structuredâ@@taylorlindoresreeves
What backend and database should you use for a tinder like mobile application with react native?
I love NestJS I have used it for just 2 projects but I love it.
Fastify all day long... You can do amazing things and its fast as hell. Express is also good, more like tradition. In my company, we have the entire OS built on top of express and GraphQL that serves IIoT in Mercedes, BMW, Porche, Audi, etc. We have more than 50 microservices. There is no need for Nest and stupid abstractions if you know what are you doing. We did it very simple and its organized on another level that you cant even imagine. No fucking single bug and problem.
Express is used as the router inside NestJs, so, even though ExpressJs has many downloads, NestJs contributes to that number
express was the first nodejs i learned while learning nodejs, also it gets the job done hence didn't bother learning other libraries as it becomes overwelming. Also given that express seems to be the standard with nextjs as well.
Adonisjs looks awesome đ, thanks for the mentioning it
I doubt many people who use express or download it are mostly after following some tutorial because it is widely included in all node js courses and is easy to demonstrate a trivial CRUD api or a simple json server that's it, People who actually want to build something substantial are very much aware of the nuances that comes with using express and they are definitely using it's alternatives like nest js,fastify etc.
I used Nest.js for one of my backend APIs, and I wish I could go back and have the time to refactor everything into plain Express. For me Nest.js is just a thing objected oriented wrapper around Express that makes your backend look a lot like an Angular service layer. Which of course is what attracted me to it initially. đ But after running it for a while, the cost / benefit for me is not really there, there is really no tangible benefit to it other than it's a different programming model. So I just can't recommend it compared to plain Express. đ
You are right, why we add layer to express Js if we want to use simple framework. If we need enterprise framework just use spring boot
The one problem is finding devs to keep maintaining the code base.
Like if I leave the company, somebody else with actual professional experience with express can just take it up.
NestJS is we are using at work. Fastify Express being un opinionated are fine to being with for some short project but for decent enterprise level requirements where multiple people are working having a framework really required.
When can we all expect a nest.js course ?
I'am using NestJS, too. But actually nestjs is still express.js, and if you wan to use express still functions, middlewares you can. I think NestJS is Express + Typescript with some stable and good features.
Lastly, I dont know Angular, i am activelly using react with typescript. And i am big fan of nestjs.
usually, I use Express Js js but prefer NestJS for large projects đ.
Because usually when I need a webserver, Im actually building something else and I want something that I already know will do the job. Which sucks because Express isn't amazing in many ways. Just at that point in time I dont want to be blocked from progressing on the main thing Im working on to learn a new thing
0:14 i will use , Spring Boot Or ExpressJs
Please make a fastify course, max!
Do you have a php course and one of laravel?
What do you think about nestjs ?
Nitro unjs is my go to. for many years
Hello Max , i want to suggest that you read comments section for your Node/Express course on Udemy , there are people complaining and saying that the course is really old and needs to be updated , i wonder why you donât update it as you usually do for react course for example or release another new course with your new amazing learning skills
Thank you Max â€
Hey I know reactjs, I haven't worked on nextjs. Can you please tell me for backend what will be used in nextjs? Is it nodejs, expressjs or anything else?
I'm looking for the answer to this too, did you find an answer?
I m using loopback 4 in my companyâs project
The company I work for uses Koa, the error handling is great, much more convenient than express
I use Nestjs i like the organization and out-of-box mentality
Why? Because of your course and made me a fan of express
Hey Maximilian , you said you delete ngRx old videos and update it to latest one i means is it required , can did you deleted already or will delete if you are going to delete old videos , so do after a month Please, Or if you done already then i want to know is it completly changed or little bit
I prefer to build my own meta-framework on top of express with some very clean patterns and middleware that any developer can jump into and understand.
hono đ€đœ bun
Im using Go.
I like hono because it runs basically everywhere
There are plenty people who like Angular but they are not just as loud as React people on the internet đ€Łđ€Łđ€Ł
im a beginner backend. should i start with express or nest ?
Express. You will learn a lot.
Maxim please add fastify to your node course.
I love Nestjs becuse it's great for big and complex projects .
React Native ? Flutter which one to go for Mobile Developer
React Native
Flutter is a bit faster but got confusing code nesting, Go with React Native with Expo
Flutter is hard to read
@@programmerjowo yep
If your background was related anyhow to React - then def RN. But if they both are new to u, do Flutter then. Flutter is younger but with huge potential, easier to bake first app, more strict. Where React and RN - more liberal, you can have more tools
Most of the download no of express js is from tutorials or who are learning backend development in node js
I don't like Nest.js, probably cause of it's decorators or dependency injections ( love angular though ). I like fastify with typescript, also hono. I use express cause my senior make that decision for me
Express is easy to get started with. Nestjs is just way too confusing.
But I use neither, I use loopback đ
It takes not more than week to be relatively proficient with Nestjs. And once you learn it there is almost no going back. Anyone coming from Java would love it.
I like to use something like Nitro or Hono.
if it works in production, dont touch it. havent seen an ask or requirement that wont wrk with express, so why not, just keep running engine until it crashes
I inherited a NestJS project, it took 5 seconds to restart, which is completely impossible to work with.
Hono is the GOAT
Yeah, I have been playing with hono. I think I like it.
đ
iâm pretty sure he must have been payed by fastify to make this video. there is no other explanation
Yeap, Am an angular lover and nestjs is awsm!
Fun topic. Don't really agree on express being dominant because it was early to market or has loads of docs or modules or is popular. Otherwise we'd still be using Netscape, Flash, etc. It's dominant because, despite its flaws, it satisfies 99% of people's needs. If the need shifts and Express doesn't it will also end up on the scrap heap. Personally, I've got better things to do than spend more dev time on Express alternatives. If I run into one of its flaws and switching becomes the only option, only then will I consider it. The same reason why, for personal work, I moved off React.
I am wondering why you did not mention NextJS as it is also a framework with fullstack capabilities and thus it can also be used for backend development.
Yes indeed nextjs can be both but mostly it used for FE development, also as far as i know there are disadvantage when we are using next js for BE
express routing library change my mind
Stale version is not necessary a bad thing. I don't think "it's not that many commits so old problems, are still there" is a good argument, if it was major problems I think people would go elsewhere rather quickly.
It is easy to set up and it's flexibility.
I would prefer Fastify or Hono as an alternative for simple frameworks...
I've been using nestjs for a couple of months. I dunno why though. It's just me. All the time I'm trying to figure how to do x thing in nestjs when I know in express it be simple. And for what? At the end of the day I just need it to send a json to my front end. I dunno why I beat a square peg through a round hole.
Some things are awesome in nestjs though. I love how easy guards are. Once I learn something in nestjs, I'm usually good, but it's still very complex.
People are sleeping on Nitro and unjs... Used to build Analog and Nuxt.
Check out my NestJS tutorial video in my channel-perfect for anyone just starting with backend development!
i will prefer angular over react , , i like framework structured way ,
yes i tried building spa app using js html only !! during my initial days of IT !! and it gives me many ideas etc.
Sad for Adonis. Itâs really fantastic
If I were to use js on the server, I'll use elysia on bun
Adonis is a great framework, really. There is no any good framework that could be better than any frameworks like from Java or PHP. It seems like backend NodeJS development still doenst reach the needs of good DB REST app
or HONO JS (most important)
Nestjs is great
Bro looks like he's getting attacked by a swarm of flies
The download number is so high because of legacy/old systems. Also because e.g. nestjs has express as its dependency.
Migrating to something more convenient like nestjs is sometimes not a choice a company can make because it
s expensive and does not bring any value (in the eyes of the prodduct owner)
Express is dead. Every new project I see is build on top of nest.
adonisjs bro is on fire
Started using hono-js over express-js late last year and I have no plans to go back to using express-js. I don't see any benefit of even using express-js.
In the next 5 years, Fastify will be the preferred BE framework. You have to remember, Node is currently still in the process of a massive change - things are moving to Typescript. Express has TS has an add-on, whereas Fastify has it built in. The gymnastics you have to go through to get TS to be fully inferred everywhere with Express makes it less ready for this transition.
Well, because despite the fact that we say that technology evolves quickly, there is the "first-mover advantage" that stays relevant. Even if you don't like Angular, it is worth trying NestJs. Only a few concepts are taken from Angular, and the architecture is very structured.
Laravel no question. I love NextJS with Laravel. Reason why is I get to use all the incredible tools in the ecosystem. If there is a huge budget then NextJs stack like T3. But for ultrafast prototyping Laravel plus NextJS.
Hey I know reactjs, I haven't worked on nextjs. Can you please tell me for backend what will be used in nextjs? Is it nodejs, expressjs or anything else?
@@razak-attar yeah im wondering too...
But nestjs uses express under the hood
Does not have to - it can use Fastify and if you run it with bun, you can get brutal performance boost.
I'm using php symfony.
Nitro from unJS
I use Next.js a lot, but sometimes I pop in a simple express app to do something collateral to the next app and don't need a TON of stuff to make it work.
Express is just so simple
as always, x1.25 to the rescue
the download number not actually represent the framework/library is used in production, because most downloads are from the people learning or exploring the package.