SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR & Sling quick dive
Paolo Mottadelli | Senior Sales Engineer
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Background
■ The WWW design approach:
■ Single, simple standardize interface
■ Independent from storage/creation
■ Trascends the complexity
■ Same design principles for application development:
■ Commitment to standardization
■ Simple, generic, Content-Centric interface
2
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Content-centric vs Control-centric interfaces
■ Content-centric interfaces principles:
■ Uniform identifiers
■ Standard methods
■ Extensible representation types
■ Simplified application integration (much less interfaces)
■ Content Repository API = Uniform interface
3
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Content Repository
■ A Content Repository supports:
■ Diverse data:
■ small & large, structured & unstructured, binary, metadata & relationships
■ Services:
■ access control, locking, versioning, transactions, observation
■ The Java Content Repository provides:
■ Abstraction of data storage
■ Generalized content services
■ Separation of real storage from application interactions
■ Standard API
4
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR
■ The JCR specification defines an abstract model and a Java
API for data storage and related services commonly used by
content-oriented applications.
■ Target: any application that must handle both unstructured digital assets and
structured or semi-structured information.
5
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR: The Repository Model
■ Workspaces
■ Hierarchy of nodes
■ Properties associated to a node
■ Node types define constraints
(properties and child nodes)
6
Repository
Workspace Workspace Workspace
[root] [root] [root]
jcr:title = ‘Hello World’
jcr:lastModifiedBy = ‘admin’
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JSON representation of a node
7
http://localhost:7402/content/firststeps.infinity.json
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR code sample
Repository repository = new TransientRepository();
Session session = repository.login(new SimpleCredentials("username", "password".toCharArray()));
// Store content
Node hello = root.addNode("hello");
Node world = hello.addNode("world");
world.setProperty("message", "Hello, World!");
session.save();
// Retrieve content
Node node = root.getNode("hello/world");
System.out.println(node.getPath());
System.out.println(node.getProperty("message").getString());
// Remove content
root.getNode("hello").remove();
session.save();
8
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR: Repository Functionalities
■ Level 1
■ Login
■ Read Nodes & properties
■ XML export
■ XPath queries
■ Node types discovery
■ Namespaces remapping
9
■ Level 2
■ Write nodes & properties
■ XML Import
■ Assign a node types to nodes
■ Change namespace registry
■ Optional
■ Locking
■ Transactions
■ Versioning
■ SQL search
■ Observation
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR: Observation
■ Observation enables an application to receive notification of
persistence changes in the workspace. Base for BPM.
■ NODE_ADDED
■ NODE_MOVED
■ NODE_REMOVED
■ PROPERTY_ADDED
■ PROPERTY_REMOVED
■ PROPERTY_CHANGED
■ Can be asynchronous or journaled
10
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR: Content Modelling
■ 2 use cases:
■ Structured content (e.g. file storage)
■ Needs definition of content models;
■ Needs a stable structure;
■ nt:resource
■ Unstructured content
■ Any properties and child nodes allowed
■ nt:unstructured
11
[nt:resource] > mix:mimeType, mix:lastModified
primaryitem jcr:data
- jcr:data (BINARY) mandatory
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR: node types & mixin types
■ predefined node types:
■ nt:unstructured
■ nt:file
■ nt:folder
■ nt:resource represents the actual content of a file.
■ nt:version
■ mixin types provide extra characteristics to the node:
■ mix:versionable: allows a node to support versioning
■ mix:lockable: enables locking capabilities
■ mix:referenceable: provides an auto-created jcr:uuid property
12
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JCR Ecosystem
■ Open Standard
■ Java Community Process (http://jcp.org)
■ Sustainability
■ Reference Implementation & TCK
■ Apache infrastructure
■ license, workspace, information
■ Community
■ open review, testing & collaboration
■ Open adoption
13
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sling
■ OSGI-based scriptable application layer on top of JCR
■
REST based web framework
■ Content-driven, using a JCR content repository
■ Powered by OSGi
■ Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.)
■ Apache Open Source project
14
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Sling style
■ If you happen to hear this sentence:
■ “Sling is not a web applications framework, it’s a web framework.”
■ It means:
■ Sling is built in a way that embraces the web.
■ Sling design is based on the principles of the WWW.
■ Sling processes HTTP requests in a RESTful way.
15
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CRX Architecture
16
OSGIframework (felix)
JCRrepository (jackrabbit)
JCR api
Applicationframework (sling)
HTTP
‣ manages bundles as app components
‣ provides system services to bundles
‣ stores the content
‣ processes HTTP requests in a RESTful way
specification implementation
architectural style
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sling Architecture
17
felix
jackrabbit
JCR api
HTTP
standard
servlets
custom servlets
and components
resource
resolution
servlet/script
resolution
JSR 223
scripting
javascript
Ruby
WedDAV
server
sling OSGI
console
sling
JSP
Scala
...
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sling examples using cURL
■ Create a node
■ curl -F"sling:resourceType=foo/bar" -F"title=some title" http://admin:admin@localhost:7402/content/mynode
■ Create a node (auto-named)
■ curl -X POST "http://admin:admin@localhost:7402/content/blog"
■ curl -D - -F"title=Adventures with Sling" "http://admin:admin@localhost:7402/content/blog/*"
18
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sling URL decomposition
19
/geometrixx/en/products/triangle.html
/geometrixx/en/products/triangle.teaser.html
defines the resource defines the rendition
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sling URL decomposition
20
/geometrixx/en/products/triangle.teaser.html
sling:resourceType
geometrixx/components/contentpage
©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Where to go from here
■ JSR 283 spec: http://jcp.org/en/jsr/detail?id=283
■ Apache Jackrabbit: http://jackrabbit.apache.org/
■ Apache Sling: http://sling.apache.org/
■ First steps with CRX:
■ http://dev.day.com/docs/en/crx/current/getting_started/first_steps_with_crx.html
21

