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

Node.js

98.8K
78.7K
+ 1
8.3K
TypeScript

38.5K
28.4K
+ 1
450
Add tool

Node.js vs TypeScript: 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; TypeScript: A superset of JavaScript that compiles to clean JavaScript output. TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.

Node.js can be classified as a tool in the "Frameworks (Full Stack)" category, while TypeScript is grouped under "Templating Languages & Extensions".

"Npm", "Javascript" and "Great libraries" are the key factors why developers consider Node.js; whereas "More intuitive and type safe javascript", "Type safe" and "JavaScript superset" are the primary reasons why TypeScript is favored.

Node.js and TypeScript are both open source tools. TypeScript with 50.5K GitHub stars and 6.98K forks on GitHub appears to be more popular than Node.js with 35.5K GitHub stars and 7.78K GitHub forks.

reddit, Slack, and MIT are some of the popular companies that use Node.js, whereas TypeScript is used by Slack, Clever, and Repro. Node.js has a broader approval, being mentioned in 4054 company stacks & 3897 developers stacks; compared to TypeScript, which is listed in 954 company stacks and 1390 developer stacks.

Decisions about Node.js and TypeScript

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.

See more
Slava Korolev
Senior Software Engineer at Diff Stories · | 12 upvotes · 10.5K views

SQL or NoSQL?

As a general rule, I would recommend using the SQL database over NoSQL because:

  • working with associations is way easier;
  • you can write complex queries;
  • rigid structure ensures data validation;
  • more developers know how to work with it properly;

But while working on Diff Stories, we choose DynamoDB, and that's why.

Associations

The core object of our product is a Pull Request. All other entities, such as diff blocks, code comments, reviews, etc. are all parts of a pull request. It works really well with document-based storage like DynamoDB because we can save everything as one document, and no associations are needed.

Data structure

Another useful feature for us — JSON as a first-level citizen in DB. We represent a pull request as a set of pages with blocks and additional objects. It is very convenient to save it as a JSON. You can have JSON columns in Postgres, but it's more natural in NoSQL databases.

Connections

Our backend is a Node app written in Typescript. It is deployed serverless on AWS Lambdas. You can say that it's unnecessarily, and you will be right :) But again, if you know how to use it properly, it might be useful. With DynamoDB, you don't have a limit of connections, and that's quite handy if you have serverless architecture.

Pricing (Bonus)

When you are just starting, you count every cent. DynamoDB is super cheap for small databases, and if you're building MVC or don't have many clients yet, it will be almost free for you. But be careful — once requirements for your DB increase, the price will increase too.

I'll be happy to discuss everything above in the comments :)

Meanwhile, you can visit us on Diff Stories

See more
Omran Jamal
CTO & Co-founder at Bonton Connect · | 7 upvotes · 147.7K views

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.

See more
Pros of Node.js
Pros of TypeScript
  • 1.4K
    Npm
  • 1.3K
    Javascript
  • 1.1K
    Great libraries
  • 1K
    High-performance
  • 789
    Open source
  • 477
    Great for apis
  • 467
    Asynchronous
  • 414
    Great community
  • 385
    Great for realtime apps
  • 290
    Great for command line utilities
  • 77
    Node Modules
  • 75
    Websockets
  • 65
    Uber Simple
  • 53
    Great modularity
  • 53
    Allows us to reuse code in the frontend
  • 38
    Easy to start
  • 33
    Great for Data Streaming
  • 29
    Realtime
  • 25
    Awesome
  • 23
    Non blocking IO
  • 16
    Can be used as a proxy
  • 15
    High performance, open source, scalable
  • 14
    Non-blocking and modular
  • 13
    Easy and Fun
  • 12
    Same lang as AngularJS
  • 11
    Easy and powerful
  • 10
    Future of BackEnd
  • 9
    Fast
  • 8
    Cross platform
  • 8
    Scalability
  • 6
    Mean Stack
  • 6
    Fullstack
  • 6
    Simple
  • 5
    Easy concurrency
  • 5
    Great for webapps
  • 4
    Easy to use and fast and goes well with JSONdb's
  • 4
    Friendly
  • 4
    React
  • 4
    Fast, simple code and async
  • 4
    Typescript
  • 3
    Its amazingly fast and scalable
  • 3
    Isomorphic coolness
  • 3
    Great speed
  • 3
    Scalable
  • 3
    Control everything
  • 3
    Fast development
  • 2
    One language, end-to-end
  • 2
    Scales, fast, simple, great community, npm, express
  • 2
    TypeScript Support
  • 2
    Easy to learn
  • 2
    Easy to use
  • 2
    It's fast
  • 2
    Less boilerplate code
  • 2
    Blazing fast
  • 2
    Not Python
  • 2
    Performant and fast prototyping
  • 2
    Sooper easy for the Backend connectivity
  • 2
    Great community
  • 1
    Easy
  • 1
    Lovely
  • 0
    Event Driven
  • 0
    Javascript2
  • 159
    More intuitive and type safe javascript
  • 95
    Type safe
  • 72
    JavaScript superset
  • 46
    The best AltJS ever
  • 27
    Best AltJS for BackEnd
  • 12
    Powerful type system, including generics & JS features
  • 9
    Nice and seamless hybrid of static and dynamic typing
  • 9
    Aligned with ES development for compatibility
  • 8
    Compile time errors
  • 6
    Structural, rather than nominal, subtyping
  • 4
    Angular
  • 3
    Starts and ends with JavaScript

Sign up to add or upvote prosMake informed product decisions

Cons of Node.js
Cons of TypeScript
  • 46
    Bound to a single CPU
  • 37
    New framework every day
  • 33
    Lots of terrible examples on the internet
  • 28
    Asynchronous programming is the worst
  • 22
    Callback
  • 16
    Javascript
  • 11
    Dependency based on GitHub
  • 10
    Dependency hell
  • 10
    Low computational power
  • 7
    Can block whole server easily
  • 6
    Callback functions may not fire on expected sequence
  • 6
    Very very Slow
  • 3
    Unneeded over complication
  • 3
    Breaking updates
  • 3
    Unstable
  • 1
    No standard approach
  • 4
    Code may look heavy and confusing
  • 1
    Hype

Sign up to add or upvote consMake informed product decisions

What is Node.js?

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.

What is TypeScript?

TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.

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

What companies use Node.js?
What companies use TypeScript?

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

What tools integrate with Node.js?
What tools integrate with TypeScript?

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

Blog Posts

Oct 24 2019 at 7:43PM
https://img.stackshare.io/stack/513891/default_86b138c409d64e353c3d509121b4ac1dd9cf31c4.png logo

AppSignal

JavaScriptNode.jsJava+8
5
660
Oct 3 2019 at 7:13PM
https://img.stackshare.io/stack/511159/default_5f04358e03a27bf2607a39dd9b409dd7830ce4d3.png logo

Ably Realtime

JavaScriptPythonNode.js+8
4
3130
Node.jsnpmKubernetes+6
1
1065
GitNode.jsFirebase+5
7
1488
What are some alternatives to Node.js and TypeScript?
AngularJS
AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding.
PHP
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
See all alternatives
Interest over time