2 ms·
If you're putting together something relatively simple, Javascript is a perfectly fine choice. And the fact that front and back end shares a language is a real
by btilly 10y ago
If you're putting together something relatively simple, Javascript is a perfectly fine choice. And the fact that front and back end shares a language is a real win.
However if, for example, you have a complex site with intermittent performance problems, good luck. This applies whether you are running complex async code in node.js and you're trying to track down the badly coded callback that blocks everything else. It also applies if you have multiple microservices and you're trying to track down which back end service is causing front end requests to be painfully slow 1% of the time.
And, of course, I'm waiting for Javascript to have something like the problems that Rails did in 2013 when it was discovered that automatic deserialization of requests allowed remote code execution..in multiple ways. In the case of Rails, you just had to get an updated package. In the case of npm, however, the dependency system means that you won't be able to eliminate the bug without updating the whole toolchain in a way that is very, very hard to do. The problem is that in Javascript, libraries A and B can and often do import different versions of library C. If C has a critical bug, then you can't get rid of it until you've upgraded all three. Now imagine this with hundreds of dependencies, each of which has pinned its dependencies and has not been tested with breaking changes in underlying libraries that they depend on...
Every widely used stack eventually has an "upgrade the world" fire drill. That fire drill is going to be very, very messy with Javascript.