I decided to re-engineer it from the ground up. JPolite V2 is then a complete re-design from the ground up with nothing from V1 except for the look & feel. The code structure is much clearer which makes it easier for customization, as well as integration with other jQuery plugins.
A new feature that is now being tested with JPolite is called XDO (XML Data Object), which currently supports JSON objects only. The whole idea is based on some discussion around “Thin Server Architecture” and REST architecture style, that a browser client first construct the foundation of a web app with STATIC content (HTML, CSS and JavaScript) from a web server, and then exchange only DATA (XML, JSON, TXT) with the application server, which relieves the server from the burden of generating HTML markup. This feature is still experimental with lots enhancements expected.
jQuery Google Charts 1.0
Copyright (c) 2008 Massimiliano Balestrieri
Examples and docs at: http://maxb.net/blog/
Licensed GPL licenses:
http://www.gnu.org/licenses/gpl.html
Basic usage:
var api = new jGCharts.Api();
jQuery('
')
.attr('src', api.make({data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]]}))
.appendTo("#bar1");
Html:
Basic scripts (use packed version in production):
via
http://www.ajaxline.com/best-jquery-plugins-june-2009
Firstly, define all the necessary information for a given module ID in _modules variable, e.g.,
...
m301:{l:"m301.html", t:"Module Definition"},
m302:{l:"m302.html", t:"Layout Definition"},
m303:{l:"m303.html", t:"Column Width Definition", c:"green"},
...
Wherein:
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="simple image gadget" />
<UserPref name="myname"
display_name="Module title"
default_value="Image"
required="true"/>
<UserPref name="targetimg"
display_name="URL of your image"
default_value="http://www.google.com/images/logo_sm.gif"
required="true"/>
<UserPref name="imgwidth"
display_name="Width"
default_value="100%"
required="true"/>
<Content type="html"><![CDATA[
<!-- Simplification of bashennekam.googlepages.com/google_gadget_image.xml -->
<div align="center">
<a href="__UP_targetimg__" target="_blank">
<img src="__UP_targetimg__" border="0" align="center" width="__UP_imgwidth__">
</a>
</div>
]]></Content>
</Module>
There are actually 3 protocols and 2 APIs that are used in Wave:
- Federation (XMPP)
- The robot protocol (JSONRPC)
- The gadget API (OpenSocial)
- The wave embed API (Javascript)
- The client-server protocol (As defined by GWT)
The last one in that list is really nothing that needs to be, or will probably ever be documented, it is generated by GWT and when you build your own Wave client you will need to define how it talks to your Wave server. The rest of the protocols and APIs are based on existing technologies.
google.visualization.Query and set its properties
according to values from the gadget preferences.
The type of parameter prefs is
_IG_Prefs
_table_query_url is used to set the Query data source URL._table_query_refresh_interval is used to set the Query refresh interval (in seconds).
google.visualization.Query.setResponse({
version: '0.6',
status: 'ok',
sig: '202289222',
table: {
cols: [{
id: 'A',
label: 'Name',
type: 'string',
pattern: ''
},
{
id: 'B',
label: 'Value',
type: 'number',
pattern: '#0.###############'
}],
rows: [{
c: [{
v: 'One'
},
{
v: 1.0,
f: '1'
}]
},
{
c: [{
v: 'Ten'
},
{
v: 10.0,
f: '10'
}]
}]
}
});
( pretty printed by http://jsbeautifier.org/ )
Represents a query that is sent to a data source.
google.visualization.Query(dataSourceUrl, opt_options)
Parameters