Ask HN: Is the flood of frameworks hurting Javascript development?
Maybe it is all in my head but I find that every time I come across a interesting code sample or solution to a problem, it is only usable if you I am willing to commit to a JS library such as JQuery or ProtoypeJS - or re-write it mysel in plain JS.
It seems it is not enough to know learn javascript, but then you have factor in the many variations in syntax that result from using the current flavor-of-the-week library.
This list is far from complete and seems to be a small subset when you think about Backbone, underscore, coffescript, xui and more: http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
I'm not complaining (yet) but it seems that every week there is a new choice, especially now that you have mobile specific ones. I'm concerned that this might be a problem very soon... or do HN readers feel it will eventually consolidate a bit over time?
(
7 comments
| 8 points
| on HN
)
jQuery is awesome framework and its core (the way I see it) is simple. It's about:
1) DOM selection, traversal and manipulation 2) CSS manipulation 3) event binding 4) ajax 5) a couple of (but still awesome) utilities 6) extensibility, as proven with very popular jQueryUI framework and a huge number of plugins
You know where I got these 6 bullets? It's from jQuery docs page (http://docs.jquery.com/Main_Page) under API reference (in the left sidebar). Why is it important? Because that's actually what the whole browser/DOM/javascript ecosystem should have been. DOM API is really screwed up, that's why we use jQuery (or something else, but I also think jQuery has clearly won the framework war). And to do any of that work, among all A grade browsers is an exercise in futility.
Majority of my work in javascript consists of leveraging jQuery, because most of my work is DOM manipulation. But that doesn't mean I can do it without knowing the language.
My point is: jQuery is defacto the DOM API because the real DOM API simply sucks. It does not replace the need to use the language, it adds value to it.
And maybe, just maybe, we haven't yet seen the best way to work with DOM, or ajax. There may still be posible for completely new framework to emerge and shows us the light.
For example, Backbone already uses underscore and most people use it with jQuery. Coffeescript could be thrown into that combination as well as it's often used with jQuery.
If you're coding for the desktop: jQuery + whatever application framework
If you're coding for mobile: who knows, the choice here is more difficult.
What I mean is that every week I see a new FW posted on Github or elsewhere that seems to handle known problems but with a slight variation.
Obviously its more nuanced than that, but it just seems to be growing fast
It's much cleaner if all the solutions use the same common framework, and that's (nearly) the case with jQuery.
I recommend learning JavaScript itself very well before you choose a framework. I wrote pure, vanilla JavaScript for everything for almost a year. I wrote a small library of helper functions.
After a year or so of trying to avoid "investing" myself in a JavaScript library, I chose jQuery, and I have not looked back since.
I really cannot recommend jQuery enough. Not to be a fanboy or anything, but it seems to have largely won the JS library war, for the most part. You really can't go wrong with it.