SlideShare a Scribd company logo
1 of 24
Download to read offline
Nuxeo - OpenSocial
                  Leveraging OpenSocial within
                  the Nuxeo Platorm

                  2011 - Thomas Roger - troger@nuxeo.com - @throger



Open Source ECM
Why OpenSocial?
Common standard used in the enterprise
Easy for developers
 HTTP, XML, HTML, JavaScript and RESTful APIs
Gadgets as reusable blocks




                                                2
GWT Container
Contributed by Leroy Merlin
Apache Shindig + GWT2
Easier to integrate in your application
Lighter & faster!




                                          3
4
GWT Container
Create your own dashboard

Implement a new SpaceProvider
MySpaceProvider extends AbstractSpaceProvider { ... }




                                                        5
GWT Container
Create your own dashboard

Implement a new SpaceProvider
MySpaceProvider extends AbstractSpaceProvider { ... }

Contribute it
<extension
  target="org.nuxeo.ecm.spaces.core.spacemanager.service
  point="spaceProviders">
  <spaceProvider name="mySpaceProvider">
    <class>org.nuxeo.sample.MySpaceProvider</class>
  </spaceProvider>
                                                           6
</extension>
GWT Container
Use it in your page
<nxu:set var="repositoryName"
  value="#{navigationContext.currentServerLocation.name}">
<nxu:set var="spaceProviderName"
  value="mySpaceProvider">
  <ui:decorate
    template="/incl/opensocial_container_template.xhtml">
  </ui:decorate>
</nxu:set>
</nxu:set>


                                                             7
Lightweight Container
Why?
Simple gadget integration
Static positioning in the page
How?
JS container from Apache Shindig
jQuery plugin available
Simple to use!                     8
Lightweight container
Includes
<link href="#{baseURL}css/opensocial/light-container-
gadgets.css">
</link>
<script src="#{baseURL}opensocial/gadgets/js/rpc.js?c=1">
</script>
<script
  src="#{baseURL}js/?scripts=opensocial/cookies.js|
opensocial/util.js|opensocial/gadgets.js|opensocial/
cookiebaseduserprefstore.js|opensocial/
jquery.opensocial.gadget.js">
</script>
                                                            9
Lightweight container
HTML
<div class="polls gadgets-gadget-chrome gadgets">
</div>




                                                    10
Lightweight container
Loading the polls gadget
jQuery('.polls').openSocialGadget({
 baseURL: '#{baseURL}',
 language: '#{localeSelector.language}',
 gadgetDefs: [{
  specUrl: '#{gadgetsBaseURL}/site/gadgets/polls/polls.xml',
  title: '#{messages['label.poll.result']}',
  displayTitleBar: false,
  width: '100%'
 }]
});

                                                               11
12
OAuth
Nuxeo supports OAuth authentication
Connect to third party services supporting
OAuth, like Google Docs


OAuth authentication in gadgets
<ModulePrefs>
  <#include "default-oauth-prefs.ftl"/>
</ModulePrefs>

                                             13
Following the Standard
Most of our gadgets are fully OpenSocial
Work on other OpenSocial containers:
iGoogle, JIRA, ...
Nuxeo can use external gadgets (those
available on iGoogle for instance)



                                           14
15
Gadget Spec
Rendered through Freemarker
Predefined Freemarker templates
JS context injected




                                 16
Automation JS Library
Library to be used in gadgets
Call Nuxeo automation
Handle OAuth authentication
Easy to use!




                                17
Automation JS library
Includes
<script
  src="${specDirectoryUrl}default-automation-request.js">
</script>

...

<#include "default-request-controls.ftl"/>



                                                            18
