Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

See the Tree Move Smoothly: Dynamic Graphs Using Web Workers and jQuery

DZone's Guide to

See the Tree Move Smoothly: Dynamic Graphs Using Web Workers and jQuery

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

The purpose of the emerging Web Workers standard is to help JavaScript programs run smoothly and predictably in the client's browser -- in other words, to open multiple JavaScript threads.

Which JavaScript, of course, like a beginning pianist learning only the right-hand part, can't do. From a purely computational perspective, this radical, built-in serialism is probably JavaScript's biggest problem -- or at least one of the obstacles to treating it as a full-fledged 'serious' language.

Web Workers fix that, in effect, but this post is about a library designed to combine one kind of multithread-ish-ness with another: arbor.js, a graph visualization library using Web Workers and jQuery.

One of the neat things about graph visualization, as opposed to (say) text-streams (or tables), is that a visible graph lets the user's eyes scan over multiple things at once, in a path the user chooses (though with some paths suggested by connecting lines) -- thus giving the user's massively parallel brain access to all kinds of information at once. 

And arbor.js does this extremely well, taking full advantage of cutting-edge web technology to produce extremely smooth visuals, with an extremely straightforward API. (That API reference page is coded pretty slickly too.)

Here's how one sample project looks:


Actually I'm a sucker for any graph (or tree), so this kind of thing especially lights up my brain.

But graphs are great for visualizing lots of different kinds of data, and Web Workers removes a major technical weakness of JavaScript -- so why not give arbor.js a try?

 

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}