r/webdev • • May 18 '25

Discussion I wonder why some devs hate server side javascript

I personally love it. Using javascript on both the server and client sides is a great opportunity IMO. From what I’ve seen, express or fastify is enough for many projects. But some developers call server side javascript a "tragedy." Why is that?

193 Upvotes

253 comments sorted by

View all comments

Show parent comment

3

u/0aky_Afterbirth_ May 19 '25

All great points here. The team I work on builds and maintains enterprise backend services for software that has several million daily active users, and about 90% of our codebase is Typescript, and we’ve run into pretty much every single issue that’s called out here.

I like TypeScript as a language, but for enterprise backend services, it just doesn’t scale well, in pretty much every way (development, CI, and runtime).

We continue to use it because our team has, in recent years, more experience with TS than any other language, and we’ve invested thousands of lines of code in common internal TS utils and tooling for our organisation (several of our front end teams use TS as well), so it would be prohibitively expensive and time consuming to migrate most of our services to another language.

But know what we know now, TypeScript is just not the best tool for the job for our enterprise backend APIs.

I predict that sometime in the near future, we’ll reach the tipping point where TS becomes the bottleneck in terms of overall performance/cost optimisation (taking the TS refactor cost into account), and we’ll have no choice but to start rewriting.

2

u/c-digs May 19 '25

We're far along, but not that far along so I've been trying to get folks on my team to change course. Lots of IC's are open to it and frankly at this point, I'll ship in any language that solves these pain points. But we're held up by the owner of CI with some of the weakest excuses I've heard.

I wouldn't propose a rewrite per se, but what Martin Fowler calls the Strangler Fig pattern after choosing a stack that makes sense.

Good luck!

1

u/0aky_Afterbirth_ May 19 '25

Ironically, we used effectively that same approach to migrate the previous generation of services from Java (Spring Boot) to TypeScript about 5-7 years ago. At the time, if I recall correctly, the rationale for TS over Java was simply to align with the front end teams and to have fewer languages across our tech stacks. In hindsight, that was obviously not a good enough reason.