Choose a single language across backend + frontend — probably Typescript

Gabriel Guimaraes
2 min readDec 12, 2023

--

I’m writing this mainly for my own future reference, and for any of my friends who are considering starting startups and creating web apps.

Choose Typescript as your backend language. Unless you have a *very* good reason to go with something else.

I’ve worked in tech for 10+ years at this point, and spent multiple years building and maintaining systems in Java, Python, PHP, Ruby on Rails, CoffeeScript, Elixir, Kotlin, and Typescript.

The reality is that — for the purposes of app building — most modern mainstream languages are more or less the same, and you can pick any of them for your backend. However, the browsers already picked which language goes in your frontend, and that language is Javascript. Typescript is a typed version of Javascript, built and maintained by Microsoft.

I’m not gonna go into details about why having types is better, but the TLDR is that a typed language does a lot of work for you automatically, that your engineers would have to do otherwise.

If you’re building an app for the web, you’re already going to have Typescript in your stack — at least on the frontend. Unless you’re transpiling something else to JS. So if you want to have a single language in your entire stack, the easieast option to choose for the backend is Typescript.

If you choose anything else, all of a sudden you’re in this world where there’s a big division between “Frontend” and “Backend”. You now have:

  • Two different languages
  • Two different build environments
  • Two different types of engineer your company has to hire for
  • A third API language to serve as an interface between frontend and backend (GraphQL, REST, SOAP, pick your poison)

If you just pick a single language for the entire stack (aka Typescript), you don’t have to worry about any of that. And the frontend can call the backend via simple function calls.

Less “environments” to think about. Less cognitive dissonance for your engineers. And much faster speed of iteration. Easy choice.

--

--