Mais conteúdo relacionado

Mais procurados

OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingCarsten Ziegeler
 
The Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendThe Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendSpike Brehm
 
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB MongoDB
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhoneAlexandru Badiu
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Max Andersen
 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPressTaylor Lovett
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQNetcetera
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIsSilota Inc.
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reesebuildacloud
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughBradley Holt
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseTaylor Lovett
 
AEM GEMS Session SAML authentication in AEM
AEM GEMS Session SAML authentication in AEMAEM GEMS Session SAML authentication in AEM
AEM GEMS Session SAML authentication in AEMAdobeMarketingCloud
 
You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHPTaylor Lovett
 

Mais procurados (20)

OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
 
The Evolution of Airbnb's Frontend
The Evolution of Airbnb's FrontendThe Evolution of Airbnb's Frontend
The Evolution of Airbnb's Frontend
 
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
 
Fluxible
FluxibleFluxible
Fluxible
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
 
AEM responsive
AEM responsiveAEM responsive
AEM responsive
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIs
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Firebase slide
Firebase slideFirebase slide
Firebase slide
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and Swagger
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start Walkthrough
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
AEM GEMS Session SAML authentication in AEM
AEM GEMS Session SAML authentication in AEMAEM GEMS Session SAML authentication in AEM
AEM GEMS Session SAML authentication in AEM
 
You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
 

Semelhante a JCR and Sling Quick Dive

Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...mfrancis
 
Coding for Desktop and Mobile with HTML5 and Java EE 7
Coding for Desktop and Mobile with HTML5 and Java EE 7Coding for Desktop and Mobile with HTML5 and Java EE 7
Coding for Desktop and Mobile with HTML5 and Java EE 7Petr Jiricka
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfFarHanWasif1
 
JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBossArchitectForum
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content RepositoryGabriel Walt
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiCédric Hüsler
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbaivibrantuser
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Coremohamed elshafey
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Securitychuckbt
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLokesh BS
 
Tighten your Security and Privacy
Tighten your Security and PrivacyTighten your Security and Privacy
Tighten your Security and Privacyconnectwebex
 
Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)湯米吳 Tommy Wu
 
Spring introduction
Spring introductionSpring introduction
Spring introductionManav Prasad
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersBrian Huff
 

Semelhante a JCR and Sling Quick Dive (20)

Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
 
Coding for Desktop and Mobile with HTML5 and Java EE 7
Coding for Desktop and Mobile with HTML5 and Java EE 7Coding for Desktop and Mobile with HTML5 and Java EE 7
Coding for Desktop and Mobile with HTML5 and Java EE 7
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?JBoss Architect Forum London - October 2013 - Platform as a What?
JBoss Architect Forum London - October 2013 - Platform as a What?
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGi
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014
 
Phpyahoo
PhpyahooPhpyahoo
Phpyahoo
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
Spring
SpringSpring
Spring
 
Tighten your Security and Privacy
Tighten your Security and PrivacyTighten your Security and Privacy
Tighten your Security and Privacy
 
Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
 

