r/programming • u/joanmiro • Jul 18 '16
Web programming is getting unnecessarily complicated
http://en.arguman.org/web-programming-is-getting-unnecessarily-complicated
324
Upvotes
r/programming • u/joanmiro • Jul 18 '16
View all comments
Show parent comment
15
u/tdammers Jul 18 '16
What you describe has been dubbed "The JavaScript Problem". In a nutshell:
Other than that:
Java's design is not very good at all. It's popular due to momentum, a brilliant runtime (the JVM, unlike Java itself, is an engineering masterpiece), and by virtue of the cross-platform alternatives with similar momentum being a lot worse - PHP is just fucked up through-and-through, using it for anything worth anything is kind of reckless; C++ is fine in principle, but waaaaaay too complex a beast to use for anything that doesn't require the level of control it gives you which is practically everything; C# is too tied into the Microsoft ecosystem.
No; the core problem with PHP is still alive and kicking, and it's not going to be fixed anytime soon. Individual symptoms have been ironed out, but that's just it - PHP only ever patches up symptoms. It's not a contradiction; PHP is and has always been the budget option, and has been coasting on being the only option that didn't cost an arm and a leg in the 1990s.
PHP is not better than JavaScript by any metric, and being designed as a DSL for a particular server-side web page scripting paradigm, it is positively unsuitable for other domains (not in the "it can't be done" sense, but in the "why on Earth would you even try" sense).
Java can be compiled to JavaScript, as can a dozen or so other general-purpose languages. The question is whether Java's strengths are worth much for browser scripting, and whether its highly opinionated paradigm is a good fit - my hunch is that the answers are "not a lot" and "not very".
Frankly, I'm surprised it got this far. JavaScript is a nice little language, and far exceeded the original expectations, but it has a few flaws that are crucial for server-side programming, especially when more stuff is at stake than a garage startup and some venture capital. Node.js has its place, but I believe it is now close to saturating its niche.
There's a bit of a bias in these statements, namely the implicit assumption that you develop the client and the server in a tightly coupled tandem setup; for a small, fast-moving startup type project, this is probably a good idea, because everyone is going to be doing everything anyway, and reducing the minimum required skill set (and thus head count and bus factor risk) to get the thing off the ground is very valuable; unsurprisingly, this is the kind of project for which Node is immensely popular, and it does quite well in this role. But as soon as things stabilize a bit, and you need to scale your operation to more people than what's practical as one development team (I'd say 3 programmers plus up to 3 non-programming roles is about the limit), you're going to need well-defined interfaces and decoupled sub-projects anyway; at that point, the benefit of being able to reuse code between client and server becomes marginal, and the benefit of using the most suitable technology for either part becomes more important.