Live data from Hacker News

You probably don't need a JavaScript framework

slack-files.com

51–60 of 356 posts

Re: You probably don't need a JavaScript framework

#51
post #31

This! This times a million times!!~! Seriously. The javascript world is INSANE. All these frameworks and few truly need them... node.js package management is a mess... yet how many of these coders will take the time to learn real ES5? It really isn't that hard of a language. I feel like calling oneself a "javascript" expert practically requires knowledge of a framework or too. This is saddening, because Javascript it…

As a javascript-noob, not even jquery? I've heard jquery solved so many headaches.

The major criticism of jquery comes from its "overhead" which comes from wrapping a lot of functionalities onto relatively(at the time of its onset) large file[1]. While they were legitimate(internet was slow) at the time, at its cost jquery worked as a go-to-solution for browser incompatibility. This was a major issue which jquery solved magnificently.

And frankly, a significant portion of jquery usages are a very limited set of functionalities: selection, class manipulation, some visible on/off, AJAX and promises. A lot of those don't necessarily need jquery[2]. Some hard-core guys go so far as to separately download only modules[3] which works.

Honestly, I wouldn't mind calling a significant portion of jquery to be "pure javascript" as it lets me not worry about browser compatibilities and pleasant stuff that should have been part of standard library. ES6 is supposedly fix most of the complaints, but whether browsers will support them or not is a different question.

[1] https://mathiasbynens.be/demo/jquery-size has a nice tabular info on how large jquery file sizes were.

[2] http://youmightnotneedjquery.com/ is a widely cited source.

[3] https://github.com/jquery/jquery/tree/master/src, go nuts.

Re: You probably don't need a JavaScript framework

#52
post #31

This! This times a million times!!~! Seriously. The javascript world is INSANE. All these frameworks and few truly need them... node.js package management is a mess... yet how many of these coders will take the time to learn real ES5? It really isn't that hard of a language. I feel like calling oneself a "javascript" expert practically requires knowledge of a framework or too. This is saddening, because Javascript it…

As a javascript-noob, not even jquery? I've heard jquery solved so many headaches.

jquery is awesome, go for it!

(I don't consider jquery a framework, though you can use it like one. Back when browser compatibility was a much larger headache it was a requirement for being productive, but nowadays most browsers implement ES5 reasonably uniformly. Particularly notable are its succinct shortcuts for CSS manipulations, AJAX, and running code on-page-load)

The only real gotcha is that jquery DOM manipulation is not really compatible with native DOM manipulation, but you can get to one from the other

Re: overhead criticisms: the base jquery "runtime" is a pretty reasonable size for the functionality it provides, and the accoutrements are completely optional.

Re: You probably don't need a JavaScript framework

#53

React doesn't exist to handle the massive amounts of data that facebook has. React exists to make complex UIs easier to build and maintain. Being able to just write the code once to render a UI from some state and then just reloading the entire UI when the state changes is an incredible simplification of your code. That the author kind of misses this point makes me pay less attention to the rest of the post.

I remember seeing an article a while ago that suggested react was a bad paradigm because of a similar paradigm that failed... something about COM interfaces in windows programs? Does anyone remember such an article? That was one of the few truly interesting critiques of react that I have read. Don't get me wrong, I'm not a React die hard but I definitely do like that it exists, and I understand where it fits on the l…

It reminds me a lot of WPF development in that you designed components with state (data context) and the component knew how to render.

Re: You probably don't need a JavaScript framework

#56
This might be the post that convinces me to write a companion piece on why you probably don't need a CSS framework, either. Browser renderers have come so far since Bootstrap's peak: Flexbox has all but obviated its primary value proposition, and when CSS grids make it out of RFC, using Bootstrap for layout will be like using Backbone to do rollover styling.

Re: You probably don't need a JavaScript framework

#57
If you don't use one and have a complex app, it will eventually turn into a spaghetti mess of callbacks. You will end up writing your own framework that hasn't been battle tested on thousands of sites.

For simple apps, it's probably not needed. The issue also is that you app could be really simple now, but have features added to it regularly making it complex.

Re: You probably don't need a JavaScript framework

#58

React doesn't exist to handle the massive amounts of data that facebook has. React exists to make complex UIs easier to build and maintain. Being able to just write the code once to render a UI from some state and then just reloading the entire UI when the state changes is an incredible simplification of your code. That the author kind of misses this point makes me pay less attention to the rest of the post.

I remember seeing an article a while ago that suggested react was a bad paradigm because of a similar paradigm that failed... something about COM interfaces in windows programs? Does anyone remember such an article? That was one of the few truly interesting critiques of react that I have read. Don't get me wrong, I'm not a React die hard but I definitely do like that it exists, and I understand where it fits on the l…

I think you're referring to https://bitquabit.com/post/the-more-things-change/ , which compares React to a Win32 WndProc function.

Re: You probably don't need a JavaScript framework

#60
post #14

Earlier quoted context omitted.

"React is simple to me, and that's why I like using it." Horses for courses. The author is merely making the argument that you don't need react, and the GP comment didn't bother to read the argument before responding.

If you're going to tell me I don't need to use a library, it has to be way more convincing than, "Look how easy data binding it with native APIs! And it's not slow!" This is a weak argument in my opinion, and does nothing to address how removing abstractions will make my life easier.

That's a perfectly fair counterargument to the content of the piece, but the comment to which I replied had no such content.

The post didn't miss the point that "being able to just write the code once to render a UI from some state...is an incredible simplification of your code." It argued that you can do that without using React.

Post reply on HN