Java vs TypeScript

Get Advice Icon

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

Java
Java

27.4K
16.9K
+ 1
3.2K
TypeScript
TypeScript

10.6K
7.9K
+ 1
400
Add tool

Java vs TypeScript: What are the differences?

Developers describe Java as "A concurrent, class-based, object-oriented, language specifically designed to have as few implementation dependencies as possible". Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!. On the other hand, TypeScript is detailed as "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.

Java belongs to "Languages" category of the tech stack, while TypeScript can be primarily classified under "Templating Languages & Extensions".

"Great libraries", "Widely used" and "Excellent tooling" are the key factors why developers consider Java; whereas "More intuitive and type safe javascript", "Type safe" and "JavaScript superset" are the primary reasons why TypeScript is favored.

TypeScript is an open source tool with 51.1K GitHub stars and 7.06K GitHub forks. Here's a link to TypeScript's open source repository on GitHub.

Airbnb, Uber Technologies, and Spotify are some of the popular companies that use Java, whereas TypeScript is used by Slack, Asana, and Rainist. Java has a broader approval, being mentioned in 2399 company stacks & 2724 developers stacks; compared to TypeScript, which is listed in 982 company stacks and 1447 developer stacks.

- No public GitHub repository available -

What is Java?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

What is TypeScript?

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

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

