views:

187

answers:

2

One of the things I like about the YUI framework is the DataSource control. A common widget that intelligently gets data from a variety of sources and plugs into other UI widgets in a standard way. So... you fetch tabular data into a DataSource and then have the option of plugging that data into a table, a chart, an autocomplete widget, a straight list. All fine.

There doesn't appear to be an equivalent in jQuery. Is that correct?

It looks like each widget essentially implements their own datasource or relies on data being provided in a particular format.

I've clearly missed something.

[I've highlighted YUI here, but of course a "DataSource" isn't a Yahoo special - it's just the MVC way of working]

A: 

Looks like I'm going to have to answer my own question. :)

I've Googled around and searched through the jQuery forums and I haven't come across a standalone DataSource plugin of the same type (and name) that's found in the Yahoo, .NET, and Google javascript frameworks.

I guess the reason for this is that the other frameworks are controlled from the centre and so can dictate that their widgets will defer to their particular DataSource object.

With jQuery the centralised control isn't quite at the Yahoo/Google/Microsoft level (thankfully) and so each plugin essentially creates their own 'DataSource' object to suit their particular requirements.

Something for the "Someday/Maybe" list.

Nick Pierpoint
Certainly an interesting idea! After a very quick Google, I didn't find much on the subject.. I think there's a gap in the market for a plugin ;P
Rowan
A: 

fyi SmartClient (http://www.smartclient.com/docs/7.0rc2/a/b/c/go.html#class..DataSource) and SmartGWT fully support the notion of DataSources and DataBound components for a wide variety of widgets like Grid, Tree, Calendar, Tile Views, Forms and other components. But yeah, jQuery unfortunately does not support such a concept.

Sanjiv Jivan