/    Sign up×
Community /Pin to ProfileBookmark

javascript libraries other than jquery

hey…

heres an open-ended question that should get some good replies:

Whats a good javascript library other than jquery and what is a cool script from that library?

New to javascript and I’m looking to play around/experiment with some cool stuff…

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@CaptainSessaJul 16.2011 — Apart from the fact that I like jQuery the most and don't get why you need another one, try this:

http://dojotoolkit.org/

You'll be amazed ?
Copy linkTweet thisAlerts:
@Jeff_MottJul 17.2011 — [url=http://developer.yahoo.com/yui/]YUI[/url] is a good library. I actually like it better than jQuery.

Some reasons why:

[b]Dynamic loading[/b]

Some libraries need to load everything but the kitchen sink up front, but YUI lets you load only the pieces you need to use. It can also combine those dependencies into a single HTTP request while still allowing parallel downloads. This is huge for performance.

[code=php]
// Create a new YUI instance and populate it with the required modules.
YUI().use('anim', function (Y) {

// Animation is available and ready for use.

})
[/code]


[b]Earlier DOM events[/b]

Code that uses the DOM usually needs to wait for the DOM ready event before it can run safely, but YUI provides "available" and "contentready" events that let you execute as soon as an element is detected in the DOM, even if the DOM ready event hasn't fired yet.

[code=php]
YUI().use('event', function (Y) {
Y.on('contentready', function () {

// #myelementid is ready

}, '#myelementid');
})
[/code]


[b]Custom events[/b]

I was once building a jQuery widget, and to initialize it, I needed to 1) manipulate the DOM, and 2) download XML with ajax. So it was a question of which to do first. If I waited for the DOM ready event to manipulate the DOM, and only then started downloading the XML, then the whole application was delayed. And if I waited for the XML to download before manipulating the DOM, then I got a flash of unstyled content.

But with YUI's custom events, you don't need to put one before the other. You can do both in parallel and trigger events when each part is finished. This made the application responsive noticeably quicker.

[code=php]
YUI().use('event', 'io', function (Y) {
// create events
Y.publish('myapp:xmlready', { fireOnce: true });
Y.publish('myapp:domready', { fireOnce: true });

// download XML
Y.io('data.xml', {
on: {
complete: function () {

// handle data, then...
Y.fire('myapp:xmlready');

}
}
});

// at the same time...
Y.on('contentready', function () {

// manipulate DOM, then...
Y.fire('myapp:domready');

}, '#myelementid');

// when both tasks have finished...
Y.on('myapp:xmlready', function () {
Y.on('myapp:domready', function () {

// app is ready to use

});
});
});
[/code]


[b]Ready-made widgets[/b]

Both YUI 2 and YUI 3 have an impressive set of ready-made widgets. All the usuals are there, like [url=http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_array.html]AutoComplete[/url], [url=http://developer.yahoo.com/yui/examples/calendar/quickstart.html]Calendar[/url], [url=http://developer.yahoo.com/yui/examples/carousel/csl_selection.html]Carousel[/url], [url=http://developer.yahoo.com/yui/examples/container/panel.html]Panel[/url], [url=http://developer.yahoo.com/yui/examples/tabview/frommarkup.html]Tabs[/url], etc. Plus some that I thought were especially impressive, like [url=http://developer.yahoo.com/yui/examples/charts/charts-seriescustomization.html]Charts[/url], [url=http://developer.yahoo.com/yui/examples/datatable/dt_complex.html]DataTable[/url], and [url=http://developer.yahoo.com/yui/examples/uploader/uploader-advanced-queue.html/]Uploader[/url]. In addition to a [url=http://yuilibrary.com/gallery/popular]gallery[/url] of user contributed modules.
Copy linkTweet thisAlerts:
@rnd_meJul 19.2011 — moo, jQuery, and yui are all the same thing, more or less.

i can't believe people still bother with dojo; it's useless on mobile...

JSON2.JS is my favorite library; it's used everywhere.

personally, i use a functional foundation for almost all my code. i guess the smallest one that people have heard of that doesn't totally suck is underscore, though you really just need it for old IE these days, what with [].map (finally) being in all current browsers...



if you want functional goodness and candy-coder tools, Prototype gives you the high-level ajax and dom stuff as the first ones i mentioned. It got a bad rap for being ambitious years ago, but it plays nicely now.

i guess if someone put a gun to my head and forced me to include one of those kitchen-sink type libs, i would pick prototype.

modernizer is handy if you don't know much about robust javascript and late-breaking browser developments...

more interesting to me are harmless scalpel libs that add specific functionality like charting, drag and drop, canvas tools, x-browser audio handling, etc.
×

Success!

Help @nmn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...