

Ask HN: Is the flood of frameworks hurting Javascript development? - donohoe

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.<p>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.<p>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<p>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?
======
selectnull
I have experience in jQuery and javascript, so I'll give you my 2 cents on
that, but I'm sure the same can be applied to other frameworks.

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.

------
bretthopper
It's not as bad as it looks since not all frameworks are equal. And I don't
mean that in terms of quality, I mean they serve different purposes.

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.

------
Skywing
flavor of the week libraries? jquery has been around for a long time and is
pretty standard now days. my guess is, the average web developer probably
won't understand backbone.js, but jquery is pretty simple yet useful.

~~~
donohoe
I don't mean to imply that JQuery, PrototypeJS, YUI and others are "flavor of
the week".

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

~~~
udp
There'd be a lot of code duplication if every snippet of JS needed to include,
for example, all the browser-specific hacks that jQuery does, and all the DOM
traversal, etc.

It's much cleaner if all the solutions use the same common framework, and
that's (nearly) the case with jQuery.

------
NewHighScore
It is hard to say. It seems like some of the frameworks, for example jQuery,
are making it easier for people to start using javascript, but could also be
limiting the extent that they are actually learning javascript.

------
robwgibbons
I know exactly what you mean.

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.

