SlideShare ist ein Scribd-Unternehmen logo
1 von 12
OpenSocial 0.9 and OSML
Introductions


   Chris Cole
   Architect with MySpace Open Platform
   co-author of upcoming book
      “Building OpenSocial Apps for MySpace”




   Max Newbould
   Development Manager – OpenSocial Container




                                                2
OpenSocial 0.9 and OSML

 • Recently ratified by spec group

 • OSML & DataPipeline

 • oslite Javascript API




                                     3
OpenSocial Markup Language (OSML)

 • Tag-based language for building apps

 • Utilizes GadgetXML format

 • Provides full container API support




                                          4
OSML – Custom Tag Templates

 • Declare and use custom tags for common UI elements

<script type=quot;text/os-templatequot; tag=quot;my:ParamBorderTagquot;>
<div style=quot;margin:20px;border:12px solid
${My.borderColor};padding:20px;width:220px;quot;>
    This tag uses borderColor: ${My.borderColor}
</div>
</script>

...


<my:ParamBorderTag>
  <borderColor>Green</borderColor>
</my:ParamBorderTag>




                                                           5
OSML – Internationalization Support


<Locale>
  <MessageBundle>
   <Msg name=quot;helloworldquot;>Hello World</Msg>
   <Msg name=quot;congratsquot;>Congratulations on using OSML</Msg>
  </MessageBundle>
</Locale>
<Locale lang=quot;dequot;>             <h1>${Msg.helloworld}</h1>
  <MessageBundle>
   <Msg name=quot;helloworldquot;>Hallo Welt</Msg>
   <Msg name=quot;congratsquot;>Herzlichen Glückwunsch zur Verwendung OSML</Msg>
  </MessageBundle>
</Locale>
<Locale lang=quot;jaquot;>
  <MessageBundle>
   <Msg name=quot;helloworldquot;>            </Msg>
   <Msg name=quot;congratsquot;>        OSML         </Msg>
  </MessageBundle>
</Locale>
Data Pipeline


 • Declare and use data simply
    – No need for 20+ lines of Javascript & callback functions


 <os:ViewerRequest key=“Viewer” >

 ...
 <h1>Hello, ${Viewer.Name}</h1>




                                                                 7
