nathantranquilla.me

The 4 Pillars Of Next-Gen Web Dev

by Nathan Tranquilla

Having witnessed the evolution of web development for more than a decade, we are now at a moment that warrants pause. The landscape is changing rapidly right now; TypeScript is showing cracks (long build times, incomplete type safety, and partial abandonment by big companies), and developers are wondering if TypeScript is truly the apex of the type-safe web development experience. We must find a path forward beyond TypeScript and towards more stable and maintainable next-generation web applications.

Modern web development has been dominated by the growth of JavaScript. Its footprint used to be small—served alongside some PHP. Then came PHP with a little jQuery. But soon the demands of the modern web outgrew what jQuery could provide. Then came the emergence of fledgling UI frameworks like Backbone, which brought some organization and structure to development, followed by Angular, React, and others.

JavaScript seems like it is here to stay. But now there are many languages with strong type systems that compile to JavaScript or WebAssembly, challenging TypeScript’s dominance. I believe the next generation of web development languages will be selected based on these four criteria.

Strong Type System

People choose languages for many reasons that sometimes add nothing of measurable benefit. Sometimes it is based on subjective preferences like “pretty syntax” or the use of semicolons or spacing. It may be based on current trends or language choices of big companies. These factors may be interesting or more ergonomic, but a strong type system adds measurable benefits. These benefits include early error detection, developer confidence, consistent development velocity, reduced testing burden, fewer bugs, fewer runtime errors, and complete application logic coverage.

So we should know how to identify a strong type system. Here’s what to look for:

  • Type Safety: Invalid operations are caught at compile-time.
  • Static Type Checking: Types are enforced before execution.
  • No Implicit Coercion: Automatic conversions are prohibited.
  • Expressive Types: Algebraic data types and pattern matching for precise data modeling.
  • Compile-Time Null Safety: Explicit handling of null/undefined.
  • Exhaustive Matching: All cases in logic must be covered.
  • Type Inference: Automatic type deduction without compromising safety.
  • Soundness: No type errors at runtime.
  • Safe Array Access: Bounds checking to prevent crashes.

While a strong type system is important, it won’t be adopted unless it feels familiar.

Language Lineage

Next-generation web development languages must fix the problems with current languages while also feeling familiar. This familiarity is relative to your team and development ecosystem. For example, PureScript would be familiar to Haskell developers but far too unfamiliar and requiring too much upfront investment for JavaScript developers. Its type system, though very robust, is too distant from the type systems in JavaScript or even TypeScript and will likely be resisted for this reason.

It’s important to understand how languages evolve—they reveal their deficiencies by adding features that attempt to solve them. For example, TypeScript brought a stronger type system to JavaScript because JavaScript developers wanted more stable, maintainable applications. JavaScript also saw the addition of functional libraries like Lodash and Underscore, and frameworks like React, because JavaScript developers wanted more mathematical certainty in their applications and simpler reasoning.

Next-generation web development languages will have a strong type system that fixes the problems of their parent language while also feeling familiar. However, they’re not complete without being ready for the web.

Framework Readiness

The web is a complex environment, and without a framework to guide development, you’re essentially back to the days of jQuery, where spaghetti code abounded and each web application, if broken, was broken in its own unique way. A framework provides an opinionated approach to developing web apps that works for the complexity of the modern web. This has been the power of React, Angular, Vue, and others—they have enabled web applications to be developed consistently across projects, teams, and companies.

A next-generation web development language will either have a battle-tested framework or provide bindings to existing frameworks. However, the transition to next-generation web development should be gradual.

Incremental Adoption

The path towards next-generation web development should be evolutionary. This approach helps manage risk, learn from mistakes, and measure success. Frameworks like Elm have provided insights to the industry that have proven beneficial. For example, Elm introduced the insight that the view should be the outcome of changes to the state model. This concept was adopted enthusiastically by the creators of Redux, who continued to borrow other concepts from Elm like immutability and functional style. However, Elm is not easily integrated into existing web applications, so it has served more as an ideal to aspire to. On the other hand, languages like ReScript and PureScript compile to JavaScript, which makes incremental adoption possible and enables the evolution towards next-generation web development.

Final Thoughts

So where are the trends pointing? JavaScript isn’t going away—yet. I foresee that JavaScript will be reduced to compiler output, while other languages battle for dominance with WebAssembly as their compilation target. Once JavaScript’s role is significantly reduced, I imagine a new generation will be upon us, but that is too far ahead to see clearly right now.

In the near term, these four pillars form a solid foundation for you to advance into next-generation web development. Each has merit on its own, but only together will you achieve stable, maintainable web applications.


Sign up to my newsletter to get more Next-Gen Web Dev insights!