Why do developers choose Java?
Why do developers choose TypeScript?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con

    Sign up to add, upvote and see more consMake informed product decisions

    What companies use Java?
    What companies use TypeScript?

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

    What tools integrate with Java?
    What tools integrate with TypeScript?

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

    What are some alternatives to Java and TypeScript?
    C
    Abstract
    Abstract builds upon and extends the stable technology of Git to host and manage your work.
    Go
    Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
    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.
    Scala
    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.
    See all alternatives
    Decisions about Java and TypeScript
    Java
    Java
    Visual Studio Code
    Visual Studio Code
    JavaScript
    JavaScript
    TypeScript
    TypeScript

    I use TypeScript because it is strongly typed superset of JavaScript that provides many benefits. Integration with #IDE like Visual Studio Code is excellent. The main benefit is maintainability. Many error can be caught before code running. Also Angular recommends TypeScript as better alternative to JavaScript . Syntax is very easy to learn especially for people from the Java world.

    See more
    React Native
    React Native
    Java
    Java
    Flow (JS)
    Flow (JS)
    TypeScript
    TypeScript

    I use TypeScript for Web Applications and for both frontend and backend because it has a lot of tooling around it and they really got the types and type safety right. Flow (JS) on the other hand lacks tooling and most of the times I scramble to find the right way of building my contracts in which TypeScript is very intuitive and natural. Additionally TypeScript is very similar to Java so your backend engineers and full stack engineers can work with it without much of context switch.

    The only time I think Flow shines is (based on probably my outdated knowledge) Flow is/was the only option if you want/wanted to build a React Native application mainly because React Native transpiler at the time I was working with it would only work with flow.

    See more
    Flow (JS)
    Flow (JS)
    TypeScript
    TypeScript

    I use TypeScript because it isn't just about validating the types I'm expecting to receive though that is a huge part of it too. Flow (JS) seems to be a type system only. TypeScript also allows you to use the latest features of JavaScript while also providing the type checking. To be fair to Flow (JS), I have not used it, but likely wouldn't have due to the additional features I get from TypeScript.

    See more
    David Koblas
    David Koblas
    VP Engineering at Payment Rails · | 9 upvotes · 8.4K views
    atPayment RailsPayment Rails
    TypeScript
    TypeScript
    Flow (JS)
    Flow (JS)
    JavaScript
    JavaScript

    We originally (in 2017) started rewriting our platform from JavaScript to Flow (JS) but found the library support for Flow was lacking. After switching gears to TypeScript we've never looked back. At this point we're finding that frontend and backend libraries are supporting TypeScript out of the box and where the support is missing that the commuity is typically got a solution in hand.

    See more
    Forrest Norvell
    Forrest Norvell
    engineering manager at self-employed · | 6 upvotes · 17.4K views
    Visual Studio Code
    Visual Studio Code
    Flow (JS)
    Flow (JS)
    ESLint
    ESLint
    TSLint
    TSLint
    TypeScript
    TypeScript

    I use TypeScript because the tooling is more mature (the decision to discontinue TSLint in favor of moving all its checks to ESLint is a thoughtful and mature decision), there's a ton of examples and tutorials for it, and it just generally seems to be where the industry is headed. Flow (JS) is a fine tool, but it just hasn't seen the uptake that TS has, and as a result is lacking a lot of the nicer small things, like thorough Visual Studio Code integration, offered by TS.

    See more
    Tomáš Pustelník
    Tomáš Pustelník
    Visual Studio Code
    Visual Studio Code
    Flow (JS)
    Flow (JS)
    TypeScript
    TypeScript

    We currently use TypeScript at work. Previously we used Flow (JS) but it was sometimes really difficult to make the types work the way you want. Especially non-trivial types were problematic. And the IDE support wasn't good, Flow took too much resources and sometimes remain stuck and do not show errors (I use Visual Studio Code). With TypeScript we almost do not have these problems. IDE support is superb, working with types is much easier and typing system seems more mature and powerful. There are some downsides (like partion inheritance etc.), but TS team is still pushing it forward. So for me TypeScript is clear winner.

    See more
    JavaScript
    JavaScript
    Flow (JS)
    Flow (JS)
    TypeScript
    TypeScript

    If you will start a project from scratch I recommend to use TypeScript. But, If you work with legacy projects written in JavaScript I recommend Flow (JS). Both tools have the same objective: reduce the bad code (which create illegible code, generate bugs e problems to maintenance). Flex helps you to avoid fall in bad codes, but TypeScript prevent you to c you to create bad codes. I believe cause this some JavaScript fans don't like TS, because TS block you to write some types o code. This is the fundamental difference between TS and Flow: Flow avoid problems, but no force. TS force you to prevent problems.

    See more
    .NET Core
    .NET Core
    React
    React
    AngularJS
    AngularJS
    TypeScript
    TypeScript

    I use TypeScript because it's adoption by many developers, it's supported by many companies, and it's growth. AngularJS, React, @ASP.NET Core. I started using it in .NET Core, then for a job. Later I added more Angular experience and wrote more React software. It makes your code easier to understand and read... which means it makes other people's code easier to understand and read.

    See more
    TypeScript
    TypeScript

    I use TypeScript because:

    • incredible developer tooling and community support
    • actively developed and supported by Microsoft (yes, I like Microsoft) ;)
    • easier to make sense of a TS codebase because the annotations provide so much more context than plain JS
    • refactors become easier (VSCode has superb support for TS)

    I've switched back and forth between TS and Flow and decided a year ago to abandon Flow completely in favor of TS. I don't want to bash Flow, however, my main grievances are very poor tooling (editor integration leaves much to be desired), a slower release cycle, and subpar docs and community support.

    See more
    Gustavo Muñoz
    Gustavo Muñoz
    Web UI Developer at Globant · | 2 upvotes · 5.3K views
    CoffeeScript
    CoffeeScript
    JavaScript
    JavaScript
    Flow (JS)
    Flow (JS)
    React
    React
    TypeScript
    TypeScript
    Angular 2
    Angular 2
    #ECMA
    #Angular

    Long ago when Angular 2 evolved I had to decide between the new #Angular and TypeScript or React. I really love typing my code, but forced to use TypeScript was a bit too much. I prefer the new #ECMA standard and the evolution of the old and reliable JavaScript. So finding Flow (JS) was an incredible milestone in my career as a developer. Finally, I could use types in my code, and JavaScript with the new standard. I already had the experience of CoffeeScript, so TypeScript was not an option.

    See more
    Vishwa Bhat
    Vishwa Bhat
    Fullstack Developer at Sequoia · | 10 upvotes · 4.4K views
    atSequoia Consulting GroupSequoia Consulting Group
    Java
    Java
    Go
    Go
    Node.js
    Node.js

    Our new backend micro services are primarily written in Node.js and Go and legacy systems are written in Java. For our new stack decision, we aimed to achieve greater developer productivity, low IO latency and good community so we had couple of technologies in hand to choose but finally we concluded to go for Node.js for API layer and Go for CPU/IO intensive tasks. Currently the inter-services communication is happening via REST but soon to be moved to RPC-based communication.

    See more
    Praveen Mooli
    Praveen Mooli
    Technical Leader at Taylor and Francis · | 11 upvotes · 165K views
    MongoDB Atlas
    MongoDB Atlas
    Amazon S3
    Amazon S3
    Amazon DynamoDB
    Amazon DynamoDB
    Amazon RDS
    Amazon RDS
    Serverless
    Serverless
    Docker
    Docker
    Terraform
    Terraform
    Travis CI
    Travis CI
    GitHub
    GitHub
    RxJS
    RxJS
    Angular 2
    Angular 2
    AWS Lambda
    AWS Lambda
    Amazon SQS
    Amazon SQS
    Amazon SNS
    Amazon SNS
    Amazon Kinesis Firehose
    Amazon Kinesis Firehose
    Amazon Kinesis
    Amazon Kinesis
    Flask
    Flask
    Python
    Python
    ExpressJS
    ExpressJS
    Node.js
    Node.js
    Spring Boot
    Spring Boot
    Java
    Java
    #Data
    #Devops
    #Webapps
    #Eventsourcingframework
    #Microservices
    #Backend

    We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

    To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

    To build #Webapps we decided to use Angular 2 with RxJS

    #Devops - GitHub , Travis CI , Terraform , Docker , Serverless

    See more
    StackShare Editors
    StackShare Editors
    Flow (JS)
    Flow (JS)
    JavaScript
    JavaScript
    CoffeeScript
    CoffeeScript
    TypeScript
    TypeScript

    From a StackShare community member: "We are looking to rewrite our outdated front-end with TypeScript. Right now we have a mix of CoffeeScript and vanilla JavaScript. I have read that adopting TypeScript can help enforce better code quality, and best practices. I also heard good things about Flow (JS). Which one would you recommend and why?"

    See more
    Jason Barry
    Jason Barry
    Cofounder at FeaturePeek · | 4 upvotes · 10.7K views
    atFeaturePeekFeaturePeek
    npm
    npm
    Yarn
    Yarn
    Babel
    Babel
    Sublime Text
    Sublime Text
    JavaScript
    JavaScript
    React
    React
    TypeScript
    TypeScript
    Flow (JS)
    Flow (JS)
    #Frontend

    I think our #Frontend stack is pretty standard – but we have taken some deviations from a typical modern stack:

    • Flow (JS) instead of TypeScript. Flow was an easy choice 2+ years ago, as both flow and React were (and still are) maintained by Facebook. Today, it seems that the JavaScript community has settled on TypeScript as the winner. For new projects, I'd choose TS, but I don't see the point in migrating an existing project from flowtype to TS, when the end result will be roughly the same. Sure, memory usage is a bit high, and every now and then I have to kill some zombie processes, but our text editors (Sublime Text), CI scripts, and Babel are already set up to take advantage of the type safety that flow offers. When/if the React team writes React itself in TS, then I'll take a closer look – until then, flow works for us.

    • Yarn instead of npm. When yarn debuted, we never looked back. Now npm has pretty much caught up with speed and lockfiles, but yarn gives me confidence that my dependency installs are deterministic. Really interested in the plug-n-play (PnP) feature that removes the need for a node_modules folder, but haven't implemented this yet.

    See more
    Visual Studio
    Visual Studio
    Java
    Java
    C#
    C#

    I use C# because of the ease of designing user interfaces compared to Java. Using Visual Studio makes C# a breeze for prototyping and creating apps and I really appreciate how quickly I can turn an idea into reality. I was first introduced to C# in a special topics course and quickly started preferring it over Java. The similarities between the two made the switch easy while the added benefits C# offers made it very worth it.

    See more
    Interest over time
    Reviews of Java and TypeScript
    Avatar of lpellegr
    Noticeable
    Review ofTypeScriptTypeScript

    Typed JavaScript is just fantastic for medium to large size projects. The type system is well thought and compatible with standard JavaScript. Almost any new Javascript-based development should use TypeScript to save time and prevent technical debt over time.

    How developers use Java and TypeScript
    Avatar of NewCraft
    NewCraft uses TypeScriptTypeScript

    Typescript has been a win because, in general, it makes codebase maintenance less brittle. It's significantly easier to refactor in TS than JS, which encourages incremental improvements, file re-organizing, etc. Our developers are happier with the overall development experience.

    The downside is that TS sometimes exacerbates problems caused by Node's fragmented ecosystem. Sometimes @types/ don't work, other times types are outdated. This can lead to problems with newly-installed libraries.

    If your project is big enough, I'd say TS is nearly always worth it, but it can make selecting libraries a pain.

    Avatar of Brian Fults
    Brian Fults uses JavaJava

    Pretty much everything - Java is reasonably fast, reasonably safe, and reasonably expressive. I wouldn't call it the best at any of those things. The real advantage to me is that the virtual machine is ubiquitous and many people can understand it. Since I have the most experience in this language, it's my tool of choice for most projects.

    I've also been learning JavaFx so that I can build user interfaces without the web. I've started several single-page-application projects that worked, but felt like workarounds or hacks and would be better-served as self-contained applications.

    Avatar of denkbar.io
    denkbar.io uses JavaJava

    Do I really need to explain? Well to me, the most appealing factor in Java besides the unbelievable community and vast array of available libraries, is just the amount of effort that has been put in the modern JVM. Decades of optimization and improvements have lead to a terrific piece of technology. I admire the people contributed to that.

    Avatar of Matt Welke
    Matt Welke uses TypeScriptTypeScript

    Used for Node.js personal projects that I think will have a longer lifetime than others, or that are combined with a web front end component like Angular (to share types).

    Generally a poor developer experience. Usage decreasing recently compared to other preferred programming languages/platforms.

    Avatar of Scrayos UG (haftungsbeschränkt)
    Scrayos UG (haftungsbeschränkt) uses JavaJava

    Shouldn't surprise anyone, as minecraft is also java-based. Java is used for much more than just the plugins though. JCVortex (our API) is also served with vert.x (Java) and many of our team-internal tools also originated from java or are still java-applications.

    Avatar of Marc3842h
    Marc3842h uses TypeScriptTypeScript

    TypeScript is used in Kuro (https://github.com/Marc3842h/kuro).

    Kuro is the browser facing portion of shiro. Typescript is the language in which the web server and the frontend scripts are written in. They later get compiled down to vanilla JavaScript.

    Avatar of Web Dreams
    Web Dreams uses JavaJava

    The most popular language in the world, definitely every programmer would use the Java language at some point. Frankly, I only use java when it’s a must. I find the language to be a little bit tedious when working with it.

    Avatar of brenoinojosa
    brenoinojosa uses JavaJava

    bytelore.com makes extensive use of Java in its applications. We use Java due to its performance, community and the number of other projects built in the language. We have many projects and libraries built in Java.

    Avatar of John Harris
    John Harris uses TypeScriptTypeScript

    Excellent design-time type checking and the ability for the Typescript compiler to attach typing information to metadata at compile time allows for relatively simple type checking at run-time as well.

    Avatar of Blood Bot
    Blood Bot uses TypeScriptTypeScript

    We, our team can sleep comfortable at night know "x is undefined" will not occur in production. It's also really helpful as IDE help in code completion when they know types.

    How much does Java cost?
    How much does TypeScript cost?
    Pricing unavailable
    Pricing unavailable