Difference between revisions of "Widget"
Line 262: | Line 262: | ||
==== Weather ==== | ==== Weather ==== | ||
+ | * Yahoo! Weather RSS Feed: http://developer.yahoo.com/weather/ | ||
+ | * How to retrieve Yahoo! Weather using MagPie RSS and JQuery: http://www.bitrepository.com/show-yahoo-weather.html | ||
* Yahoo! Weather widget: http://www.bitrepository.com/demo/show-yahoo-weather/ | * Yahoo! Weather widget: http://www.bitrepository.com/demo/show-yahoo-weather/ | ||
* Weather station scripts - Forecast Canada : http://saratoga-weather.org/scripts-ECforecast.php#ECforecast?udat=20091110Z2045 | * Weather station scripts - Forecast Canada : http://saratoga-weather.org/scripts-ECforecast.php#ECforecast?udat=20091110Z2045 | ||
Line 268: | Line 270: | ||
+ | ==== Map ==== | ||
+ | * BING - MultiMap Weather widget: http://www.multimap.com/apidocs/1.2/demos/weatherwidget.htm | ||
+ | * Multimap API V1.2 JavaScript Examples: http://www.multimap.com/apidocs/1.2/demos/advancedwidgets.htm | ||
Revision as of 16:16, 11 November 2009
A Widget is a small functional component of a larger application, service or community. It is typically used to summarize data or remotely access information or services from another location outside of an application's original hosting/deployment environment.
Contents
What is a widget, you ask?
Whether you call it a widget, gadget, badge, module, capsule, snippet, mini or flake; a widget is a small web or desktop application that brings information to you, so you dont have to look for the information yourself. Some widgets are helpful like clocks, calculators or calendars. Some widgets let you write desktop notes and see weather forecasts. REALLY GREAT widgets do even more incredible stuff, like let you feed Dilbert in color straight to your Facebook or MySpace pages, your blog, your personal web page or even your desktop.
Widgets are designed to be shared. You can send your favorite widgets to friends and co-workers, and anyone who sees a widget on your personal pages can download it for themselves. So just click the "Grab it" button, decide where you want to put your widget, and then pass it along. Even The Boss will smile when he gets that email. [1]
Standards
Until recently, the Widget "market" on the web (and as far as software in general) suffered from a lack of standards and alphabet soup of terminologies, methodologies and proprietary solutions. Now there are 2 standards which stand out, one from the Private Sector (UWA by web Widget pioneer NetVibes) and the other from the (pseudo) Public Sector from the W3C which publishes free and open source standards, recommendations and technologies in the public domain.
Universal Widget API
Universal Widget API (UWA) is an open widget standard by Widget pioneer NetVibes. Netvibes opened its platform in 2008 to allow publishers and developers to benefit from our technology. Netvibes Universal Widget API (UWA) is a free and elegant widget framework that uses XHTML for structure, CSS for styling and JavaScript/AJAX for behavioral/DOM control; it can also use iframes and plugins such as Flash. UWA supports all major widget platforms, including Netvibes, iGoogle, Windows Vista, Mac OS X, iPhone and more.
- NetVibes - OpenSource center: http://netvibes.org/
- NetVibes - (Widget) Developer Center: http://dev.netvibes.com/
- Netvibes Ecosystem API: http://dev.netvibes.com/doc/api/eco
- What is the Universal Widget API?: http://dev.netvibes.com/doc/universal_widget_api
- EXAMPLES -- CSS templates & JavaScript controls: http://dev.netvibes.com/doc/uwa/templates_and_controls
- Anatomy of a UWA widget: http://dev.netvibes.com/doc/uwa/documentation/anatomy_of_a_uwa_widget
Specification
- Universal Widget API (UWA) 1.2: http://netvibes.org/specs/uwa/current-work/
W3C - Widgets
- Widget Landscape: http://www.w3.org/TR/widgets-land/
- W3C Widget Checker (Alpha version): http://qa-dev.w3.org:8001/widget/
- A W3C Widget implementation -- The Palette Portal: http://www.slideshare.net/avagner/a-w3c-widget-implementation-the-palette-portal
- Introduction to W3C Widgets: http://www.quirksmode.org/blog/archives/2009/04/introduction_to.html
- Widgets 1.0 -- Compatibility Matrix for Packaging and Configuration: http://samaxes.svn.beanstalkapp.com/widgets_compatibility_matrix/trunk/index.html
Specification
- Widgets 1.0 -- Packaging and Configuration: http://www.w3.org/TR/widgets/
- Widgets 1.0: APIs and Events: http://www.w3.org/TR/widgets-apis/
- Widgets 1.0: Requirements: http://www.w3.org/TR/2009/WD-widgets-reqs-20090430/
- Widgets 1.0: Access Requests Policy: http://www.w3.org/TR/widgets-access/
- W3C - Widgets 1.0 Family of Specifications: http://www.w3.org/2008/webapps/wiki/WidgetSpecs
Tutorials
iNetTuts
- How to Mimic the iGoogle Interface: http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/
- iNettuts with Cookies!: http://james.padolsey.com/javascript/inettuts-with-cookies/
- How to Mimic the iGoogle Interface with Database: http://jsabino.wordpress.com/2009/09/19/how-to-mimic-the-igoogle-interface-with-database/
Adding a new widget.
Not sure if this the best way to do this, but it seems to work for me.
1. Make a “hidden” widget by setting the display (inline style attribute or in the css file)to none. 2. On the create new widget event (button, anchor or whatever), clone the hidden widget (do a deep clone by setting the parameter for clone to true)
Here is my code: — assume that there is a “hidden” widget with a unique id
var new_widget = $(’#newwidget’).clone(true); $(’#column2′).append(new_widget); $(’.column’).sortable(’option’,'items’,’.widget’); $(’.column’).sortable(’option’,'connectWith’,’.column’); new_widget.find(’div.widget-content’).html(”Added new Widget “); new_widget.show(’slow’);
This seemed to solve the problem of not being able to move the widget once it was created.
function insertWidget(where, opt) { var selectorOld = iNettuts.settings.widgetSelector; iNettuts.settings.widgetSelector = '.new';salida = "
$(where).append(salida); iNettuts.addWidgetControls(); iNettuts.settings.widgetSelector = selectorOld; } insertWidget("#column1", { color: "blue", title: "Prueba", content: "ESTO ES UNA PRUEBA" });
}}
Here’s a fix for jquery-ui-1.7.1 & jquery-1.3.2
REPLACE
var notSortable = ”;
WITH
var notSortable = ‘#none,’;
Without the fix, you will not be able to move any widget around unless you have an ‘id’ associated with at least one widget.
PS: If anyone has a better solution, please post! Thx! [6]
Note for use with jquery 1.3.2. Widget will have moving width on mouseup() event in makeSortable() function. So replace this code :
if(!$(this).parent().hasClass(’dragging’)) { // Patch for jquery.1.3.2 //$(this).parent().css({width:”}); } else { $(settings.columns).sortable(’disable’); }
in
if($(this).parent().hasClass(’dragging’)) { $(settings.columns).sortable(’disable’); }
Great job thanks to you from France.
Tools
- VODAFONE -- Widget SDK: http://www.betavine.net/bvportal/resources/widgets/research
Resources
jQuery
- jQuery Plugins - Widgets category: http://plugins.jquery.com/project/Plugins/category/50
- MBContainersPlus: http://pupunzi.wordpress.com/2009/02/01/mbcontainersplus/
- Easy Widgets (jQuery): http://plugins.jquery.com/project/easywidgets
- Calculator Widget (by Keith Wood): http://keith-wood.name/calculator.html
WidgetBuilder
- FileDialog demo: http://www.ardentedge.com/pr_WidgetBuilder_FileDialog.htm
FusionWidgets
- FusionWidgets -- Live Demos: http://www.fusioncharts.com/widgets/LiveDemos.asp
Examples
Platforms
BBC
- BBC homepage: http://www.bbc.co.uk/?edit
Multiply
- Multiply profiles (when logged in and click CUSTOMIZE): http://bcmoney.multiply.com/
NetVibes
- NetVibes - The original Widget-driven portal: http://netvibes.com
iGoogle
- iGoogle: http://www.google.com/ig?source=mpues&hl=en
- iGoogle API: http://code.google.com/apis/gadgets/index.html
- iGoogle Themes API: http://code.google.com/intl/pl/apis/themes/index.html
- iGoogle Developers: http://igoogledeveloper.blogspot.com/
- Google Wave Widgets -- Implementation using W3C Widgets and Wookie Server: http://zope.cetis.ac.uk/members/scott/blogview?entry=20090601115357
- Google adds OAuth to widget mashups: http://news.cnet.com/8301-17939_109-10105186-2.html?part=rss&tag=feed&subj=Webware
Yahoo!
- Yahoo! Widgets (for Mac and Windows): http://widgets.yahoo.com/
- Widget Repository: http://widgets.yahoo.com/download/
Widgets
Weather
- Yahoo! Weather RSS Feed: http://developer.yahoo.com/weather/
- How to retrieve Yahoo! Weather using MagPie RSS and JQuery: http://www.bitrepository.com/show-yahoo-weather.html
- Yahoo! Weather widget: http://www.bitrepository.com/demo/show-yahoo-weather/
- Weather station scripts - Forecast Canada : http://saratoga-weather.org/scripts-ECforecast.php#ECforecast?udat=20091110Z2045
- XML processing in Ajax, Part 1 -- Four approaches: http://www.ibm.com/developerworks/xml/library/x-xmlajaxpt1/
- XML processing in Ajax, Part 2 -- Two Ajax and XSLT approachesTransforming XML in Ajax with XSLT: http://www.ibm.com/developerworks/xml/library/x-xmlajaxpt2/
Map
- BING - MultiMap Weather widget: http://www.multimap.com/apidocs/1.2/demos/weatherwidget.htm
- Multimap API V1.2 JavaScript Examples: http://www.multimap.com/apidocs/1.2/demos/advancedwidgets.htm
Tools
Wookie
Wookie is a project to create open source software for adding widgets to your applications.
- Wookie project: http://www.getwookie.org/Welcome.html
- Wookie wiki (goodness me): http://wiki.apache.org/incubator/WookieProposal
- Wookie download: http://tencompetence.cvs.sourceforge.net/viewvc/tencompetence/wp6/org.tencompetence.widgetservice/builds/
- Wookie Meetup: http://www.slideshare.net/scottw/wookie-meetup-2232012
External Links
- wikipedia: Web widget
- User-defined interfaces in PHP 5 -- Implementing (X)HTML Widgets: http://www.devshed.com/c/a/PHP/Userdefined-interfaces-in-PHP-5-Implementing-XHTML-Widgets/
- Windows Mobile 6.5 – What’s in for developers?: http://blogs.msdn.com/windowsmobile/archive/2009/03/18/windows-mobile-6-5-what-s-in-for-developers.aspx
- Widgets Will Spark Internet TV: http://www.internetevolution.com/author.asp?section_id=526&doc_id=175831&
- wikipedia: Yahoo! Widgets
- wikipedia: Widget engine
- wikipedia: Web widget
- JavaScript RSS/ATOM Web Widget: http://www.hashemian.com/tools/rss-atom-widget.htm
- A step in the right direction -- Widget company Clearspring passes ad audit: http://digital.venturebeat.com/2008/06/24/a-step-in-the-right-direction-widget-company-clearspring-passes-ad-audit/
References
- ↑ Dilbert Widget: http://widget.dilbert.com/
- ↑ W3C Widgets - Vodafone Mobile Widget Camp: http://zope.cetis.ac.uk/members/scott/blogview?entry=20090420144900
- ↑ W3C Widgets 1.0 Requirements Updated: http://stickiwidgets.com/2007/07/11/w3c-widgets-10-requirements-updated/
- ↑ iNetTuts with Cookies - Adding new Widget: http://james.padolsey.com/javascript/inettuts-with-cookies/#comment-12090
- ↑ Add/Insert a new Widget: http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/#comment-19351
- ↑ jquery-ui-1.7.1 & jquery-1.3.2: http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/#comment-54343
- ↑ Upgrade to jQuery 1.3.2: http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/#comment-54343