Mais de Paolo Mottadelli

Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkPaolo Mottadelli
 
AEM (CQ) eCommerce Framework
AEM (CQ) eCommerce FrameworkAEM (CQ) eCommerce Framework
AEM (CQ) eCommerce FrameworkPaolo Mottadelli
 
Adobe AEM Commerce with hybris
Adobe AEM Commerce with hybrisAdobe AEM Commerce with hybris
Adobe AEM Commerce with hybrisPaolo Mottadelli
 
Jira as a Project Management Tool
Jira as a Project Management ToolJira as a Project Management Tool
Jira as a Project Management ToolPaolo Mottadelli
 
Interoperability at Apache Software Foundation
Interoperability at Apache Software FoundationInteroperability at Apache Software Foundation
Interoperability at Apache Software FoundationPaolo Mottadelli
 
Content Analysis with Apache Tika
Content Analysis with Apache TikaContent Analysis with Apache Tika
Content Analysis with Apache TikaPaolo Mottadelli
 
Content analysis for ECM with Apache Tika
Content analysis for ECM with Apache TikaContent analysis for ECM with Apache Tika
Content analysis for ECM with Apache TikaPaolo Mottadelli
 

Mais de Paolo Mottadelli (11)

Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-framework
 
AEM (CQ) eCommerce Framework
AEM (CQ) eCommerce FrameworkAEM (CQ) eCommerce Framework
AEM (CQ) eCommerce Framework
 
Adobe AEM Commerce with hybris
Adobe AEM Commerce with hybrisAdobe AEM Commerce with hybris
Adobe AEM Commerce with hybris
 
Java standards in WCM
Java standards in WCMJava standards in WCM
Java standards in WCM
 
Open Development
Open DevelopmentOpen Development
Open Development
 
Apache Poi Recipes
Apache Poi RecipesApache Poi Recipes
Apache Poi Recipes
 
Jira as a Project Management Tool
Jira as a Project Management ToolJira as a Project Management Tool
Jira as a Project Management Tool
 
Interoperability at Apache Software Foundation
Interoperability at Apache Software FoundationInteroperability at Apache Software Foundation
Interoperability at Apache Software Foundation
 
Content Analysis with Apache Tika
Content Analysis with Apache TikaContent Analysis with Apache Tika
Content Analysis with Apache Tika
 
Content analysis for ECM with Apache Tika
Content analysis for ECM with Apache TikaContent analysis for ECM with Apache Tika
Content analysis for ECM with Apache Tika
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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 BusinessPixlogix Infotech
 
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 DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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...Neo4j
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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...Miguel Araújo
 
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 WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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 productivityPrincipled Technologies
 
