SlideShare uma empresa Scribd logo
1 de 15
OpenSocial 2.0 Sandbox Embedded Experiences, and how your gadget can go beyond the box 12-May-2011 #openapprevolution 1
Team 12-May-2011 #openapprevolution 2 Andrew Davis Andrew has worked at IBM for eight years in IBM Collaboration Software on Lotus Notes and Expeditor Teams. He is responsible for bringing the web technologies including OpenSocial to desktop and web apps.  He first integrated Gadgets into Lotus Notes in 2008, with like Notes Widgets, LiveText, Catalog and Feeds.  General trouble maker in introducing new web technologies at IBM ICS. Ryan Baxter Ryan has worked for IBM for three years.  His primary focus during this time has been working on public APIs for Lotus Notes.  Recently he has become involved with the OpenSocial foundation, and over the past year has been working on several enhancements to the OpenSocial specification while at the same time providing implementations of these enhancements throughout IBM's products. @ryanjbaxter http://ryanjasonbaxter.com Special thanks to community members John Helmstead, Michael Hermanto, Ziv Horesh, Mark Weitzel and Chris Cole
Agenda 12-May-2011 #openapprevolution 3 Enabling OpenApp Revolution for Gadget Developers on 2.0 - Sandbox Draft OpenSocial 2.0 Features How gadgets can make collaboration richer with Embedded Experiences How gadgets  can jump out of the box How gadgets contribute to the container page OpenSearch Declarative Actions and Selection
Sandbox OpenSocial2 Deployed daily build of shindig 3.0, containing latest proposals and patches so you can try out the OpenSocial2.0 spec Hosted on Amazon EC2 mini-instance Sample collaboration page using common container Activity Stream Inbox Gadget Sidebar Gadget Developrs can Ability to add gadgets, try new APIs Test embedded experiences gadget in activity stream Plan is to clean up, fully automate daily deployment and contribute to the community if OpenSocial/Shindig interested
Embedded Experiences Delegate rendering of content to trusted gadgets in activity streams,  email, etc Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#Embedded-Experiences Data Model - JSON and XML "embed" : {     "url" : "http://www.example.com/embedded/123",     "gadget" : "http://www.example.com/embedded/gadget.xml",     "context" : {        "title" : "Hello World",       "id" : 123     }   "previewImage" : "http://www.exmaple.com/embedded/123.png" }
Payload in MIME Email From: notifications@socialnetwork.com To: johndoe@example.com Subject: Social Network: Mary Has Commented On Your Status MIME-Version: 1.0 Content-Type: multipart/alternative;         boundary="XXXXboundary text" Mary has commented on your status. --XXXXboundary text  Content-Type: text/plain Mary has commeneted on your status. --XXXXboundary text Content-Type: application/embed+json {   "gadget" : "http://www.socialnetwork.com/embedded/commentgadget.xml",   "context" : 123 } --XXXXboundary text Content-Type: text/html <html> <!-- HTML representation here --> </html>
Example EE Gadget <Module>   <ModulePrefs title="Embedded Experiences Test" description="Tests the embedded experiences APIs.">     <Require feature="embedded-experiences"></Require>   </ModulePrefs>   <Content type="html" view="embedded">       <![CDATA[         <script type="text/javascript">             function myCallback(key){               var value = opensocial.data.getDataContext().getDataSet(key);             document.getElementById("contextData").innerHTML = "Context Information For This Gadget: " + value;           }           function initData() { opensocial.data.getDataContext().registeListener('org.opensocial.ee.context', myCallback);           }           gadgets.util.registerOnLoadHandler(initData);       </script>        <div id="contextData"></div>   ]]>   </Content> </Module>
Jumping out of the Box Modal Dialogs/ Lightboxes, Non-Modal Dialogs, Tabs implemented using Views and Urls in gadgets.views Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.views openGadget() openUrl() close() setReturnValue()
How a gadget can open a lightbox  <Module>     <ModulePrefs title="Albums and MediaItems">        <Require feature="views" />             </ModulePrefs>  <Content type="html" view="default"><![CDATA[ <script>     function renderMediaItemInDialog(album, mediaItem) { gadgets.views.openUrl(mediaItem.url, idCallback,'dialog');     }     function openAlbumNewTab(album) {           … var viewParams = {"viewerId":viewer.id,"data":album};         var opt_params = {"view":"albumFullView", "viewTarget":'tab', "viewParams":viewParams};         gadgets.views.openGadget(callback,idCallback,opt_params);     }     function editAlbumPopup(album) {        ….. var viewParams = {"data":album};         var opt_params = {"view":"editAlbum","viewTarget":"modalDialog","viewParams":viewParams};         gadgets.views.openGadget(callback,idCallback,opt_params);     }; </script>  ]]></Content> <Content type="html" view="editAlbum"> …. </Content> <Content type="html" view="albumFullView"> …. </Content>
How gadgets contribute to container In Shindig 3.0 Common Container gadget Pre-loading mechanism allows container to process the gadget meta-data before the gadget even renders Optional Shindig features, like opensearch can leverage <feature param> to receive information from gadgets Individual Gadgets can require these features and pass in configuration and meta data to the container’s features.
OpenSearch Gadgets can extend the container pages search capabilities Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#OpenSearch
<?xml version="1.0" encoding="UTF-8" ?>  <Module>    <ModulePrefs title="OpenSearch Example">      <Optional feature="opensearch">        <Param name="description">         <![CDATA[           <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">              <ShortName>Example Search</ShortName>              <Description>Realtime Example Search</Description>              <Url type="application/atom+xml" method="get" template="http://search.example.com/search.atom?q={searchTerms}"/>             <Image width="16" height="16">http://search.example.com/favicon.png</Image>              <InputEncoding>UTF-8</InputEncoding>             <SearchForm>http://search.example.com/</SearchForm>           </OpenSearchDescription>         ]]>       </Param>      </Optional>    </ModulePrefs>   <Content type="url" href="http://example.com/searchGadget.xml" />  </Module> OpenSearch Example Gadget
Declarative Actions, Selection Gadget can bind actions to OpenSocial Data types and by Paths in the container, without even being visible on the page, and then lazily load when action is invoked. Selection provides a singleton selection when executing the action, even if gadgets aren’t rendered to receive even Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.selection http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.actions
Declarative Actions Example <Module>  <ModulePrefs title="Sample VOIP">   <Optional feature="actions">    <Param name="action-contributions">     <![CDATA[     <action id="org.samplevoip.callbyperson" dataObject="opensocial.Person" label="Call using VOIP Phone"       view="DialByPerson" icon="http://ww.samplervoip.org/phone.gif" />     <action id="org.samplervoip.navLink" path="container/navigationLinks" label="Phone" />     ]]>    </Param>   </Optional>  </ModulePrefs>  <Content type="html">   <![CDATA[    <script> 	// Bind javascript function to action ID 	function mycallback{...  } 	var myaction = { 		id: "org.samplevoip.callbyperson", 		callback: mycallback 	} 	container.actions.addAction(myaction);    </script>   ]]>  </Content> </Module>
Thanks to OpenSocial and Shindig Community Come see us at the Poster Session! Check out demos and test your gadgets with OpenSocial 2.0! Sandbox.opensocial2.org:8080

Mais conteúdo relacionado

Mais procurados

Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
Roger Kitain
 

Mais procurados (20)

Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
Android Components
Android ComponentsAndroid Components
Android Components
 
Android in practice
Android in practiceAndroid in practice
Android in practice
 
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation DrawerAndroid Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
 
Adopting 3D Touch in your apps
Adopting 3D Touch in your appsAdopting 3D Touch in your apps
Adopting 3D Touch in your apps
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
EverNote iOS SDK introduction & practices
EverNote iOS SDK introduction & practices EverNote iOS SDK introduction & practices
EverNote iOS SDK introduction & practices
 
Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Android gui framework
Android gui frameworkAndroid gui framework
Android gui framework
 
Make XCUITest Great Again
Make XCUITest Great AgainMake XCUITest Great Again
Make XCUITest Great Again
 
Android Workshop 2013
Android Workshop 2013Android Workshop 2013
Android Workshop 2013
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
 
Minicurso Android
Minicurso AndroidMinicurso Android
Minicurso Android
 
React django
React djangoReact django
React django
 

Semelhante a Open social 2.0 sandbox ee and breaking out of the gadget box

Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
Patrick Chanezon
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
 

Semelhante a Open social 2.0 sandbox ee and breaking out of the gadget box (20)

Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and Dashboards
 
Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing Gadgets
 
HTML5 and web technology update
HTML5 and web technology updateHTML5 and web technology update
HTML5 and web technology update
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 
ANT
ANTANT
ANT
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupal
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Microsoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributionsMicrosoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributions
 
Dan Holevoet, Google
Dan Holevoet, GoogleDan Holevoet, Google
Dan Holevoet, Google
 
New Browsers
New BrowsersNew Browsers
New Browsers
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
PPT
PPTPPT
PPT
 
Aloha Presentation #t3con10
Aloha Presentation #t3con10Aloha Presentation #t3con10
Aloha Presentation #t3con10
 
Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Open social 2.0 sandbox ee and breaking out of the gadget box

  • 1. OpenSocial 2.0 Sandbox Embedded Experiences, and how your gadget can go beyond the box 12-May-2011 #openapprevolution 1
  • 2. Team 12-May-2011 #openapprevolution 2 Andrew Davis Andrew has worked at IBM for eight years in IBM Collaboration Software on Lotus Notes and Expeditor Teams. He is responsible for bringing the web technologies including OpenSocial to desktop and web apps. He first integrated Gadgets into Lotus Notes in 2008, with like Notes Widgets, LiveText, Catalog and Feeds. General trouble maker in introducing new web technologies at IBM ICS. Ryan Baxter Ryan has worked for IBM for three years. His primary focus during this time has been working on public APIs for Lotus Notes. Recently he has become involved with the OpenSocial foundation, and over the past year has been working on several enhancements to the OpenSocial specification while at the same time providing implementations of these enhancements throughout IBM's products. @ryanjbaxter http://ryanjasonbaxter.com Special thanks to community members John Helmstead, Michael Hermanto, Ziv Horesh, Mark Weitzel and Chris Cole
  • 3. Agenda 12-May-2011 #openapprevolution 3 Enabling OpenApp Revolution for Gadget Developers on 2.0 - Sandbox Draft OpenSocial 2.0 Features How gadgets can make collaboration richer with Embedded Experiences How gadgets can jump out of the box How gadgets contribute to the container page OpenSearch Declarative Actions and Selection
  • 4. Sandbox OpenSocial2 Deployed daily build of shindig 3.0, containing latest proposals and patches so you can try out the OpenSocial2.0 spec Hosted on Amazon EC2 mini-instance Sample collaboration page using common container Activity Stream Inbox Gadget Sidebar Gadget Developrs can Ability to add gadgets, try new APIs Test embedded experiences gadget in activity stream Plan is to clean up, fully automate daily deployment and contribute to the community if OpenSocial/Shindig interested
  • 5. Embedded Experiences Delegate rendering of content to trusted gadgets in activity streams, email, etc Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#Embedded-Experiences Data Model - JSON and XML "embed" : { "url" : "http://www.example.com/embedded/123", "gadget" : "http://www.example.com/embedded/gadget.xml", "context" : { "title" : "Hello World", "id" : 123 } "previewImage" : "http://www.exmaple.com/embedded/123.png" }
  • 6. Payload in MIME Email From: notifications@socialnetwork.com To: johndoe@example.com Subject: Social Network: Mary Has Commented On Your Status MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="XXXXboundary text" Mary has commented on your status. --XXXXboundary text Content-Type: text/plain Mary has commeneted on your status. --XXXXboundary text Content-Type: application/embed+json { "gadget" : "http://www.socialnetwork.com/embedded/commentgadget.xml", "context" : 123 } --XXXXboundary text Content-Type: text/html <html> <!-- HTML representation here --> </html>
  • 7. Example EE Gadget <Module> <ModulePrefs title="Embedded Experiences Test" description="Tests the embedded experiences APIs."> <Require feature="embedded-experiences"></Require> </ModulePrefs> <Content type="html" view="embedded"> <![CDATA[ <script type="text/javascript"> function myCallback(key){ var value = opensocial.data.getDataContext().getDataSet(key); document.getElementById("contextData").innerHTML = "Context Information For This Gadget: " + value; } function initData() { opensocial.data.getDataContext().registeListener('org.opensocial.ee.context', myCallback); } gadgets.util.registerOnLoadHandler(initData); </script> <div id="contextData"></div> ]]> </Content> </Module>
  • 8. Jumping out of the Box Modal Dialogs/ Lightboxes, Non-Modal Dialogs, Tabs implemented using Views and Urls in gadgets.views Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.views openGadget() openUrl() close() setReturnValue()
  • 9. How a gadget can open a lightbox <Module> <ModulePrefs title="Albums and MediaItems"> <Require feature="views" /> </ModulePrefs> <Content type="html" view="default"><![CDATA[ <script> function renderMediaItemInDialog(album, mediaItem) { gadgets.views.openUrl(mediaItem.url, idCallback,'dialog'); } function openAlbumNewTab(album) { … var viewParams = {"viewerId":viewer.id,"data":album}; var opt_params = {"view":"albumFullView", "viewTarget":'tab', "viewParams":viewParams}; gadgets.views.openGadget(callback,idCallback,opt_params); } function editAlbumPopup(album) { ….. var viewParams = {"data":album}; var opt_params = {"view":"editAlbum","viewTarget":"modalDialog","viewParams":viewParams}; gadgets.views.openGadget(callback,idCallback,opt_params); }; </script> ]]></Content> <Content type="html" view="editAlbum"> …. </Content> <Content type="html" view="albumFullView"> …. </Content>
  • 10. How gadgets contribute to container In Shindig 3.0 Common Container gadget Pre-loading mechanism allows container to process the gadget meta-data before the gadget even renders Optional Shindig features, like opensearch can leverage <feature param> to receive information from gadgets Individual Gadgets can require these features and pass in configuration and meta data to the container’s features.
  • 11. OpenSearch Gadgets can extend the container pages search capabilities Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#OpenSearch
  • 12. <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="OpenSearch Example"> <Optional feature="opensearch"> <Param name="description"> <![CDATA[ <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Example Search</ShortName> <Description>Realtime Example Search</Description> <Url type="application/atom+xml" method="get" template="http://search.example.com/search.atom?q={searchTerms}"/> <Image width="16" height="16">http://search.example.com/favicon.png</Image> <InputEncoding>UTF-8</InputEncoding> <SearchForm>http://search.example.com/</SearchForm> </OpenSearchDescription> ]]> </Param> </Optional> </ModulePrefs> <Content type="url" href="http://example.com/searchGadget.xml" /> </Module> OpenSearch Example Gadget
  • 13. Declarative Actions, Selection Gadget can bind actions to OpenSocial Data types and by Paths in the container, without even being visible on the page, and then lazily load when action is invoked. Selection provides a singleton selection when executing the action, even if gadgets aren’t rendered to receive even Spec: http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.selection http://opensocial-resources.googlecode.com/svn/spec/2.0/Core-Gadget.xml#gadgets.actions
  • 14. Declarative Actions Example <Module> <ModulePrefs title="Sample VOIP"> <Optional feature="actions"> <Param name="action-contributions"> <![CDATA[ <action id="org.samplevoip.callbyperson" dataObject="opensocial.Person" label="Call using VOIP Phone" view="DialByPerson" icon="http://ww.samplervoip.org/phone.gif" /> <action id="org.samplervoip.navLink" path="container/navigationLinks" label="Phone" /> ]]> </Param> </Optional> </ModulePrefs> <Content type="html"> <![CDATA[ <script> // Bind javascript function to action ID function mycallback{... } var myaction = { id: "org.samplevoip.callbyperson", callback: mycallback } container.actions.addAction(myaction); </script> ]]> </Content> </Module>
  • 15. Thanks to OpenSocial and Shindig Community Come see us at the Poster Session! Check out demos and test your gadgets with OpenSocial 2.0! Sandbox.opensocial2.org:8080