SlideShare a Scribd company logo
Mashups as Collection of Widgets Adrian Giurca
What is a Widget? A  widget  is a small  client-side application that is authored using Web standards, but whose content can also be embedded into Web documents Actually there is no widget creation and execution standard  Widgets 1.0: Packaging and Configuration  is W3C Candidate Recommendation, on 23 July 2009. It defines  Companies such as Google, Yahoo, Microsoft, Amazon, IBM develop their own widgets and widgets platforms
Widget Tools Google Desktop Gadgets ,  Google, ver. 1.x, Windows XP, Windows Vista Konfabulator ,  Yahoo!, Windows XP, Windows Vista, MacOS Opera Widgets ,  Opera, ver. 9.5 Beta, Mac OS 10.5, Windows XP, Windows Vista Windows Sidebar ,  Microsoft, ver. 1.0, Windows Vista Dashboard ,  Apple, ver.1.1, Mac OS 10.5 Web-Runtime ,  Nokia, ver. 1.0 Beta, S60 3rd Edition, Feature Pack 2 (emulator) Joost Widgets ,  Joost, ver.1.0 Beta, Mac OS 10.5, Windows XP, Windows Vista Amazon Widgets ,  Amazon
Google Gadgets ... are stored as XML files. For example,  http://www.google.com/ig/modules/calendar3.xml  is a Google Calendar Gadget that embeds your Google calendar to your iGoogle page (or any other web page)  ... have to be  published on Google Gadget server  i.e. their code is processed by Google Gadgets Engine ... are embeddable in any web page, typically by using a  < script >  element. The usual result of the script execution is the creation of an  < iframe >  element in the embedding page DOM.
iGoogle is a Collection of Gadgets
The architecture of a Google Gadget A gadget is made of XML, HTML, JavaScript, and optionally, CSS, used as follows: XML describes the gadget's structure.  HTML  and CSS provide the presentation layer.  JavaScript supplies the gadget's logic.  Google does not provide a formal grammar of the XML gadget file (such as XML Schema) Check  http://code.google.com/apis/gadgets/docs/dev_guide.html  for the latest developments You can find all Google gadgets at http://www.google.com/ig/directory?synd=open&cat=all
A Simple Gadget <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> < Module > < ModulePrefs  title =&quot; Park ... &quot; width =&quot; 160 &quot;  height =&quot; 300 &quot; author =&quot; ... &quot;  author_email = &quot;...&quot; author_location =&quot; ... &quot;  category =&quot; fun &quot;/> < Content  type =&quot; html &quot;> <![CDATA[ <div> <a  id=&quot;myphotos&quot; title=&quot;Park ...&quot; href=&quot;http://picasaweb.google.com/...&quot;> <img alt=&quot;Starting Photo&quot; src=&quot;...&quot; title=&quot;See all&quot;> </a> </div> ]]> </ Content > </ Module > The  < Module >  tag indicates that this XML file contains a gadget.  You specify the gadget parameters using the  < ModulePrefs >  element.  < Content  type =&quot; html &quot;>  indicates the gadget's content type (it can contain HTML, CSS and JavaScript code).  The CDATA section contains the gadget content code used to render and activate the gadget.
Yahoo Widgets ... are stored as XML files.  ... their grammar is  DTD based ... have to be  published on  Yahoo Widgets Server (Konfabulator) ... requires a widget engine to be installed on your local machine ... are embeddable in any web page, typically by using a  < script >  element.
Yahoo Widgets Logically, Yahoo widgets are programmatic interfaces that  implements actions triggered by specific events Yahoo Widgets DTD  provides XML elements for Describing widget presentation Describing widgets actions Describing widgets periodic events (timers) Describing the widget preferences There is a  DTD for widget metadata  too.
Describing widget presentation < window  title =&quot; BBC What's On &quot;> < name > mainWindow </ name >  < width > 315 </ width > < height > 600 </ height > < visible > true </ visible > < shadow > false </ shadow > < contextMenuItems > < menuItem > < name > api </ name > < title > Build your own using the BBC Web API </ title > < onSelect > openURL( &quot;http://www0.rdthdo.bbc.co.uk/services/api/&quot; ); </ onSelect > </ menuItem > </ contextMenuItems > </ window >
Describing widgets actions < action  trigger =&quot; onMouseEnter &quot;> //focusState = &quot;inactive&quot;; if ( state == &quot;closed&quot; ) { .opacity = 200; .opacity = 200; } </ action > The  trigger  attribute sets the action triggering event The  < action >  content is typically JavaScript code that is executed when the action is performed
Describing widgets timers < timer  name =&quot; doChannelAnimation &quot;  interval =&quot; .01 &quot;   ticking =&quot; false &quot;> < onTimerFired > <![CDATA[ if (state == &quot;closed&quot;) { doChannelEase(0,75,300); } else { doChannelEase(75,0,300); } ]]> </ onTimerFired > </ timer > name  defines the timer name interval  defines the periodicity of the timer execution (sec) ticking  allows to turn a timer on and off by setting it to  true  and  false , respectively. If you want to disable a timer set  ticking =&quot; false &quot; . Later, set it to true, and it starts firing again. < onTimerFired >  contains the JavaScript code that has to be executed periodically
Describing the widget preferences < preferenceGroup  name =&quot; channelGroup &quot;  icon =&quot; resources/BBC.png &quot;> < title > Channel </ title > < order > 0 </ order > </ preferenceGroup > < preference  name =&quot; channelPref &quot;  hidden =&quot; true &quot;   > < group > channelGroup </ group > < title > Choose Channel:  </ title > < type > popup </ type > < defaultValue > 0 </ defaultValue > < option > BBC One </ option > < optionValue > 0 </ optionValue > < option > BBC Two </ option > < optionValue > 1 </ optionValue > </ preference >
Yahoo Widget Packaging A widget is packaged as an archive with the following structure: myWidget.widget  Contents    widget.xml    myWidget.kon    Resources     <any files used by the Widget>   Contents  and  Resources   are folders widget.xml  contains the widget metadata myWidget.kon  is the widget description file
BBC What's on  Yahoo Widget <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> < widget > < window  title =&quot; BBC What's On &quot;> ...  </ window > < about-box >  ...  </ about-box > < image  src =&quot; resources/bgTop.png &quot;>  ...  </ image > < action  trigger =&quot; onLoad &quot;> <![CDATA[ JS code implementing the action ]]>   </ action > < action  trigger =&quot; onMouseEnter &quot;>  ...  </ action > < timer  name =&quot; doChannelAnimation &quot;   interval =&quot; .01 &quot;  ticking =&quot; false &quot;> < onTimerFired > <![CDATA[ JS code implementing the action ]]> </ onTimerFired > </ timer > ... </ widget >
Amazon Widgets ...a library of widgets built on top Amazon Services APIs ... embeddable in any web page ...e-commerce capabilities  For example the  mp3 Widget  allows to choose mp3 music, listen mp3 music (of course a fragment) and buy mp3 music.  ...  do not offer programmatically access to widgets . Only configuration before embedding
Summary Typically widgets are embedded using  < iframe >  therefore implementing client-side widget dependency is not trivial Widgets are described platform independent (by using XML) but the generated executable code is platform dependent (as in the Google case) or requires installation of third party software (such as Yahoo, Joost ...) The  standardization  is a work in progress and is also a question if actual providers will follow the standard The security (including cross-site scripting problem) is handled by the deployment servers (widget engines) While Google Gadgets are large based on JavaScript programming, Yahoo Widgets introduce a bit more structure.

More Related Content

PPT
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
ODP
Developing and testing ajax components
PPTX
J Query Presentation
PPTX
Open social 2.0 sandbox ee and breaking out of the gadget box
PPT
Ajax
PPT
OpenSocial Intro
PPT
ARTDM 170, Week 16: Publishing
PPTX
Intro to jQuery
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Developing and testing ajax components
J Query Presentation
Open social 2.0 sandbox ee and breaking out of the gadget box
Ajax
OpenSocial Intro
ARTDM 170, Week 16: Publishing
Intro to jQuery

What's hot (7)

PDF
jQuery Mobile & PhoneGap
PDF
Magento Product Types Demystified
PPTX
DevDays09 Internet Explorer 8
PPT
Introduction To ASP.NET MVC
PPT
21 android2 updated
PPT
Android the Agile way
PDF
Vaadin Components @ Angular U
jQuery Mobile & PhoneGap
Magento Product Types Demystified
DevDays09 Internet Explorer 8
Introduction To ASP.NET MVC
21 android2 updated
Android the Agile way
Vaadin Components @ Angular U
Ad

Viewers also liked (6)

PPTX
Linked Sensor Data cube
PPT
Semantic Pipes and Semantic Mashups
PPTX
A Graph-Based Approach to Learn Semantic Descriptions of Data Sources
PPT
Building Intelligent Mashups
PPT
Intelligent Mashups
PPTX
Learning the Semantics of Structured Data Sources
Linked Sensor Data cube
Semantic Pipes and Semantic Mashups
A Graph-Based Approach to Learn Semantic Descriptions of Data Sources
Building Intelligent Mashups
Intelligent Mashups
Learning the Semantics of Structured Data Sources
Ad

Similar to Mashups as Collection of Widgets (20)

PPT
Developing Gadgets
PPT
Gadgets Intro (Plus Mapplets)
PPT
HTML5 Overview
PPT
Wookie Meetup
PPT
Wookie Meetup
ODP
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
PPT
Grails and Dojo
PPT
Dan Holevoet, Google
ODP
Devoxx 09 (Belgium)
PPT
GTLAB Installation Tutorial for SciDAC 2009
PPT
Yahoo Mobile Widgets
PPT
BluePrint Mobile Framework
PPT
Expanding a tree node
PPT
Creating Yahoo Mobile Widgets
PPT
WRT Widgets Masterclass - OverTheAir
PPT
Krazykoder struts2 plugins
PPT
jQuery Mobile
PPT
Rich faces
PPT
Widget Summit 2008
Developing Gadgets
Gadgets Intro (Plus Mapplets)
HTML5 Overview
Wookie Meetup
Wookie Meetup
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Grails and Dojo
Dan Holevoet, Google
Devoxx 09 (Belgium)
GTLAB Installation Tutorial for SciDAC 2009
Yahoo Mobile Widgets
BluePrint Mobile Framework
Expanding a tree node
Creating Yahoo Mobile Widgets
WRT Widgets Masterclass - OverTheAir
Krazykoder struts2 plugins
jQuery Mobile
Rich faces
Widget Summit 2008

More from giurca (9)

PPTX
Microdata for Dummies
PDF
From Data to Knowledge thru Grailog Visualization
PPT
Rule-based Modeling of Mashups
PPT
Mashups and Web Services
PPT
Introduction to visual rules modeling
PPT
Introduction to Rule-based Applications
PPT
JSON Rules Language
PPT
Introduction to Drools
PPT
Annotating with RDFa
Microdata for Dummies
From Data to Knowledge thru Grailog Visualization
Rule-based Modeling of Mashups
Mashups and Web Services
Introduction to visual rules modeling
Introduction to Rule-based Applications
JSON Rules Language
Introduction to Drools
Annotating with RDFa

Mashups as Collection of Widgets

  • 1. Mashups as Collection of Widgets Adrian Giurca
  • 2. What is a Widget? A widget is a small client-side application that is authored using Web standards, but whose content can also be embedded into Web documents Actually there is no widget creation and execution standard Widgets 1.0: Packaging and Configuration is W3C Candidate Recommendation, on 23 July 2009. It defines Companies such as Google, Yahoo, Microsoft, Amazon, IBM develop their own widgets and widgets platforms
  • 3. Widget Tools Google Desktop Gadgets , Google, ver. 1.x, Windows XP, Windows Vista Konfabulator , Yahoo!, Windows XP, Windows Vista, MacOS Opera Widgets , Opera, ver. 9.5 Beta, Mac OS 10.5, Windows XP, Windows Vista Windows Sidebar , Microsoft, ver. 1.0, Windows Vista Dashboard , Apple, ver.1.1, Mac OS 10.5 Web-Runtime , Nokia, ver. 1.0 Beta, S60 3rd Edition, Feature Pack 2 (emulator) Joost Widgets , Joost, ver.1.0 Beta, Mac OS 10.5, Windows XP, Windows Vista Amazon Widgets , Amazon
  • 4. Google Gadgets ... are stored as XML files. For example, http://www.google.com/ig/modules/calendar3.xml is a Google Calendar Gadget that embeds your Google calendar to your iGoogle page (or any other web page) ... have to be published on Google Gadget server i.e. their code is processed by Google Gadgets Engine ... are embeddable in any web page, typically by using a < script > element. The usual result of the script execution is the creation of an < iframe > element in the embedding page DOM.
  • 5. iGoogle is a Collection of Gadgets
  • 6. The architecture of a Google Gadget A gadget is made of XML, HTML, JavaScript, and optionally, CSS, used as follows: XML describes the gadget's structure. HTML and CSS provide the presentation layer. JavaScript supplies the gadget's logic. Google does not provide a formal grammar of the XML gadget file (such as XML Schema) Check http://code.google.com/apis/gadgets/docs/dev_guide.html for the latest developments You can find all Google gadgets at http://www.google.com/ig/directory?synd=open&cat=all
  • 7. A Simple Gadget <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> < Module > < ModulePrefs title =&quot; Park ... &quot; width =&quot; 160 &quot; height =&quot; 300 &quot; author =&quot; ... &quot; author_email = &quot;...&quot; author_location =&quot; ... &quot; category =&quot; fun &quot;/> < Content type =&quot; html &quot;> <![CDATA[ <div> <a id=&quot;myphotos&quot; title=&quot;Park ...&quot; href=&quot;http://picasaweb.google.com/...&quot;> <img alt=&quot;Starting Photo&quot; src=&quot;...&quot; title=&quot;See all&quot;> </a> </div> ]]> </ Content > </ Module > The < Module > tag indicates that this XML file contains a gadget. You specify the gadget parameters using the < ModulePrefs > element. < Content type =&quot; html &quot;> indicates the gadget's content type (it can contain HTML, CSS and JavaScript code). The CDATA section contains the gadget content code used to render and activate the gadget.
  • 8. Yahoo Widgets ... are stored as XML files. ... their grammar is DTD based ... have to be published on Yahoo Widgets Server (Konfabulator) ... requires a widget engine to be installed on your local machine ... are embeddable in any web page, typically by using a < script > element.
  • 9. Yahoo Widgets Logically, Yahoo widgets are programmatic interfaces that implements actions triggered by specific events Yahoo Widgets DTD provides XML elements for Describing widget presentation Describing widgets actions Describing widgets periodic events (timers) Describing the widget preferences There is a DTD for widget metadata too.
  • 10. Describing widget presentation < window title =&quot; BBC What's On &quot;> < name > mainWindow </ name > < width > 315 </ width > < height > 600 </ height > < visible > true </ visible > < shadow > false </ shadow > < contextMenuItems > < menuItem > < name > api </ name > < title > Build your own using the BBC Web API </ title > < onSelect > openURL( &quot;http://www0.rdthdo.bbc.co.uk/services/api/&quot; ); </ onSelect > </ menuItem > </ contextMenuItems > </ window >
  • 11. Describing widgets actions < action trigger =&quot; onMouseEnter &quot;> //focusState = &quot;inactive&quot;; if ( state == &quot;closed&quot; ) { .opacity = 200; .opacity = 200; } </ action > The trigger attribute sets the action triggering event The < action > content is typically JavaScript code that is executed when the action is performed
  • 12. Describing widgets timers < timer name =&quot; doChannelAnimation &quot; interval =&quot; .01 &quot; ticking =&quot; false &quot;> < onTimerFired > <![CDATA[ if (state == &quot;closed&quot;) { doChannelEase(0,75,300); } else { doChannelEase(75,0,300); } ]]> </ onTimerFired > </ timer > name defines the timer name interval defines the periodicity of the timer execution (sec) ticking allows to turn a timer on and off by setting it to true and false , respectively. If you want to disable a timer set ticking =&quot; false &quot; . Later, set it to true, and it starts firing again. < onTimerFired > contains the JavaScript code that has to be executed periodically
  • 13. Describing the widget preferences < preferenceGroup name =&quot; channelGroup &quot; icon =&quot; resources/BBC.png &quot;> < title > Channel </ title > < order > 0 </ order > </ preferenceGroup > < preference name =&quot; channelPref &quot; hidden =&quot; true &quot; > < group > channelGroup </ group > < title > Choose Channel: </ title > < type > popup </ type > < defaultValue > 0 </ defaultValue > < option > BBC One </ option > < optionValue > 0 </ optionValue > < option > BBC Two </ option > < optionValue > 1 </ optionValue > </ preference >
  • 14. Yahoo Widget Packaging A widget is packaged as an archive with the following structure: myWidget.widget Contents   widget.xml   myWidget.kon   Resources    <any files used by the Widget> Contents and Resources are folders widget.xml contains the widget metadata myWidget.kon is the widget description file
  • 15. BBC What's on Yahoo Widget <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> < widget > < window title =&quot; BBC What's On &quot;> ... </ window > < about-box > ... </ about-box > < image src =&quot; resources/bgTop.png &quot;> ... </ image > < action trigger =&quot; onLoad &quot;> <![CDATA[ JS code implementing the action ]]> </ action > < action trigger =&quot; onMouseEnter &quot;> ... </ action > < timer name =&quot; doChannelAnimation &quot; interval =&quot; .01 &quot; ticking =&quot; false &quot;> < onTimerFired > <![CDATA[ JS code implementing the action ]]> </ onTimerFired > </ timer > ... </ widget >
  • 16. Amazon Widgets ...a library of widgets built on top Amazon Services APIs ... embeddable in any web page ...e-commerce capabilities For example the mp3 Widget allows to choose mp3 music, listen mp3 music (of course a fragment) and buy mp3 music. ... do not offer programmatically access to widgets . Only configuration before embedding
  • 17. Summary Typically widgets are embedded using < iframe > therefore implementing client-side widget dependency is not trivial Widgets are described platform independent (by using XML) but the generated executable code is platform dependent (as in the Google case) or requires installation of third party software (such as Yahoo, Joost ...) The standardization is a work in progress and is also a question if actual providers will follow the standard The security (including cross-site scripting problem) is handled by the deployment servers (widget engines) While Google Gadgets are large based on JavaScript programming, Yahoo Widgets introduce a bit more structure.