Need advice about which tool to choose?Ask the StackShare community!
Node.js vs Scala: What are the differences?
Node.js: A platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices; Scala: A pure-bred object-oriented language that runs on the JVM. Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
Node.js can be classified as a tool in the "Frameworks (Full Stack)" category, while Scala is grouped under "Languages".
"Npm", "Javascript" and "Great libraries" are the key factors why developers consider Node.js; whereas "Static typing", "Jvm" and "Pattern-matching" are the primary reasons why Scala is favored.
Node.js and Scala are both open source tools. Node.js with 35.5K GitHub stars and 7.78K forks on GitHub appears to be more popular than Scala with 11.8K GitHub stars and 2.75K GitHub forks.
According to the StackShare community, Node.js has a broader approval, being mentioned in 4104 company stacks & 4039 developers stacks; compared to Scala, which is listed in 437 company stacks and 324 developer stacks.
We actually initially wrote a lot of networking code in Kotlin but the complexities involved prompted us to try and compile NodeJS for Android and port over all the networking logic to Node and communicate with node over the Java Native Interface.
This turned out to be a great decision considering our battery usage fell by 40% and rate of development increased by a factor of 2.
As a small team, we wanted to pick the framework which allowed us to move quickly. There's no option better than Rails. Not having to solve the fundamentals means we can more quickly build our feature set. No other framework can beat ActiveRecord in terms of integration & ease-of use. To top it all of, there's a lot of attention paid to security in the framework, making almost everything safe-by-default.
Hey guys,
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 Node.js
- Npm1.4K
- Javascript1.3K
- Great libraries1.1K
- High-performance1K
- Open source789
- Great for apis476
- Asynchronous467
- Great community414
- Great for realtime apps385
- Great for command line utilities290
- Node Modules77
- Websockets75
- Uber Simple65
- Great modularity53
- Allows us to reuse code in the frontend53
- Easy to start38
- Great for Data Streaming33
- Realtime29
- Awesome25
- Non blocking IO23
- Can be used as a proxy16
- High performance, open source, scalable15
- Non-blocking and modular14
- Easy and Fun13
- Same lang as AngularJS12
- Easy and powerful11
- Future of BackEnd10
- Fast9
- Cross platform8
- Scalability8
- Simple6
- Fullstack6
- Mean Stack6
- Easy concurrency5
- Great for webapps5
- Easy to use and fast and goes well with JSONdb's4
- Friendly4
- React4
- Fast, simple code and async4
- Typescript4
- Isomorphic coolness3
- Its amazingly fast and scalable3
- Control everything3
- Great speed3
- Fast development3
- Scalable3
- One language, end-to-end2
- Scales, fast, simple, great community, npm, express2
- TypeScript Support2
- Easy to learn2
- Easy to use2
- Less boilerplate code2
- Not Python2
- It's fast2
- Blazing fast2
- Performant and fast prototyping2
- Sooper easy for the Backend connectivity2
- Great community2
- Lovely1
- Event Driven0
- Javascript20
Pros of Scala
- Static typing186
- Jvm177
- Pattern-matching176
- Scala is fun169
- Types137
- Concurrency93
- Actor library88
- Solve functional problems83
- Open source83
- Solve concurrency in a safer way80
- Functional42
- Fast22
- Generics22
- It makes me a better engineer17
- Syntactic sugar15
- Scalable12
- First-class functions10
- Type safety10
- Interactive REPL9
- Expressive8
- SBT7
- Case classes6
- Implicit parameters6
- Rapid and Safe Development using Functional Programming4
- Object-oriented4
- JVM, OOP and Functional programming, and static typing4
- Used by Twitter4
- Functional Proframming3
- Beautiful Code2
- Safety2
- Spark2
- Growing Community2
- DSL1
- Rich Static Types System and great Concurrency support1
- Naturally enforce high code quality1
- Mill build tool1
- Akka Streams1
- Akka1
- Reactive Streams1
- Easy embedded DSLs1
- Freedom to choose the right tools for a job0
Sign up to add or upvote prosMake informed product decisions
Cons of Node.js
- Bound to a single CPU46
- New framework every day37
- Lots of terrible examples on the internet33
- Asynchronous programming is the worst28
- Callback22
- Javascript16
- Dependency based on GitHub11
- Dependency hell10
- Low computational power10
- Can block whole server easily7
- Callback functions may not fire on expected sequence6
- Very very Slow6
- Unneeded over complication3
- Breaking updates3
- Unstable3
- No standard approach1
Cons of Scala
- Slow compilation time8
- Multiple ropes and styles to hang your self5
- Too few developers available3
- Complicated subtyping2
- My coworkers using scala are racist against other stuff1