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

PDF
Magento2&amp;java script (2)
PDF
Spring java config
PPTX
Code Igniter 2
PPTX
19. CodeIgniter imagini in mysql
PPT
Lecture8 php page control by okello erick
PDF
Drupal 8: Fields reborn
DOC
Advanced Hibernate Notes
PPTX
New Authorization library for Joomla 4 (proposal)
Magento2&amp;java script (2)
Spring java config
Code Igniter 2
19. CodeIgniter imagini in mysql
Lecture8 php page control by okello erick
Drupal 8: Fields reborn
Advanced Hibernate Notes
New Authorization library for Joomla 4 (proposal)

What's hot (18)

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

Similar to Nuxeo - OpenSocial (20)

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

Recently uploaded (20)

PDF
Architecture types and enterprise applications.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Unlock new opportunities with location data.pdf
PDF
STKI Israel Market Study 2025 version august
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Five Habits of High-Impact Board Members
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
The various Industrial Revolutions .pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPT
What is a Computer? Input Devices /output devices
Architecture types and enterprise applications.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
Unlock new opportunities with location data.pdf
STKI Israel Market Study 2025 version august
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx
1 - Historical Antecedents, Social Consideration.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Group 1 Presentation -Planning and Decision Making .pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Five Habits of High-Impact Board Members
Hindi spoken digit analysis for native and non-native speakers
Chapter 5: Probability Theory and Statistics
Final SEM Unit 1 for mit wpu at pune .pptx
The various Industrial Revolutions .pptx
A novel scalable deep ensemble learning framework for big data classification...
Module 1.ppt Iot fundamentals and Architecture
What is a Computer? Input Devices /output devices

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