OpenSocial Gadgets
& Eclipse
Benjamin Cabé
<bcabe@sierrawireless.com
>
What is OpenSocial?
• Open Specification
– 1.0 version released in March
– Many companies involved
• Lightweight web compo...
Write once, run anywhere 
• Many social networking sites are OpenSocial
compatible
– MySpace, Hi5, LinkedIn, iGoogle, Ork...
Enterprise usage
• Many enterprise-oriented gadgets
– Calendar, To-Do List, Map, Doodle, …
– Atlassian provides gadgets fo...
Social, you said?
• Many APIs to crawl user’s social network
• Data model
– Person (friends, groups, tastes, …)
• AppData ...
Gadget/module definition
• XML file
– Metadata
– Dependencies
– Application implementation
• In-line HTML / CSS / JavaScri...
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Hello, world!«
author="Benjamin Cabé">
<Require featur...
Core Gadget API
• gadgets.flash
• gadgets.io
• gadgets.json
• gadgets.MiniMess
age
• gadgets.Prefs
• gadgets.pubsub
• gadg...
The simple way…
• Stand-alone HTML/JS/CSS in your preferred
editor
• Worry about gadget.xml later
– Debug made easier
• Wr...
OpenSocial
Development Environment
• Built-in Shindig server for local testing
• Forms editor for the gadget definition
• ...
Why?
• Deploy existing gadgets into views
• … and develop new ones leveraging Eclipse
services
– Only HTML, CSS & Javascri...
Collaborative development
• Make e4 « social-aware »
– Communicate with co-workers
– Share information (project, code snip...
Implementation overview
• HTML rendering: SWT Browser widget
• Since 3.5, the Browser is on steroids:
– Browser#evaluate(S...
Implementation overview
• Modules express dependencies towards features
– Extension point to register new OpenSocial featu...
Plan
• Create bridges to more Eclipse Application
Services
• Merge some of recent investigations made in
http://github.com...
Questions?
Further reading
• http://www.opensocial.org
• http://wiki.opensocial.org/index.php?title=JavaScript_API_Reference
• http:/...
OpenSocial gadgets at Eclipse
OpenSocial gadgets at Eclipse
OpenSocial gadgets at Eclipse
OpenSocial gadgets at Eclipse
Upcoming SlideShare
Loading in …5
×

OpenSocial gadgets at Eclipse

1,653 views
1,540 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,653
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OpenSocial gadgets at Eclipse

  1. 1. OpenSocial Gadgets & Eclipse Benjamin Cabé <bcabe@sierrawireless.com >
  2. 2. What is OpenSocial? • Open Specification – 1.0 version released in March – Many companies involved • Lightweight web components • Modularity in mind • Social features
  3. 3. Write once, run anywhere  • Many social networking sites are OpenSocial compatible – MySpace, Hi5, LinkedIn, iGoogle, Orkut… • Eclipse – e4 team working on an OpenSocial implementation too
  4. 4. Enterprise usage • Many enterprise-oriented gadgets – Calendar, To-Do List, Map, Doodle, … – Atlassian provides gadgets for JIRA metrics • Bringing OpenSocial support into an existing application is not that hard – Existing web apps: Apache Shindig – Rich client apps: e4! • “Social Enterprise”
  5. 5. Social, you said? • Many APIs to crawl user’s social network • Data model – Person (friends, groups, tastes, …) • AppData for each gadget – Activities (music being listened, …) – Messages, Albums, …
  6. 6. Gadget/module definition • XML file – Metadata – Dependencies – Application implementation • In-line HTML / CSS / JavaScript • or URL to external definition (a la IFRAME)
  7. 7. <?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Hello, world!« author="Benjamin Cabé"> <Require feature="opensocial-0.8"/> </ModulePrefs> <Content type="html"> <![CDATA[ <script type="text/javascript"> function init() { $("handler").innerHTML = "Hello, world." ; } gadgets.util.registerOnLoadHandler(function() { init(); }); </script> <div id="handler"></div> ]]> </Content> </Module>
  8. 8. Core Gadget API • gadgets.flash • gadgets.io • gadgets.json • gadgets.MiniMess age • gadgets.Prefs • gadgets.pubsub • gadgets.rpc • gadgets.skins • gadgets.Tab • gadgets.TabSet • gadgets.util • gadgets.views • gadgets.window
  9. 9. The simple way… • Stand-alone HTML/JS/CSS in your preferred editor • Worry about gadget.xml later – Debug made easier • Wrap in gadget.xml at the very end – “url” content-type => IFRAME
  10. 10. OpenSocial Development Environment • Built-in Shindig server for local testing • Forms editor for the gadget definition • Social data handling (embedded database) • Testing – Easy iGoogle deployment – Performance testing with Firefox
  11. 11. Why? • Deploy existing gadgets into views • … and develop new ones leveraging Eclipse services – Only HTML, CSS & Javascript – Not mandatory to know the Eclipse API – OpenSocial spec fits quite well in Eclipse architecture – De-facto self-hosting
  12. 12. Collaborative development • Make e4 « social-aware » – Communicate with co-workers – Share information (project, code snippets) with your social network – Share gadgets themselves (« Coworker John suggests you to add the XYZ gadget »)
  13. 13. Implementation overview • HTML rendering: SWT Browser widget • Since 3.5, the Browser is on steroids: – Browser#evaluate(String) allows evaluation of arbitrary JavaScript from your Java code – BrowserFunction allows to have Java implementation for JavaScript functions
  14. 14. Implementation overview • Modules express dependencies towards features – Extension point to register new OpenSocial features in the container – OSGi Resolver to solve constraints expressed by a Module • Available features in the container: mapped to Bundles • Features required by a module: Require-Bundle directives • Eclipse specific APIs exposed through the e4 OpenSocial feature
  15. 15. Plan • Create bridges to more Eclipse Application Services • Merge some of recent investigations made in http://github.com/kartben • ATF integration (JS/CSS debugging support) • Social REST APIs directly exposed by ECF
  16. 16. Questions?
  17. 17. Further reading • http://www.opensocial.org • http://wiki.opensocial.org/index.php?title=JavaScript_API_Reference • http://shindig.apache.org/ • https://sites.google.com/site/opensocialdevenv/ • http://borisoneclipse.blogspot.com/2009/11/opensocial-igoogle-gadgets-in-eclipse.html

×