Widget System Comparison Table

From MemberWiki

Jump to: navigation, search

Gadget/Widget proposal comparisons

The following table is just a sketch that compares selected features from various specifications that might apply to the slippery concept known as "widgets" (or gadgets). I use quotes on "widget" because, as everyone knows, there are multiple definitions for that word:

  1. where "widget" means UI controls within Ajax libraries
  2. where "widget" means a mini-application that gets used in a mashup
  3. where "widget" means a mini-application that gets installed on a mobile device or desktop system

Here are the technologies I researched:

  • Adobe's proposed widget grammar as submitted to the IDE WG (1)
  • jMaki (1)
  • dijit, the UI system within Dojo (1)
  • IBM's OpenAjax Widget Proposal (2)
  • W3C Widgets 1.0 (3)
  • Apple Dashboard (3)

Note that the research behind this table is not complete or exhaustive. Whenever a cell contains "?", it means that research has not yet been performed. Therefore, "?" is most definitely not the same as "No".

FeatureAdobe proposal to IDE WGjMakidijitIBM OpenAjax Widgets proposalW3C Widgets 1.0Apple Dashboard Widgets
Packaging and single-file containment, such as ZIP
Single-file container ? ? ? ? Yes (ZIP) Yes (DMG? MacOS bundle?)
Bootstrapping startup file ? ? ? Presumably yes, the file whose root element is <widget> Yes (must be ./config.xml) Yes, Info.plist
Digital signing option ? ? ? ? Yes (XML Signatures) ?
Automatic update facility ? ? ? ? Yes, current spec has placeholder section, but JonF and others have advised that this feature get dropped ?
Optional custom native code that accompanies widget ? ? ? ? ? Yes
Discovery via HTML
Metadata for browser so it knows to install a widget onto the OS ? ? ? ? Yes, <link rel="widget" ...> ?
Metadata that might be displayed by a tool
Typical metadata: title, description, width, height, author ? ? ? Yes, plus author emails, scaling (whether to preserve aspect ratio), scrolling (whether to use scrollbars if widget too big for its space) Yes, plus keywords, requires network, requires plugins Yes, plus CFBundleIdentifier (e.g., com.apple.widget.HelloWorld), plugins, allow full access to local system, allow network access, list of fonts bundled with widget
Web service URI ? Seems to be there. There is a 'service' property to link to data coming from a URI. Not declaratively, but multiple procedural techniques within Dojo Yes ('website' property) Yes Yes
Icon to appear on tool's widget palette Yes (<icons>, <icon size= width= height=>) ? ? Yes (widget thumbnail) Yes ?
Widget category ? ? ? Yes (arbitrary string such as 'finance' or 'sports') ? ?
Configuration
Ajax library dependencies ? Yes, this is central to jMaki, which mostly provides a management layer on top of widgets provided by Ajax libraries ? Yes (<require library= version= src=> <config> ...toolkit-dependent json... </config> </require>) ? ?
List of assets (i.e., required external files) Yes, <assetfiles>, <assetfile type=css,javascript location=<url> >) Pretty sure answer is no - this is achieved via standardized packaging approach via widget.json, component.htm, component.css, component.js ? ? ? ?
Implementation
Constructor arguments Yes (<arguments>, <argument name= type="id,selector,options" subtype="cssSelector,options" required="<boolean>" >) ? ? ? ? ?
Destructor ? ? ? Yes ? ?
Constructor/deconstructor scope object ? ? ? Yes (<widget> element has 'scope' attribute for this) ? ?
Widget-specific properties to appear on inspector dialog Yes: <options>, <option name= type="..." subtype="..." default="..."> Presumably yes, this is fairly central to jMaki ? Yes: name, displayname, description, shortdesc, scope (instance or static), type, default ? ?
Runtime APIs for getting and setting properties ? ? ? Yes Yes (see property persistence) Yes (see property persistence)
Property persistence across sessions ? ? ? Yes: getPropertyValue(), putPropertyValue(), save() Yes: via Dashboard-inspired preferences system (presumably, would use cookies when running in browser, but Widgets spec doesn't mention storage limitations with cookies) Yes: via preferences system
Topics that the widget publishes or subscribes, enabling the tool (or mashup app) to wire together publishers and subscribers ? Can specify subscribed and published topics declaratively within HTML. (Also, procedurally) Not sure about declarative features, but certainly Dojo has its own pub/sub plus include Hub 1.0 Yes: a given property can specify its message room (looking towards Hub 1.1), whether it publishes this topic, whether it listens to this topic, and name of callback function for the listener. (TBD around batching of events and standards for payloads) No. All pub/sub is waiting on HTML5. ?
Snippet insertion instructions Yes (Adobe mainly states requirements: assets to head, HTML snippets default to current location in body, and shows CONSTRUCTOR location="afterDefaultHTML") ? Some features here, with default being 'container' (I think that means parent element) ? ? ?
HTML snippet template Yes: Adobe has <defaultHTML> <![CDATA[ <div id="trigger"> </div> <div id="@@id@@"> </div> ]] > </defaultHTML> Yes, stored as component.htm Yes, usually with a <div> element saved in an HTML file Yes: <content> subelement to <widget> Optionally there can be multiple versions, mode=view, mode=edit, mode=help). Content can be inline (using CDATA) or references via href. 'type' can be inline html, uri (external content into an iframe) or frame (inline content into an iframe) ? ?
Replaceable parameters within snippet template Yes (Adobe uses @@argumentName@@) Automatically generated IDs General facility using Flex-like curly braces Yes (__WIDGETID__) ? ?
Data binding to data store ? ? (didn't see anything) Yes, dojo.daja ? ? ?
General widget properties ? ? Yes (dojoAttachPoint, id, lang, layoutAlign, srcNodeRef) ? ? ?
Container widgets (i.e., widgets can be parents to other widgets and HTML) ? Yes Yes, with layout stitching ? ? ?
Virtual methods (programmable extension points) ? ? Yes ? ? ?
Localized string support ? ? ? Yes (mentioned as requirement, but TBD about format of message bundles) ? ?
ARIA support (accessibility) ? ? Yes ? ? ?
CSS integration Yes, but appears to be simple (i.e., CSS assets simply inserted into head) CSS fully integrated into architecture via themes support CSS fully integrated into architecture via themes support Yes, identified as requirement, but list of open issues ? ?
Tabindex support ? ? Yes ? ? ?
'disabled' support ? ? Yes ? ? ?
whether to generate change event with intermediate changes ? ? Yes ? ? ?
'appliesTo' Yes (Adobe asks questions, shows <appliesTo tag="any">) ? ? ? ? ?
Custom design-time logic to override IDE defaults Yes (Adobe has <objectFile url="DwObjectFile OnAServer Somewhere">, <designtimeFile url="DesignTimeFile OnAServer Somewhere">, <propertyInspectorFile url="PIFile OnAServer Somewhere">, <translatorFile url="DwTranslatorFile OnAServer Somewhere">) ? ? Yes: custom HTML can define property editing dialog or help dialog ? ?
Widget spec version number ? ? ? ? Yes, <widget version=> ?
APIs around widget lifecycle ? ? ? Create, remove, get/set/persist properties, wire pub/sub events ? Yes, widget.identifier, widget.onshow, widget.onhide, widget.onremove, widget.ondragstart, widget.ondragend
APIs to change size and position ? ? ? ? Yes, via new APIs on 'window' object ?
APIs for transitions (e.g., animated flipping) ? ? ? ? ? Yes, prepareForTransition, performTransition
APIs to deactivate areas from initiating a drag ? ? ? ? ? Yes (e.g., -apple-dashboard-region: dashboard-region(control circle 5px 5px 5px 5px))
Personal tools