Choosing The Right Format And Understanding Requirements
From WidgetAvenue Wiki
Widgets can be developed using a wide variety of standard formats, plus a proprietary format (waHTML/waJS). The following points should be considered when choosing a source format.
Contents |
Flash/ActionScript
Benefits
- Flash is the only format which allows to play multimedia content (video, music...).
- waHTML/waJS or HTML/JS widgets do not support Flash embedding, so it is recommended to use the Flash format directly.
- ActionScript can be used to communicate with the wrapper and contextual functions.
Requirements
- Flash version: no specific requirement. However AS3 should be used to communicate with the environment of the widget using ActionScript.
- Size: It is advised to use resizable swfs rather than fixed size, as rendering on startpages will be nicer. If a fixed size is preferred, suggested width is 300 px. Otherwise, if the swf file is resizable, the width can vary from 200 px to 400 px.
Parameters
Issues
- Flash is not supported on mobile platforms.
- On certain desktop platforms (Vista Sidebar, Apple Dashboard), transparency is not supported, so it is advised to use a rectangular shape.
- On Apple Dashboard external links and mouse over events will not work. Additionally, there are special requirements for Flash to work: see Using Flash Widgets On Apple Dashboard.
Useful links
HTML/JS
Benefits
- HTML/JS widgets are simpler to develop than waHTML/waJS
Requirements
- HTML or Javascript versions: no specific requirements
- Size: a fixed size is required, suggested width and heigt are between 200 and 300 px.
Parameters
Issues
- HTML/JS widgets do not work well on Desktop host platforms (for example, links do not work on Apple Dashboard)
- They do not resize properly on startPages.
- This format is also generally not suitable for mobile host platforms.
- HTML/JS widgets are rendered inside an iframe, so they have to be rectangular.
waHTML/waJS
waHTML and waJS are subsets of HTML and Javascript with specific tags and functions.
Benefits
Using waHTML/waJS provides major benefits:
- waHTML/waJS is the most universal format: unlike other formats, it works perfectly on mobile and desktop platforms
- the widget is sized depending on the space available. This is particularly interesting with Startpages, where the space is limited and may vary depending on the width of the columns
- the widget inherits the CSS style of the website where it resides. This is also interesting for Startpages, where a user may not be willing to have as many different visual styles as there are widgets
- Custom Preferences can be set and stored on the host platform (where appropriate) directly from inside the widget
- waHTML/waJS widgets support transparency, so they do not need to be rectangular
Requirements
In order to develop a widget using waHTML/waJS, it is required to follow waHTML and waJS specific guidelines.
Parameters
- root name is "html"
Useful links
- Creating A Hello World waHTML/waJS Widget
- Adding Javascript to a waHTML/waJS widget
- Using Ajax in a waHTML/waJS widget
- waHTML reference
- waJS reference
RSS
RSS is the simplest choice if the widget contains only an RSS feed.
RequirementsThe RSS root is compatible with RSS 0.9 through RSS 1.0. It also parses RSS 2.0, and Atom. (with a few exceptions) |
