My TypeScript Software Design & Architecture book just prelaunched! Check out solidbook.io.
Close

What's Unscalable about JavaScript? | TypeScript OOP

Aug 21st, 2019 / 2 min read / Share / Edit on GitHub
TypeScript is called JavaScript that scales. What's so unscalable about JavaScript?

Microsoft called TypeScript JavaScript that scales... what's so unscalable about JavaScript?

With respect to software development, there are two ways to think about scalability.

  1. Performance scalability
  2. Productivity scalability

TypeScript is meant to address 2. Productivity scalability.

Like most dynamically-typed languages, the lack of types in JavaScript can drastically improve initial productivity levels on certain projects, but there are factors that exist in other projects (team size, code size, intended code lifespan, domain complexity), in which the lack of types can be detrimental to code quality and understandability.

It's been agreed upon that:

  • It's better enable the compiler to catch silly bugs, typos, and other errors at compile time, rather than in production at runtime.
  • Tests are the best documentation possible for your code. Types are no substitute for writing tests, but they can do a good job at reducing the surface area of bugs.
  • Tests also enable faster and safer refactoring. Similarly, if no tests exist, types can (at the very least) catch syntatic inaccuracies.

We've talked about it previously, but TypeScript addresses #3 of the Hard Software Problems: The Compled Domain Problem.

See also: "When to Use TypeScript", a Detailed Guide through Common Scenarios.



Discussion

Liked this? Sing it loud and proud 👨‍🎤.


0 Comments

Be the first to leave a comment

Submit

Stay in touch!



About the author

Khalil Stemmler

Khalil Stemmler is a Developer / Designer and co-founder of Univjobs. He frequently publishes articles about Domain-Driven Design and Advanced TypeScript & Node.js best practices for large-scale applications.



View more in TypeScript



You may also enjoy...

A few more related articles

An Introduction to Domain-Driven Design - DDD w/ TypeScript
Jul 30th, 2019 / 12 min read
Domain-Driven Design is the approach to software development which enables us to translate complex problem domains into rich, expr...
Handling Collections in Aggregates (0-to-Many, Many-to-Many) - Domain-Driven Design w/ TypeScript
Jul 25th, 2019 / 10 min read
In this article, we discuss how we can use a few CQS principles to handle unbounded 0-to-many or many-to-many collections in aggre...
Challenges in Aggregate Design #1 - Domain-Driven Design w/ TypeScript
Jul 25th, 2019 / 5 min read
In this series, we answer common questions in aggregate design. Here's an article orignating from the question, "How can a domain ...
How to Design & Persist Aggregates - Domain-Driven Design w/ TypeScript
Jul 24th, 2019 / 28 min read
In this article, you'll learn how identify the aggregate root and encapsulate a boundary around related entities. You'll also lear...

Want to be notified when new content comes out?

Join 2000+ other developers learning about Domain-Driven Design and Enterprise Node.js.

I won't spam ya. 🖖 Unsubscribe anytime.

Get updates