[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.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 2024The Digital Insurer
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
[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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 

JCR and Sling Quick Dive

  • 1. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR & Sling quick dive Paolo Mottadelli | Senior Sales Engineer
  • 2. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Background ■ The WWW design approach: ■ Single, simple standardize interface ■ Independent from storage/creation ■ Trascends the complexity ■ Same design principles for application development: ■ Commitment to standardization ■ Simple, generic, Content-Centric interface 2
  • 3. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Content-centric vs Control-centric interfaces ■ Content-centric interfaces principles: ■ Uniform identifiers ■ Standard methods ■ Extensible representation types ■ Simplified application integration (much less interfaces) ■ Content Repository API = Uniform interface 3
  • 4. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Content Repository ■ A Content Repository supports: ■ Diverse data: ■ small & large, structured & unstructured, binary, metadata & relationships ■ Services: ■ access control, locking, versioning, transactions, observation ■ The Java Content Repository provides: ■ Abstraction of data storage ■ Generalized content services ■ Separation of real storage from application interactions ■ Standard API 4
  • 5. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR ■ The JCR specification defines an abstract model and a Java API for data storage and related services commonly used by content-oriented applications. ■ Target: any application that must handle both unstructured digital assets and structured or semi-structured information. 5
  • 6. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR: The Repository Model ■ Workspaces ■ Hierarchy of nodes ■ Properties associated to a node ■ Node types define constraints (properties and child nodes) 6 Repository Workspace Workspace Workspace [root] [root] [root] jcr:title = ‘Hello World’ jcr:lastModifiedBy = ‘admin’
  • 7. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JSON representation of a node 7 http://localhost:7402/content/firststeps.infinity.json
  • 8. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR code sample Repository repository = new TransientRepository(); Session session = repository.login(new SimpleCredentials("username", "password".toCharArray())); // Store content Node hello = root.addNode("hello"); Node world = hello.addNode("world"); world.setProperty("message", "Hello, World!"); session.save(); // Retrieve content Node node = root.getNode("hello/world"); System.out.println(node.getPath()); System.out.println(node.getProperty("message").getString()); // Remove content root.getNode("hello").remove(); session.save(); 8
  • 9. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR: Repository Functionalities ■ Level 1 ■ Login ■ Read Nodes & properties ■ XML export ■ XPath queries ■ Node types discovery ■ Namespaces remapping 9 ■ Level 2 ■ Write nodes & properties ■ XML Import ■ Assign a node types to nodes ■ Change namespace registry ■ Optional ■ Locking ■ Transactions ■ Versioning ■ SQL search ■ Observation
  • 10. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR: Observation ■ Observation enables an application to receive notification of persistence changes in the workspace. Base for BPM. ■ NODE_ADDED ■ NODE_MOVED ■ NODE_REMOVED ■ PROPERTY_ADDED ■ PROPERTY_REMOVED ■ PROPERTY_CHANGED ■ Can be asynchronous or journaled 10
  • 11. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR: Content Modelling ■ 2 use cases: ■ Structured content (e.g. file storage) ■ Needs definition of content models; ■ Needs a stable structure; ■ nt:resource ■ Unstructured content ■ Any properties and child nodes allowed ■ nt:unstructured 11 [nt:resource] > mix:mimeType, mix:lastModified primaryitem jcr:data - jcr:data (BINARY) mandatory
  • 12. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR: node types & mixin types ■ predefined node types: ■ nt:unstructured ■ nt:file ■ nt:folder ■ nt:resource represents the actual content of a file. ■ nt:version ■ mixin types provide extra characteristics to the node: ■ mix:versionable: allows a node to support versioning ■ mix:lockable: enables locking capabilities ■ mix:referenceable: provides an auto-created jcr:uuid property 12
  • 13. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JCR Ecosystem ■ Open Standard ■ Java Community Process (http://jcp.org) ■ Sustainability ■ Reference Implementation & TCK ■ Apache infrastructure ■ license, workspace, information ■ Community ■ open review, testing & collaboration ■ Open adoption 13
  • 14. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sling ■ OSGI-based scriptable application layer on top of JCR ■ REST based web framework ■ Content-driven, using a JCR content repository ■ Powered by OSGi ■ Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.) ■ Apache Open Source project 14
  • 15. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. The Sling style ■ If you happen to hear this sentence: ■ “Sling is not a web applications framework, it’s a web framework.” ■ It means: ■ Sling is built in a way that embraces the web. ■ Sling design is based on the principles of the WWW. ■ Sling processes HTTP requests in a RESTful way. 15
  • 16. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CRX Architecture 16 OSGIframework (felix) JCRrepository (jackrabbit) JCR api Applicationframework (sling) HTTP ‣ manages bundles as app components ‣ provides system services to bundles ‣ stores the content ‣ processes HTTP requests in a RESTful way specification implementation architectural style
  • 17. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sling Architecture 17 felix jackrabbit JCR api HTTP standard servlets custom servlets and components resource resolution servlet/script resolution JSR 223 scripting javascript Ruby WedDAV server sling OSGI console sling JSP Scala ...
  • 18. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sling examples using cURL ■ Create a node ■ curl -F"sling:resourceType=foo/bar" -F"title=some title" http://admin:admin@localhost:7402/content/mynode ■ Create a node (auto-named) ■ curl -X POST "http://admin:admin@localhost:7402/content/blog" ■ curl -D - -F"title=Adventures with Sling" "http://admin:admin@localhost:7402/content/blog/*" 18
  • 19. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sling URL decomposition 19 /geometrixx/en/products/triangle.html /geometrixx/en/products/triangle.teaser.html defines the resource defines the rendition
  • 20. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sling URL decomposition 20 /geometrixx/en/products/triangle.teaser.html sling:resourceType geometrixx/components/contentpage
  • 21. ©2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Where to go from here ■ JSR 283 spec: http://jcp.org/en/jsr/detail?id=283 ■ Apache Jackrabbit: http://jackrabbit.apache.org/ ■ Apache Sling: http://sling.apache.org/ ■ First steps with CRX: ■ http://dev.day.com/docs/en/crx/current/getting_started/first_steps_with_crx.html 21