Need advice about which tool to choose?Ask the StackShare community!
NestJS vs Next.js: What are the differences?
NestJS and Next.js can be primarily classified as "Frameworks (Full Stack)" tools.
Some of the features offered by NestJS are:
- Extensible - Gives you true flexibility by allowing use of any other libraries thanks to modular architecture.
- Versatile - An adaptable ecosystem that is a fully-fledged backbone for all kinds of server-side applications.
On the other hand, Next.js provides the following key features:
- Zero setup. Use the filesystem as an API
- Automatic server rendering and code splitting
"Powerful but super friendly to work with" is the primary reason why developers consider NestJS over the competitors, whereas "Automatic server rendering and code splitting" was stated as the key factor in picking Next.js.
NestJS and Next.js are both open source tools. Next.js with 38.7K GitHub stars and 4.69K forks on GitHub appears to be more popular than NestJS with 17.4K GitHub stars and 1.22K GitHub forks.
CircleCI, Avocode, and OverCode Solutions are some of the popular companies that use Next.js, whereas NestJS is used by Sofit Software, Quero Education, and YABAWT. Next.js has a broader approval, being mentioned in 82 company stacks & 69 developers stacks; compared to NestJS, which is listed in 12 company stacks and 13 developer stacks.
Hi, I am a new developer using Ionic to develop a mobile app. I have recently tried to build a social mobile app which will have video calling, payment transaction, chatting, sharing, etc. I am now confused as to which framework I should use for the backend: Spring Boot or ExpressJS or NestJS? Any detailed advice will be better for my development. Looking forward to your valuable reply.
Any tools that achieve your software functionalities is good. you should check if with these frameworks you can do video-call, chat etc. how the scalability is achieved and the complexity of using it with them. since you are starting from scratch you can do this kind of feasibility before starting
If I want to write server api, I will use NestJS as primary framework. It base on express | fastify so I can use anything of expressJs. SpringBoot is a java framework. I will think to write as payment transaction service. If you are Ionic developer. you will know Js / ES6. You can try NestJS / ExpressJS. - video calling: You can not create video calling feature. Some keywords: ffmpeg / coturn / webrtc - chatting: realtime (socket.io / websocket) - you can try some opensource as rocketchat. It also have video calling feature.
Hi there, I'm deciding the technology to use in my project.
I need to build software that has:
- Main View (access to a user account, News, General Info, Business hours, software, and parts section).
- Account Preferences.
- Web Shop for Parts (Support, Download Sections, Ticket System).
The most critical functionality is a WebSocket that connects between a car that sends real-time data through serial communication, and a server performs diagnosis on the car and sends the results back to the user.
You can use NestJs with microservice architecture.where you can also use socket.io for web socket. you can use MongoDB (For real-time data) & MySQL for customer management.if you don't want to implement websocket.you can use firebase.it gives realtime database & firestore.which can handle millions of connections and scale it up.
I would also go with NestJS. I would say Java is unnecessarily complicated and limited. And Python is not typed. TypeScript is powerful and typed and goes well with NestJS, especially using RxJS.
Django does not enforce backend-frontend separation, which probably was a good thing back in the days, but not anymore. But on the other hand enforces the project structure to you, which I don't like.
Just a simple Node.JS app with templating engine for UI can be sufficient for what you want to achieve.
Spring boot with Spring Security[JWT], Websocket, Thymeleaf or Mustache, and styling with Bootstrap.
I am currently planning to build a project from scratch. I will be using Angular as front-end framework, but for the back-end I am not sure which framework to use between Spring Boot and NestJS. I have worked with Spring Boot before, but my new project contains a lot of I/O operations, in fact it will show a daily report. I thought about the new Spring Web Reactive Framework but given the idea that Node.js is the most popular on handling non blocking I/O I am planning to start learning NestJS since it is based on Angular philosophy and TypeScript which I am familiar with. Looking forward to hear from you dear Community.
NestJS is an excellent framework (they both are). I would say the fact that you're working with Angular makes NestJS a great match, unless you're splitting front and back end between developers. But even in that case I would still go with NestJS for a new project.
Regarding the single threading point, take a look at PM2 which helps to run Node in multiple processes (we use it with NestJS) https://pm2.keymetrics.io/docs/usage/cluster-mode/
Also regarding web server performance in general this is an interesting post showing how Node with outperform Java in a web situation (be careful though, best to check a few posts to make sure these aren't totally biased benchmarks!): https://www.tandemseven.com/blog/performance-java-vs-node/
Node.js has only 1 real thread per process; Java JIT will mostly run faster than JS one; So if it happens to be not only I/O... Why do you need most popular, not simply popular? Does Node.js have tech advantages?
I'm planning with a small team to create an application which is a platform for restaurants. I'm on the backend almost alone currently. I'm going to use Node.js for that, and I'm very fond of TypeScript, and I worked before mostly with ExpressJS. The team may get bigger as the application becomes bigger and more successful, so I have the Scalability concern in mind now, and I was considering these options: 1) Use Node+Express+Typescript 2) Use Node+NestJs (which utilizes Typescript by default)
What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest
I highly recommend NestJS because:
- It's a framework you already like;
- Typescript is growing fast, being increasingly adopted in the community;
- All layers are well defined, not needing to think much about the organization;
- Great documentation;
- Nest CLI increases the development speed and keep the pattern;
Only using express and knowing that project can grow, you'ill need to define the structure well so that it doesn't get out of control.
ps: I am not part of the NestJS team, I am just a guy tired of wasting time with dumb and bad Frameworks and its bad documentations. I find relief in NestJS with all the time it's saved to me, it helped me to improve my job and let me create great things with Nodejs.
I would definitely suggest NestJs over other options because NestJs gives a lot of tooling. it would definitely suggest NestJs over other options because NestJs gives a lot of tooling & it gives a lot of functionality out of the box. If your team worked with angular 2+ then it will really easy to learn.
First of all, my experience using either Node.js with Express or NestJS is not wide. I liked NestJS due to it's similarity to Angular, so when you know Angluar and like TypeScript you are going to love NestJS, it will be instantly very familiar and easy to use, it's adds a good structure to the project out of the box and well, it uses TypeScript, which is a more structured language - it's good for scalability. As for performance concern s - NestJS is based on Node, it just brings Angular's modular structure to it, so the question is more about how is the additional layer influences the performance - I cannot answer that.
Hi, I'm in a similar position, but related to personal projects. After falling in love with few frameworks in the first day and rejecting them in day 2, I started learning nestJS last week. I currently develop personal side projects using cakephp, and I intend to migrate to nest + vue. This week I'm taking a nestJS course in order to be sure that this is what I want by praticing a little. If you didn't do it yet, I suggest you try to code a todo app or a similar example API using nest, so you can "feel" if this is indeed what you want to use in this larger-scale project.
Some of the characteristics that got my attention to nestJS are typescript, a lot of annotations/decorations, an oppinionated approach to organizing the project, nice documentation and discord, and it's evolution at npm trends shows me it's probably not going to vanish or get buggy anytime soon.
Have you checked out Hapi as an alternative? I'ts not Typescript by default though. If that doesn't seem too interesting, it sounds like you want to go with NestJS :)
We choose Next.js for our React framework because it's very minimal and has a very organized file structure. Also, it offers key features like zero setups, automatic server rendering and code splitting, typescript support. Our app requires some loading time to process the video, server-side rendering will allow our website to display faster than client-side rending.
We’re a new startup so we need to be able to deliver quick changes as we find our product market fit. We’ve also got to ensure that we’re moving money safely, and keeping perfect records. The technologies we’ve chosen mix mature but well maintained frameworks like Django, with modern web-first and api-first front ends like GraphQL, NextJS, and Chakra. We use a little Golang sparingly in our backend to ensure that when we interact with financial services, we do so with statically compiled, strongly typed, and strictly limited and reviewed code.
You can read all about it in our linked blog post.
Next.js is probably the most enjoyable React framework our team could have picked. The development is an extremely smooth process, the file structure is beautiful and organized, and the speed is no joke. Our work with Next.js comes out much faster than if it was built on pure React or frameworks alike. We were previously developing all of our projects in Meteor before making the switch. We left Meteor due to the slow compiler and website speed. We deploy all of our Next.js projects on Vercel.
My backend set up is Prisma / GraphQL-Yoga at the moment, and I love it. It's so intuitive to learn and is really neat on the frontend too, however, there were a few gotchas when I was learning! Especially around understanding how it all pieces together (the stack). There isn't a great deal of information out there on exactly how to put into production my set up, which is a backend set up on a Digital Ocean droplet with Prisma/GraphQL Yoga in a Docker Container using Next & Apollo Client on the frontend somewhere else. It's such a niche subject, so I bet only a few hundred people have got a website with this stack in production. Anyway, I wrote a blog post to help those who might need help understanding it. Here it is, hope it helps!
Pros of NestJS
- Powerful but super friendly to work with51
- Fast development39
- Easy to understand documentation38
- Angular style syntax for the backend35
- NodeJS ecosystem31
- Its easy to understand since it follows angular syntax26
- Good architecture16
- Integrates with Narwhal Extensions12
- Typescript makes it well integrated in vscode12
- Graphql support easy8
- Easily integrate with others external extensions5
- Official courses1
Pros of Next.js
- Automatic server rendering and code splitting47
- Built with React42
- Easy setup33
- Zero setup22
- Static site generator20
- Incremental static regeneration12
- Simple deployment12
- Frictionless development10
- Filesystem as an API10
- Well Documented9
- Everything is a function9
- Has many examples and integrations8
- Isomorphic React applications7
- File based routing + hooks built in4
Sign up to add or upvote prosMake informed product decisions
Cons of NestJS
- User base is small. Less help on Stackoverflow9
- Difficult to debug8
- Angular-like architecture4
- Updates with breaking changes2
- Frontend in backend1
Cons of Next.js
- Structure is weak compared to Angular(2+)9
Sign up to add or upvote consMake informed product decisions
What is NestJS?
What is Next.js?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions