Need advice about which tool to choose?Ask the StackShare community!

NestJS

2.3K
2.8K
+ 1
326
Play

744
601
+ 1
496
Add tool

NestJS vs Play: What are the differences?

Developers describe NestJS as "A progressive Node.js framework for building efficient and scalable server-side applications by @kammysliwiec". Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming) Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.. On the other hand, Play is detailed as "The High Velocity Web Framework For Java and Scala". Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

NestJS and Play belong to "Frameworks (Full Stack)" category of the tech stack.

"Powerful but super friendly to work with" is the primary reason why developers consider NestJS over the competitors, whereas "Scala" was stated as the key factor in picking Play.

NestJS and Play are both open source tools. It seems that NestJS with 17.4K GitHub stars and 1.22K forks on GitHub has more adoption than Play with 11.2K GitHub stars and 3.77K GitHub forks.

Coursera, Keen, and Codacy are some of the popular companies that use Play, whereas NestJS is used by Sofit Software, Quero Education, and YABAWT. Play has a broader approval, being mentioned in 112 company stacks & 47 developers stacks; compared to NestJS, which is listed in 12 company stacks and 13 developer stacks.

Advice on NestJS and Play
Leonardo Viada
Project manager and web developer at Revo Digital · | 4 upvotes · 2.7M views
Needs advice
on
PlayPlayRailsRails
and
ScalaScala
at

In the past few months, a project we're working on grew up quite fast. Since we're adding more and more features, I'm considering migrating my Express/TS REST API towards a more solid and more "enterprise-like" framework. Since I am experienced with TypeScript but not so much with Rails nor Play (Scala), I'd like to have some advice on which one could provide the best development experience, and most importantly, the smoothest paradigm transition from the JS/TS world. I've worked on some personal project with Rails, but I've found the Ruby language really distant from what the TypeScript ecosystem and syntax are, whereas on the opposite - during the brief tours I've taken in the past weeks - it's been a pleasure coding in Scala. Obviously, there are some key differences between the two languages - and the two frameworks consequently - but despite all the ROR automation and ease of use I don't despise at all Scala's pragmatic and great features such as static typing, pattern matching, and type inference. So... Please help me out with the choice! Regards

See more
Replies (4)
Kevin Emery
QE Systems Engineer at Discovery, Inc. · | 6 upvotes · 53.5K views
Recommends
on
RailsRails

I don't have the Scala experience to compare the two, but I can say that Ruby is a wonderful language. For procedural programming where you don't need a lot of concurrent execution threads, it's superior to Node.JS in my opinion. All of the concepts from Typescript have equivalent syntax in Ruby, but there are fewer symbols (e.g. () => { ... }); ) and more keywords (eg 'do ... end'). It's a very flexible language and allows for a lot of different approaches to how it's written, so coding standards and careful organization is important. In the long run, however, you'll find it quicker to debug than Node.JS and just as powerful.

See more
ALESSIO SALTARIN
Distinguished IT Architect at IBM · | 5 upvotes · 54.3K views

If you are comfortable with TypeScript, why not evolve to a C# ecosystem? Asp.Net Core + Entity Framework is a mature and well supported technology. As far as I can see in the enterprise market, the most adopted choice is still Java. So, maybe you may have a look to SpringBoot - and ultimately Quarkus.

See more
Reza Malek
at Meam Software Engineering Group · | 3 upvotes · 45.7K views
Recommends
on
RailsRailsScalaScala

This is advice regardless of your background and requirements. The Play framework has a terrible and complicated design, don't risk it. I even suggest Spring and Kotlin over it! You can use Scala for small services and Data Engineering stuff and benefit optimizations and threading of JVM. RoR, on the other hand, has a huge development speed, which I believe is a big advantage cause you can handle performance bottlenecks later. Also, Scala has another downside, which is featureful in terms of OO and FP paradigms, which makes anyone write code freely with any personal style and makes it a problem in a team, Hence a coding style has to be defined if there would be Scala development team.

See more
Hosam Aly
Senior Software Engineer · | 3 upvotes · 45.6K views
Recommends
on
PlayPlayRailsRailsScalaScala

If software performance is your top priority, then Scala/Play is probably best. If developer productivity is your top priority, then Ruby on Rails is the best choice in my opinion.

The Rails framework is batteries-included. The framework takes care of many things by default so that you don't have to. Logging, security, etc. It's also well-integrated; for example, controllers understand models out of the box. I had a better experience with RoR than with Play.

On the other hand, Scala and the JVM are more performant in general, so they can scale to serve more requests per second on the same hardware.

If you're considering serverless functions, then Scala is probably a better choice because it would be faster to load, giving you better economics.

See more
Rafsanjanee Rizvi
Owner at Mingchen Information And Technology · | 4 upvotes · 371.3K views
Needs advice
on
ExpressJSExpressJSNestJSNestJS
and
Spring BootSpring Boot

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.

See more
Replies (2)

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

See more
Recommends

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.

See more
Needs advice
on
DjangoDjangoNestJSNestJS
and
Spring FrameworkSpring Framework

Hi there, I'm deciding the technology to use in my project.

I need to build software that has:

  • Login
  • Register
  • 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.

See more
Replies (4)
Recommends
on
NestJSNestJS

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.

See more
Mohammad-Ali A'râbi
Software Engineer at AppTec GmbH · | 5 upvotes · 207.1K views
Recommends
on
NestJSNestJS

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.

See more
Amit Parameshwar
NodeJS Intern at CartRabbit · | 3 upvotes · 563K views
Recommends
on
Node.jsNode.js

Just a simple Node.JS app with templating engine for UI can be sufficient for what you want to achieve.

See more
Recommends
on
Spring FrameworkSpring Framework

Spring boot with Spring Security[JWT], Websocket, Thymeleaf or Mustache, and styling with Bootstrap.

See more
Slimane Deb
Needs advice
on
NestJSNestJS
and
Spring BootSpring Boot
in

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.

See more
Replies (2)
Recommends
on
NestJSNestJS

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/

See more
Recommends
on
KotlinKotlin

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?

See more
Louai Hamada
Full Stack Web Developer · | 7 upvotes · 511K views
Needs advice
on
ExpressJSExpressJSNestJSNestJS
and
Node.jsNode.js

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)

Option 2 is enticing to me because recently I came to love NestJS and it provides more scalability for the project and uses Typescript in the best way and uses Express under the hood. Also I come from an Angular 2 background, which I think is the best frontend framework (my opinion, and I know React quite well), which makes Nest feel familiar to me because of the similarity between Nest and Angular. Option 1 on the other hand uses Express which is a minimalist framework, very popular one, but it doesn't provide the same scalability and brings decision fatigue about what to combine with it and may not utilize Typescript in the best way. Yet, on the other hand, it is flexible and it may be easier to manipulate things in different ways with it. Another very important thing is that it would be easier in my view to hire Node developers with skills in Express than NestJs. The majority of Node developers are much more familiar with JavaScript and Express.

What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest

See more
Replies (6)
Wender Machado
Full Stack Engineer at RG Sistemas · | 9 upvotes · 398.3K views
Recommends
on
NestJSNestJS

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.

See more
Rhoger Anacleto
Developer at Magrathea Labs · | 5 upvotes · 398.4K views
Recommends
on
NestJSNestJS

Hi Louai,

I am quite sure that you know the answer to your problem. And I am here to help you to follow your arrow. I have worked with the most popular Nodejs frameworks and I can sure you that there's no stack better than NestJS (at all). Typescript is the best thing that happened with Javascript, this is a fact. Ans NestJS make a such wonderful job using all the best Typescript tools. NestJS is the most mature and organized API manager. Its modular dependence injection, the use of DDD, the solid idea of single responsibility, it's unit a and e2e testing support, its documentation is the most incredible work in the world of Nodejs. You won't regret choosing this framework, even if your application grows a lot. If you follow the documentation tips you will be able to create an amazing and organized application.

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.

See more
Recommends
on
NestJSNestJS

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.

See more
Recommends
on
NestJSNestJS

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.

See more
Recommends
on
NestJSNestJS

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.

See more
Recommends
on
hapihapi

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 :)

See more
Decisions about NestJS and Play
Radoslaw Fabisiak

We builded Duomly with: BE: Node.JS & Nest.JS & TypeScript & PostgreSQL and FE: React & Sass & Javascript.

The whole of the stack is JS related what helps us to keep development on a track. When building backend we decided to go go for TS & Nest.js because we had experience with Javascript and still wanted to have control over types.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of NestJS
Pros of Play
  • 54
    Powerful but super friendly to work with
  • 42
    Fast development
  • 40
    Easy to understand documentation
  • 36
    Angular style syntax for the backend
  • 32
    NodeJS ecosystem
  • 31
    Typescript
  • 27
    Its easy to understand since it follows angular syntax
  • 18
    Good architecture
  • 13
    Integrates with Narwhal Extensions
  • 12
    Typescript makes it well integrated in vscode
  • 8
    Graphql support easy
  • 7
    Agnosticism
  • 5
    Easily integrate with others external extensions
  • 1
    Official courses
  • 81
    Scala
  • 55
    Web-friendly architecture
  • 55
    Built on akka
  • 50
    Stateless
  • 47
    High-scalable
  • 46
    Fast
  • 40
    Open source
  • 34
    Java
  • 27
    High velocity
  • 24
    Fun
  • 9
    Lightweight
  • 8
    Non-blocking io
  • 6
    Developer friendly
  • 5
    Simple template engine
  • 4
    Scalability
  • 3
    Pure love
  • 2
    Resource efficient

Sign up to add or upvote prosMake informed product decisions

Cons of NestJS
Cons of Play
  • 10
    Difficult to debug
  • 10
    User base is small. Less help on Stackoverflow
  • 5
    Angular-like architecture
  • 3
    Updates with breaking changes
  • 3
    Javascript
  • 1
    Frontend in backend
  • 1
    Unstable
  • 3
    Evolves fast, keep up with releases
  • 1
    Unnecessarily complicated

Sign up to add or upvote consMake informed product decisions

What is NestJS?

Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.

What is Play?

Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

Need advice about which tool to choose?Ask the StackShare community!

What companies use NestJS?
What companies use Play?
See which teams inside your own company are using NestJS or Play.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with NestJS?
What tools integrate with Play?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to NestJS and Play?
AdonisJS
It is a Node.js Framework which is highly focused on developer ergonomics, stability and confidence.
FeathersJS
Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets and flexible plug-ins.
Koa
Koa aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. Through leveraging generators Koa allows you to ditch callbacks and greatly increase error-handling. Koa does not bundle any middleware.
LoopBack
A highly-extensible, open-source Node.js framework that enables you to create dynamic end-to-end REST APIs with little or no coding. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.
hapi
hapi is a simple to use configuration-centric framework with built-in support for input validation, caching, authentication, and other essential facilities for building web applications and services.
See all alternatives