Data Pipeline


 • Not old-style data call

 function requestMe() { var req =
    opensocial.newDataRequest();
    req.add(req.newFetchPersonRequest(
    opensocial.DataRequest.PersonId.VIEWER), quot;viewerquot;);
    req.send(handleRequestMe);
 };
 function handleRequestMe(data) {
    var viewer = data.get(quot;viewerquot;);
 if (viewer.hadError()) { /
    /Handle error using viewer.getError()...
    return;
 }
 //No error. Do something with viewer.getData()... }
HTML Fragment Rendering

 • Simple
    <os:Get   href=quot;http://example.org/stuff/${vwr.id}quot; />


 • Rich
    <myspace:RenderRequest src=quot;http://example.org/stuff/showitquot;
      method=quot;postquot; target=quot;xDivquot; >
    <id>${vwr.id}</id>
    <name>${vwr.name}</name>
    <stuffCount>4</stuffCount>
    </myspace:RenderRequest>


 • Full content
    <Content href=quot;http://example.org/stuff>
      <os:ViewerRequest key=quot;vwrquot; fields=quot;id,namequot; />
    </Content>


                                                                   9
oslite API

 • Shortened and cleaned Javascript API

 • Provides 1:1 mapping between JS calls and REST calls



  var batch = osapi.newBatch();
  osapi.people.getViewer({fields: ['name', 'birthday']},
  batch('viewer'));
  osapi.people.get({userId: '@owner', groupId: '@friends',
  batch('ownerFriends'));
  batch.execute(function(result) {
    alert('Your name is ' + result.viewer.name + '!');
    alert('You have ' + result.ownerFriends.length + '
  friends!');
  });




                                                             10
Demo




       11
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

AngularJS Data Binding
AngularJS Data BindingAngularJS Data Binding
AngularJS Data Binding
Ticore Shih
 
Scalable vector ember
Scalable vector emberScalable vector ember
Scalable vector ember
Matthew Beale
 
How to learn j query
How to learn j queryHow to learn j query
How to learn j query
Baoyu Xu
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
Marcin Baran
 

Was ist angesagt? (20)

Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
JavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM ManipulationJavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM Manipulation
 
22 j query1
22 j query122 j query1
22 j query1
 
AngularJS Data Binding
AngularJS Data BindingAngularJS Data Binding
AngularJS Data Binding
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
 
Web Components: The future of Web Application Development
Web Components: The future of Web Application DevelopmentWeb Components: The future of Web Application Development
Web Components: The future of Web Application Development
 
Scalable vector ember
Scalable vector emberScalable vector ember
Scalable vector ember
 
Web Projects: From Theory To Practice
Web Projects: From Theory To PracticeWeb Projects: From Theory To Practice
Web Projects: From Theory To Practice
 
Java script
Java scriptJava script
Java script
 
jQuery quick tips
jQuery quick tipsjQuery quick tips
jQuery quick tips
 
Better Selenium Tests with Geb - Selenium Conf 2014
Better Selenium Tests with Geb - Selenium Conf 2014Better Selenium Tests with Geb - Selenium Conf 2014
Better Selenium Tests with Geb - Selenium Conf 2014
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routing
 
Aspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdutionAspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdution
 
Ajax3
Ajax3Ajax3
Ajax3
 
jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009jQuery Loves Developers - Oredev 2009
jQuery Loves Developers - Oredev 2009
 
How to learn j query
How to learn j queryHow to learn j query
How to learn j query
 
Front End Development: The Important Parts
Front End Development: The Important PartsFront End Development: The Important Parts
Front End Development: The Important Parts
 
CodePreneur Week3 - Introduction to JavaScript
CodePreneur Week3 - Introduction to JavaScriptCodePreneur Week3 - Introduction to JavaScript
CodePreneur Week3 - Introduction to JavaScript
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
 

Andere mochten auch

Social networking myspace
Social networking myspaceSocial networking myspace
Social networking myspace
myonlinelife271
 
Cell Phone Forum
Cell Phone ForumCell Phone Forum
Cell Phone Forum
dbbrom
 
nisource annual reports 2005
nisource annual reports 2005nisource annual reports 2005
nisource annual reports 2005
finance29
 

Andere mochten auch (16)

Porting Your Apps to MySpace by Playfish
Porting Your Apps to MySpace by PlayfishPorting Your Apps to MySpace by Playfish
Porting Your Apps to MySpace by Playfish
 
App Activity Streams
App Activity StreamsApp Activity Streams
App Activity Streams
 
Getting Started with MySpace Applications
Getting Started with MySpace ApplicationsGetting Started with MySpace Applications
Getting Started with MySpace Applications
 
Crino si presenta
Crino si presentaCrino si presenta
Crino si presenta
 
Citibank - opinie klientów banki Citi
Citibank - opinie klientów banki CitiCitibank - opinie klientów banki Citi
Citibank - opinie klientów banki Citi
 
Social networking myspace
Social networking myspaceSocial networking myspace
Social networking myspace
 
Gaza Point
Gaza  PointGaza  Point
Gaza Point
 
Cell Phone Forum
Cell Phone ForumCell Phone Forum
Cell Phone Forum
 
Real Cost Of Stadium
Real Cost Of StadiumReal Cost Of Stadium
Real Cost Of Stadium
 
MySpaceID Overview 2.5.09
MySpaceID Overview 2.5.09MySpaceID Overview 2.5.09
MySpaceID Overview 2.5.09
 
MySpace Open Platform enhancements with OpenSocial 0.9
MySpace Open Platform enhancements with OpenSocial 0.9MySpace Open Platform enhancements with OpenSocial 0.9
MySpace Open Platform enhancements with OpenSocial 0.9
 
Building Apps with MySpace SDKs
Building Apps with MySpace SDKsBuilding Apps with MySpace SDKs
Building Apps with MySpace SDKs
 
No A's In Fremont
No A's In FremontNo A's In Fremont
No A's In Fremont
 
A Peek Into GE's Open Innovation Approach
A Peek Into GE's Open Innovation ApproachA Peek Into GE's Open Innovation Approach
A Peek Into GE's Open Innovation Approach
 
The Real Cost Of Stadium
The Real Cost Of StadiumThe Real Cost Of Stadium
The Real Cost Of Stadium
 
nisource annual reports 2005
nisource annual reports 2005nisource annual reports 2005
nisource annual reports 2005
 

Ähnlich wie OSML and OpenSocial 0.9

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
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 

Ähnlich wie OSML and OpenSocial 0.9 (20)

Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocial
 
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
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Orbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case StudyOrbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case Study
 
Wt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technologyWt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technology
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
Real-World AJAX with ASP.NET
Real-World AJAX with ASP.NETReal-World AJAX with ASP.NET
Real-World AJAX with ASP.NET
 
The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh Events
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

OSML and OpenSocial 0.9

  • 2. Introductions Chris Cole Architect with MySpace Open Platform co-author of upcoming book “Building OpenSocial Apps for MySpace” Max Newbould Development Manager – OpenSocial Container 2
  • 3. OpenSocial 0.9 and OSML • Recently ratified by spec group • OSML & DataPipeline • oslite Javascript API 3
  • 4. OpenSocial Markup Language (OSML) • Tag-based language for building apps • Utilizes GadgetXML format • Provides full container API support 4
  • 5. OSML – Custom Tag Templates • Declare and use custom tags for common UI elements <script type=quot;text/os-templatequot; tag=quot;my:ParamBorderTagquot;> <div style=quot;margin:20px;border:12px solid ${My.borderColor};padding:20px;width:220px;quot;> This tag uses borderColor: ${My.borderColor} </div> </script> ... <my:ParamBorderTag> <borderColor>Green</borderColor> </my:ParamBorderTag> 5
  • 6. OSML – Internationalization Support <Locale> <MessageBundle> <Msg name=quot;helloworldquot;>Hello World</Msg> <Msg name=quot;congratsquot;>Congratulations on using OSML</Msg> </MessageBundle> </Locale> <Locale lang=quot;dequot;> <h1>${Msg.helloworld}</h1> <MessageBundle> <Msg name=quot;helloworldquot;>Hallo Welt</Msg> <Msg name=quot;congratsquot;>Herzlichen Glückwunsch zur Verwendung OSML</Msg> </MessageBundle> </Locale> <Locale lang=quot;jaquot;> <MessageBundle> <Msg name=quot;helloworldquot;> </Msg> <Msg name=quot;congratsquot;> OSML </Msg> </MessageBundle> </Locale>
  • 7. Data Pipeline • Declare and use data simply – No need for 20+ lines of Javascript & callback functions <os:ViewerRequest key=“Viewer” > ... <h1>Hello, ${Viewer.Name}</h1> 7
  • 8. Data Pipeline • Not old-style data call function requestMe() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest( opensocial.DataRequest.PersonId.VIEWER), quot;viewerquot;); req.send(handleRequestMe); }; function handleRequestMe(data) { var viewer = data.get(quot;viewerquot;); if (viewer.hadError()) { / /Handle error using viewer.getError()... return; } //No error. Do something with viewer.getData()... }
  • 9. HTML Fragment Rendering • Simple <os:Get href=quot;http://example.org/stuff/${vwr.id}quot; /> • Rich <myspace:RenderRequest src=quot;http://example.org/stuff/showitquot; method=quot;postquot; target=quot;xDivquot; > <id>${vwr.id}</id> <name>${vwr.name}</name> <stuffCount>4</stuffCount> </myspace:RenderRequest> • Full content <Content href=quot;http://example.org/stuff> <os:ViewerRequest key=quot;vwrquot; fields=quot;id,namequot; /> </Content> 9
  • 10. oslite API • Shortened and cleaned Javascript API • Provides 1:1 mapping between JS calls and REST calls var batch = osapi.newBatch(); osapi.people.getViewer({fields: ['name', 'birthday']}, batch('viewer')); osapi.people.get({userId: '@owner', groupId: '@friends', batch('ownerFriends')); batch.execute(function(result) { alert('Your name is ' + result.viewer.name + '!'); alert('You have ' + result.ownerFriends.length + ' friends!'); }); 10
  • 11. Demo 11