Automation JS library
Querying documents
var requestParams = {
   operationId: 'Document.PageProvider',
   operationParameters: {
     pageSize: 5,
     query: ‘SELECT * FROM Document’
   operationContext: {},
   operationDocumentProperties: "common,dublincore",
   entityType: 'documents',
   operationCallback: myCallback,
   noEntryLabel: '__MSG_label.gadget.no.document__'
};
doAutomationRequest(requestParams)                     19
Automation JS library
Querying documents
function myCallback(response, params) {
  var docs = response.data.entries;
  ...
}




                                          20
Automation JS library
Easy document listing
<script
   src="${specDirectoryUrl}default-documentlist-display.js">
</script>
...
<#include "default-documentlist-layout.ftl"/>
...
var requestParams = {
   ...
   displayMethod: displayDocumentList,
};
                                                               21
Nuxeo IDE
Gadget templates
Default gadget structure, contribution
Fully OpenSocial
Supports hot reload!




                                         22
Nuxeo IDE
Gadget templates

Standard gadget
OAuth authentication
Internationalization
Automation gadget
Automation JS library
Document listing JS library   23
Thank you!




             24

More Related Content

What's hot

Create a Core Data Observer in 10mins
Create a Core Data Observer in 10minsCreate a Core Data Observer in 10mins
Create a Core Data Observer in 10minszmcartor
 
Data binding в массы!
Data binding в массы!Data binding в массы!
Data binding в массы!Artjoker
 
Solr integration in Magento Enterprise
Solr integration in Magento EnterpriseSolr integration in Magento Enterprise
Solr integration in Magento EnterpriseTobias Zander
 
Core Data with multiple managed object contexts
Core Data with multiple managed object contextsCore Data with multiple managed object contexts
Core Data with multiple managed object contextsMatthew Morey
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppMichele Capra
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩GDG Korea
 
"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita GalkinFwdays
 
Academy PRO: ASP .NET Core
Academy PRO: ASP .NET Core Academy PRO: ASP .NET Core
Academy PRO: ASP .NET Core Binary Studio
 
Migrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan ManaloMigrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan ManaloPromet Source
 
Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8Promet Source
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutionswoutervugt
 
Modularized Persistence - B Zsoldos
Modularized Persistence - B ZsoldosModularized Persistence - B Zsoldos
Modularized Persistence - B Zsoldosmfrancis
 

What's hot (18)

Create a Core Data Observer in 10mins
Create a Core Data Observer in 10minsCreate a Core Data Observer in 10mins
Create a Core Data Observer in 10mins
 
Data binding в массы!
Data binding в массы!Data binding в массы!
Data binding в массы!
 
Hack tutorial
Hack tutorialHack tutorial
Hack tutorial
 
Solr integration in Magento Enterprise
Solr integration in Magento EnterpriseSolr integration in Magento Enterprise
Solr integration in Magento Enterprise
 
Core Data with multiple managed object contexts
Core Data with multiple managed object contextsCore Data with multiple managed object contexts
Core Data with multiple managed object contexts
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 App
 
Recyclerview in action
Recyclerview in action Recyclerview in action
Recyclerview in action
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
 
"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin
 
Inicializacao win7
Inicializacao win7Inicializacao win7
Inicializacao win7
 
Academy PRO: ASP .NET Core
Academy PRO: ASP .NET Core Academy PRO: ASP .NET Core
Academy PRO: ASP .NET Core
 
Diving into php
Diving into phpDiving into php
Diving into php
 
Migrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan ManaloMigrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan Manalo
 
Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
Modularized Persistence - B Zsoldos
Modularized Persistence - B ZsoldosModularized Persistence - B Zsoldos
Modularized Persistence - B Zsoldos
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 

Similar to Nuxeo - OpenSocial

Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WAREFermin Galan
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-finalDavid Lapsley
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...mfrancis
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application DevelopmentChristian Baranowski
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگوrailsbootcamp
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCLFastly
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
Modern Web Technologies
Modern Web TechnologiesModern Web Technologies
Modern Web TechnologiesPerttu Myry
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger Robert-Emmanuel Mayssat
 
Dgeni documentation generator
Dgeni   documentation generatorDgeni   documentation generator
Dgeni documentation generatorPeter Darwin
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Luca Lusso
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015Pushkar Chivate
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
 
Open erp technical_memento_v0.6.3_a4
Open erp technical_memento_v0.6.3_a4Open erp technical_memento_v0.6.3_a4
Open erp technical_memento_v0.6.3_a4openerpwiki
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 

Similar to Nuxeo - OpenSocial (20)

Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application Development
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
Modern Web Technologies
Modern Web TechnologiesModern Web Technologies
Modern Web Technologies
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger
 
Dgeni documentation generator
Dgeni   documentation generatorDgeni   documentation generator
Dgeni documentation generator
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Open erp technical_memento_v0.6.3_a4
Open erp technical_memento_v0.6.3_a4Open erp technical_memento_v0.6.3_a4
Open erp technical_memento_v0.6.3_a4
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 

Recently uploaded

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Nuxeo - OpenSocial

  • 1. Nuxeo - OpenSocial Leveraging OpenSocial within the Nuxeo Platorm 2011 - Thomas Roger - troger@nuxeo.com - @throger Open Source ECM
  • 2. Why OpenSocial? Common standard used in the enterprise Easy for developers HTTP, XML, HTML, JavaScript and RESTful APIs Gadgets as reusable blocks 2
  • 3. GWT Container Contributed by Leroy Merlin Apache Shindig + GWT2 Easier to integrate in your application Lighter & faster! 3
  • 4. 4
  • 5. GWT Container Create your own dashboard Implement a new SpaceProvider MySpaceProvider extends AbstractSpaceProvider { ... } 5
  • 6. GWT Container Create your own dashboard Implement a new SpaceProvider MySpaceProvider extends AbstractSpaceProvider { ... } Contribute it <extension target="org.nuxeo.ecm.spaces.core.spacemanager.service point="spaceProviders"> <spaceProvider name="mySpaceProvider"> <class>org.nuxeo.sample.MySpaceProvider</class> </spaceProvider> 6 </extension>
  • 7. GWT Container Use it in your page <nxu:set var="repositoryName" value="#{navigationContext.currentServerLocation.name}"> <nxu:set var="spaceProviderName" value="mySpaceProvider"> <ui:decorate template="/incl/opensocial_container_template.xhtml"> </ui:decorate> </nxu:set> </nxu:set> 7
  • 8. Lightweight Container Why? Simple gadget integration Static positioning in the page How? JS container from Apache Shindig jQuery plugin available Simple to use! 8
  • 9. Lightweight container Includes <link href="#{baseURL}css/opensocial/light-container- gadgets.css"> </link> <script src="#{baseURL}opensocial/gadgets/js/rpc.js?c=1"> </script> <script src="#{baseURL}js/?scripts=opensocial/cookies.js| opensocial/util.js|opensocial/gadgets.js|opensocial/ cookiebaseduserprefstore.js|opensocial/ jquery.opensocial.gadget.js"> </script> 9
  • 10. Lightweight container HTML <div class="polls gadgets-gadget-chrome gadgets"> </div> 10
  • 11. Lightweight container Loading the polls gadget jQuery('.polls').openSocialGadget({ baseURL: '#{baseURL}', language: '#{localeSelector.language}', gadgetDefs: [{ specUrl: '#{gadgetsBaseURL}/site/gadgets/polls/polls.xml', title: '#{messages['label.poll.result']}', displayTitleBar: false, width: '100%' }] }); 11
  • 12. 12
  • 13. OAuth Nuxeo supports OAuth authentication Connect to third party services supporting OAuth, like Google Docs OAuth authentication in gadgets <ModulePrefs> <#include "default-oauth-prefs.ftl"/> </ModulePrefs> 13
  • 14. Following the Standard Most of our gadgets are fully OpenSocial Work on other OpenSocial containers: iGoogle, JIRA, ... Nuxeo can use external gadgets (those available on iGoogle for instance) 14
  • 15. 15
  • 16. Gadget Spec Rendered through Freemarker Predefined Freemarker templates JS context injected 16
  • 17. Automation JS Library Library to be used in gadgets Call Nuxeo automation Handle OAuth authentication Easy to use! 17
  • 18. Automation JS library Includes <script src="${specDirectoryUrl}default-automation-request.js"> </script> ... <#include "default-request-controls.ftl"/> 18
  • 19. Automation JS library Querying documents var requestParams = { operationId: 'Document.PageProvider', operationParameters: { pageSize: 5, query: ‘SELECT * FROM Document’ operationContext: {}, operationDocumentProperties: "common,dublincore", entityType: 'documents', operationCallback: myCallback, noEntryLabel: '__MSG_label.gadget.no.document__' }; doAutomationRequest(requestParams) 19
  • 20. Automation JS library Querying documents function myCallback(response, params) { var docs = response.data.entries; ... } 20
  • 21. Automation JS library Easy document listing <script src="${specDirectoryUrl}default-documentlist-display.js"> </script> ... <#include "default-documentlist-layout.ftl"/> ... var requestParams = { ... displayMethod: displayDocumentList, }; 21
  • 22. Nuxeo IDE Gadget templates Default gadget structure, contribution Fully OpenSocial Supports hot reload! 22
  • 23. Nuxeo IDE Gadget templates Standard gadget OAuth authentication Internationalization Automation gadget Automation JS library Document listing JS library 23