Chain.js - data binding for jQuery

chain_js_20080821.jpg

Rizqi Ahmad, a high-school student in Germany, created a pretty useful data binding service for jQuery called Chain.js. It allows you to easily manipulate data driven content from javascript by directly manipulating the DOM, without resorting to templates or a lot of complicated code. You create the markup the way you want the data to display, give class names to DOM elements that should have their content substituted, and pass an associative array containing the variable data to the chain() method.

There is also support for managing lists of elements, allowing you to add and remove elements dynamically inside the defined markup. Rizqi also created the Interaction library that works on top of the data binding library to provide drag, drop, and sort support for lists.

Make sure to check out his demos. They show off some of the flexibility of the library and they're easy to tweak for your own needs.

Data Binding Solution for jQuery
Chain.js - Data Binding Service for jQuery
Interaction.js - drag/drop/sort support for Chain.js

Posted by Jason Striegel | Aug 21, 2008 10:42 PM
Ajax, Design, Web | Permalink | Comments (1) Bookmark and Share

Recent Entries

Comments

Newest comments listed first.

Posted by: Shawn_S on August 22, 2008 at 1:39 PM

jsRepeater

I have encountered the sort of problems that I am sure Rizqi must have encountered which lead him to the creation of this plugin.

No-one wants to write hundreds of lines of code just to fill a div with javascript data so we are all looking for the optimal declerative template solution.

I have put together a javascript library that allows you to:
1. Bind simple objects to a template
2. Bind whole hierachies of objects to a template
3. Provides functionality for formatting of input data and numbering
4. Provides recursive templates.

It is freely available for anyone to use. You might want to have a look at it:

http://jsrepeater.devprog.com/

It also contains examples of using it for formatting Google Feeds and the result of the Google Search API.


Leave a comment



Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks