DEV Community

Discussion on: What's the worst part about the JS ecosystem?

leob profile image
leob

Well, you're pretty outspoken to put it mildly, and with an opinion that I think is at odds with what 95% of devs are thinking ... interesting discussion, to be continued!

Thread Thread
sharpninja profile image
The Sharp Ninja • Edited on

95% of WEB devs, not devs. Most non-web-devs hate web dev with a passion for the reasons I listed.

EDIT: To expand on this. Web Devs typically have no idea how anything in the web dev stack works or the amount of scaffolding in place to hold up their house of cards. Once they are brought in API development they discover the shortcomings of Node the hard way. At that point they can give up and go back to web dev, or learn about why Node sucks and why the alternatives are much better. Once you cross that threshold it's very hard to go back to web dev and on continually ask why they are putting up with this crap. But until you break out of web dev and learn about concurrency, garbage collection and strong typing, you simply don't know what you don't know.

Thread Thread
leob profile image
leob • Edited on

I agree that node.js isn't ideal, but hey, to equate node.js with "web dev" is a bit misleading isn't it? There are dozens of platforms for doing web development (backend).

Also: "95% of WEB devs, not devs" => okay, but the large majority of devs are now "web devs", maybe not 95% but well, probably like 75% - so still "the majority of devs"

And: "Most non-web-devs hate web dev with a passion" => that's a bold (and subjective) claim, can you back it up with facts? I rather think most non-web-devs are neutral, or even mildly positive, and are MAYBE even using it themselves occasionally ;)

And finally: "for the reasons I listed" => I haven't seen any clear reasons mentioned anywhere, have I missed them?

You can program in a backend language with strong typing and still be doing web dev, I've done Java for years and considered myself a web dev (or at least a "web dev" among wearing a number of other hats) most of that time, so I don't see the artificial divide you're trying to put up.

Thread Thread
sharpninja profile image
The Sharp Ninja

I haven't seen any clear reasons mentioned anywhere, have I missed them?

From this thread: "From the horrible language (which requires an overload of the equals operator to pick what kind of comparison you should make, and then choosing the odd-ball operator as the correct choice)"

And over the years I've posted many articles on many mediums about ways that JS sucks, but even without going into specifics, its type system is so fundamentally broken that it cannot be fixed without starting over. The module systems (plural!!!) are so convoluted and incompatible that you cannot use valid modules of the same version with itself. Then there's the fact that it's so sctrictly single threaded that when it pretends not to be you can easily deadlock yourself by using recursion.

Thread Thread
leob profile image
leob

I was about to start arguing again lol but I do have to admit you have a point here. Look at the mobile ecosystems (Android and iOS), where there's a clear market for native client apps which aren't web based, but which use web tech (HTTP, JSON and so on) to communicate with the backend.

So yeah I'd say use HTTP and all of the web standards on the backend (and in MOST cases do NOT Javascript or node.js there, use a proper language) but for the client I'd argue we should have more choice than just HTML/JS/CSS. Something like the iOS or Android app model but then for the desktop.

P.S. on a tangential note, you're clearly a Microsoft fan but I'll never forgive them their monopolistic practices of the 90s, which included threatening PC manufacturers if they'd dare offer Linux on their hardware, or anything non-MS. I have to say they've changed a lot and they sing a different tune now, but the days of Steve Ballmer were horrible (and so was Windows back then).

Thread Thread
sharpninja profile image
The Sharp Ninja

Here's the thing, Microsoft got better. JavaScript hasn't. And the reason you see so much REST in mobile is they dumb down the service layer to avoid having to support different ones for mobile and web. The reality is that gRPC and SOAP aren't JS based, so WebDevs actively work to prevent their usage.

Thread Thread
leob profile image
leob • Edited on

LOL "WebDevs actively work to prevent their usage" ... conspiracy thinking much?

I've worked plenty with SOAP but never liked it, TBH hated it, like pretty much almost everyone else I knew. You know, those corporate and proprietary "standards" tend to be over complicated, over engineered, feel like "designed by committee" and are terrible to work with.

The open web standards though are simple, easy to work with, and are sufficient in 95% of the common scenarios, that's why people like them. In case you need more sophisticated, you step up to GraphQL.

Microsoft got better yes, mainly due to their leadership, Satya Nadella is lightyears ahead of what Steve Ballmer ever was, it's like the evolution from the chimpanzee to Homo sapiens. And they (Microsoft) finally embrace open standards and aren't actively trying to sabotage them (remember IE6/7/8, ActiveX, JScript?)

MS also abandoned Silverlight, and embraced HTML5, JS, CSS ... so ironically your "heroes" have started to bet on and embrace the platform that you dislike.

Seriously though, I fully admit that the web was conceived as a platform for content delivery - it was never designed or meant to be an application development platform - a lot of it feels bolted on, even though arguably a lot of effort has been put in to improve it as an app dev platform (of course it's not true that JS hasn't made any progress).

That's why I made the comparison with mobile ecosystems (Android and iOS) with their native client apps, and wondered why a similar development hasn't taken off on the desktop - web for content delivery, native apps (connecting to backends via web technologies) for apps.

Oh and by the way - if you despise Javascript as a language (and even Typescript, conceived by MS) then there are plenty alternatives (all of which "compile" to JS, so that you don't have to write that): Elm, Dart, ReasonML (the last one is really interesting and I'd expected it to take off, but it hasn't) and others ... so I'd say that you can hardly use the weaknesses of JS as an argument against "the web".