

Ask HN: Best javascript framework for a new project - jacquesm

I've been using javascript for the longest time (pretty much since it came out) but sofar I've always rolled my own.<p>The number of browsers that need to be supported and the kind of functionality I have in mind are such that I don't think that is an option so I've decided to use a 3rd party framework.<p>Which would you recommend, code size, functionality offered and ease of use as well as compatibility are the factors that I'm thinking are most important (did I miss any ?).<p>thanks for any replies !<p><pre><code>  Jacques</code></pre>
======
lhorie
Having used Prototype + Scriptaculous, jQuery and Ext, I'd say jQuery is a
good generic library choice. Libraries these days are fairly interchangeable
in terms of core features, but I find idiomatic jQuery tends to be shorter,
more intuitive, and overall more popular (which is good if you plan on
leveraging existing plugins for those sorts of things that browsers really
should do but don't).

My experience with Ext hasn't been so great because I feel the learning curve
is a bit steep, there are a lot of leaky abstractions and whenever I had bugs,
they were both difficult to trace and to fix. Also, I feel deviating from the
defaults tends to be cumbersome (or impossible)

Prototype has improved immensely over the years, but imho, the improvements
are also its downfall: historically, the Prototype API has been pretty
unstable, with methods moving from one class to another and some APIs being
completely overhauled.

One other library that I should mention (that I haven't used much myself) is
Dojo as it is the "Java of Javascript" in terms of domain specific libraries.
There's stuff ranging from crypto to comet there.

Pick your poison, I guess.

------
Batsu
I've used Prototype and Jquery fairly extensively. I absolutely loved the DOM
navigation features of Prototype, they were shamefully easy to use. Jquery can
do it too, but it isn't as simple.

Jquery works better with groups of elements rather than individual elements.
In many cases, the code looks cleaner. There is also much more support behind
Jquery... one of the reasons I switched from Prototype was because support for
IE8 hadn't arrived, and it didn't support chrome properly -- checking the
Prototype site right now, it seems the stable version still doesn't.

My vote also goes to Jquery.

------
noodle
jquery. its just my personal preference, each library has its own individual
strengths and weaknesses.

------
bdmac97
Another vote for jquery. It makes javascript not suck (or at least suck less).

------
ErrantX
I use Prototype and have never really looked into JQuery.

I wouldn't recommend Prototype (shock horror). I use it for familiarity and
because my JS needs are minimal at best - but it's got lots of niggly
shortcomings.

------
jacquesm
Ok, jquery it is then! Thank you all for your responses, that was most
helpful.

