5 ms·
IMO this is the best answer. A clear, history-contextualized summary of the reasons why vanilla is often not enough for some use cases.
by skadamat 4y ago
IMO this is the best answer. A clear, history-contextualized summary of the reasons why vanilla is often not enough for some use cases.
- krapp 4y agoFor some use cases, sure. But most sites aren't GMail. Frameworks and typescript should still be the exception, and the rule should still be independent, modular libraries like JQuery.
- kitsunesoba 4y agoAs someone who’s become most comfortable with strictly typed languages (primarily Swift and Kotlin), I find that TypeScript makes my dabbling in web dev much more tolerable and even somewhat enjoyable, even for simple projects with zero dependencies. Plain JS becomes frustrating quickly as project complexity ramps.
- joshmanders 4y ago> But most sites aren't GMail. Frameworks and typescript should still be the exception, and the rule should still be independent, modular libraries like JQuery. People always say this but it's so hollow. Most sites aren't Gmail, but we're not building most sites. We're building applications that work in similar fashion to Gmail, thus need similar stuff like all these frameworks provide. "Oh but everyone's using React to build their blogs instead of writing new posts for them and that's overkill" Let me stop you before we get to this point. People use their personal blogs as a way to test new concepts they want to learn, so of course it's gonna be over engineered to hell.
- neon_electro 4y agoSo what about when product management starts demanding even more interactivity on a marketing site built without React? I pushed back hard on introducing React when the site already had jQuery. Another developer said they could do what was needed with React. The marketing site started shipping both jQuery and React. I hate the JavaScript/React ecosystem so damn much for its complexity.
- joshmanders 4y agoYou hate a valuable ecosystem because your company product managers listened to someone else? I hope you find a new job. That's like saying you hate bananas because someone asked for a pie and you said you'd make an apple pie and they said they'd make a banana pie and they decided to choose the banana pie instead of your apple pie.
- klibertp 4y agoYou're being uncharitable for no good reason. If you're not sure if your interpretation of what GP said is true, ask for clarification and stop at that. Your first paragraph is ok, the second was uncalled for.
- joshmanders 4y agoUncalled for? I was explaining in a metaphor how I interpreted OP's reason for not liking React/JavaScript. I don't like PHP/Laravel ecosystem because I recommended we use vanilla PHP and my co-worker recommended we use Laravel and my manager decided to use Laravel. I don't like Python/Django ecosystem because I recommended we use vanilla Python and my co-worker recommended we use Django and my manager decided to use Django. Swap it with literally any framework in any language vs using vanilla-<lang here>. It all sounds just as ridiculous.
- deleted 4y ago[deleted]
- klibertp 4y ago> I was explaining in a metaphor how I interpreted OP's reason for not liking React/JavaScript. Yes, but you failed to note it's just your interpretation, not what the GP said himself. And you continued by assuming your interpretation is correct, suggesting that the GP should get fired because of it. In reality, your interpretation is most likely not what the GP meant, and you clinging to your uncharitable interpretation in the context of GP comment was what I called "uncalled for". Please review the HN guidelines, this situation is addressed there explicitly (argue against the strongest interpretation of what others say, not the weakest; argue against what was said, not a person who said it). It's worth revisiting the guidelines from time to time, even if you're a long-time user. In this case, the more sensible interpretation would be something like this: the ecosystem where you have to include two completely different frameworks to get things done is overly complex, and the complexity is what the GP hates. It's perfectly valid position, too.
- alpaca128 4y ago> typescript should still be the exception And JS shouldn't be exceptionally bad but here we are, and people use TypeScript as alternative to stay sane. I agree that modern web development comes with far too much complexity on average, but people started adopting those frameworks for a reason. The web is kept backwards compatible with obsolete standards which have been created in a different time for different purposes, and at some point it becomes easier to build abstractions over that. For example TailwindCSS adds another "compilation" step and configuration file but in return makes styling much more tolerable than standard CSS. Is it necessary? No, but when you build a large website all those little things add up.
- shadowgovt 4y agoAgree here. TypeScript is a bit of a Godsend even when using the vanilla DOM API because (a) the DOM API uses so many different abstraction patterns that it's easy to lose track of which one you're using (and passing the wrong arguments with no static typechecking is a runtime error) and (b) JavaScript itself has so much wat (https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat) in its implicit value coercions that it's invaluable to have types narrowly-scoped in code so you have any hope of predicting what the output of operations will be.
- potatoz2 4y agoI don’t think JS is much worse than other dynamically typed languages to be honest. In Ruby you’d get an exception instead, which is mildly better than `NaN` in your user-visible text, but not much. The DOM though is definitely complex and built of accretion over time. The Web resists refactoring because we can’t break websites from the 90s.
- shadowgovt 4y ago> I don’t think JS is much worse than other dynamically typed languages to be honest. I agree; it's a plague all dynamically-typed languages face. I've yet to meet one that doesn't hit me with some kind of powerful pain-in-the-ass corner cases as a trade-off for the power of its terseness. I fell in and out of love with Python over the course of a decade or so. Initially very excited about doing so much with so little code; fell out of love when I used it in an industry setting and realized 100% unit test coverage was mandatory because the lack of variable declaration means every line of code is a potential runtime error in waiting due to a simple name typo.
- smm11 4y agoLots of hammers, when few actually need one.