Node.js vs TypeScript: What are the differences?
Node.js can be classified as a tool in the "Frameworks (Full Stack)" category, while TypeScript is grouped under "Templating Languages & Extensions".
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.
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.
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.
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.
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.
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.
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
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.
Sign up to add or upvote prosMake informed product decisions
Sign up to add or upvote consMake informed product decisions
What is Node.js?
What is TypeScript?
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
Red Hat, Inc.