SlideShare a Scribd company logo
1 of 14
Download to read offline
Apache Sling
   Andreas Hartmann
 CTO, BeCompany GmbH
REST

REpresentational State Transfer

Roy T. Fielding‘s dissertation

Not a technology/standard/software

Set of architectural constraints

Optimized for common use-cases of the WWW
(based on experience)
REST in the WWW

HTML docs (representations) = states

Hyperlinks + forms = transitions

          GET /products/lenya

                                /products/lenya
   /products


                                /products/cocoon

     POST /products/cocoon
    title=Apache%20Cocoon
Concerns


Simplicity          Reliability

Visibility          Extensibility

Reusability         Cacheability

Scalability         Efficiency
REST Constraints

Client-Server

Layered transport (firewalls, proxies, …)

Caching

Stateless server

Uniform interface

Code on demand
REST Data Elements

Resource (anything that can be addressed,
independent of a particular point in time)

URIs to identify resources

Resource metadata: source link, alternates, …

Representation = data (byte sequence)

Repr. metadata: media type, last modified, …
Uniform Interface

Representation of resources in one of an
emerging set of standard formats

Uniform resource identification mechanism

Messages are self-descriptive:
representation/resource/control metadata

Intermediaries can transform the messages,
e.g. compressing for optimized transport
Common Violations
Indirect application state:
Addressing and caching issues
  Cookies (server-side state)
  Frames

Incremental processing issues
  Embedding metadata in HTML head
  <img> without @width, @height
  dynamically sized table columns
Apache Sling

Web application framework

JCR for content storage

Process HTTP requests in a RESTful way

Scripts (JSR-233) or Servlets for processing

OSGi for deploying modules at runtime
Application Scenarios



Everything (well, „everything is content“)

WCM, DAM, Wiki, Blog, ERP, …

Especially for content-oriented applications
Sling encourages REST


Thinking in resources (mapped to JCR nodes)

Representation selection (HTML, Atom, PDF,
…) via part of URI

Uniform interface for content handling:
GET + POST + PUT + DELETE
UnRESTful Addressing


     /product .jsp ?id=13423


  URI doesn't address   Not part of URI:
     the resource       not cacheable
Request Processing in Sling
GET /news/today .atom            PUT /news/today ?title=Today



      Resource                         Resource



  sling:resourceType               sling:resourceType

    feed                             feed

             Servlet / Script                 Servlet / Script

           /apps/feed/atom.esp              /apps/feed/PUT.esp
Sling Demo


Start application

Connect via WebDAV

Connect via Eclipse Plug-In

Dojo Tree Example

More Related Content

Viewers also liked (6)

Uma Corrente De Amigos
Uma Corrente De AmigosUma Corrente De Amigos
Uma Corrente De Amigos
 
iMcDo3000
iMcDo3000iMcDo3000
iMcDo3000
 
Mevoyalacama
MevoyalacamaMevoyalacama
Mevoyalacama
 
Be The Change Tel Aviv
Be The Change Tel AvivBe The Change Tel Aviv
Be The Change Tel Aviv
 
Clubmoss2008 Juin
Clubmoss2008 JuinClubmoss2008 Juin
Clubmoss2008 Juin
 
Mytrip
MytripMytrip
Mytrip
 

Similar to Apache Sling

Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
nuwanrg
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
nuwanrg
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
Lucas Jellema
 

Similar to Apache Sling (20)

Sword Bl 0903[1]
Sword Bl 0903[1]Sword Bl 0903[1]
Sword Bl 0903[1]
 
Sword Or2008 Julieallinson
Sword Or2008 JulieallinsonSword Or2008 Julieallinson
Sword Or2008 Julieallinson
 
Woa. Reloaded
Woa. ReloadedWoa. Reloaded
Woa. Reloaded
 
Interoperability Fundamentals: SWORD 2
Interoperability Fundamentals: SWORD 2Interoperability Fundamentals: SWORD 2
Interoperability Fundamentals: SWORD 2
 
SWORD: An Overview
SWORD: An OverviewSWORD: An Overview
SWORD: An Overview
 
Creating Restful Web Services with restish
Creating Restful Web Services with restishCreating Restful Web Services with restish
Creating Restful Web Services with restish
 
Sword Crig 2007 12 06
Sword Crig 2007 12 06Sword Crig 2007 12 06
Sword Crig 2007 12 06
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
MongoDB Evenings DC: Get MEAN and Lean with Docker and KubernetesMongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
 
Introduction to Seam Applications
Introduction to Seam ApplicationsIntroduction to Seam Applications
Introduction to Seam Applications
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
 
Azure: Lessons From The Field
Azure: Lessons From The FieldAzure: Lessons From The Field
Azure: Lessons From The Field
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the future
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
 
What is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna NookellaWhat is WebDAV - uploaded by Murali Krishna Nookella
What is WebDAV - uploaded by Murali Krishna Nookella
 
Windows Azure: Lessons From The Field
Windows Azure: Lessons From The FieldWindows Azure: Lessons From The Field
Windows Azure: Lessons From The Field
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with Dropwizard
 

More from nobby (6)

Augmented Reality with Open Source Software
Augmented Reality with Open Source SoftwareAugmented Reality with Open Source Software
Augmented Reality with Open Source Software
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
OSCOM 4: Managing Beautiful Websites with Cocoon
OSCOM 4: Managing Beautiful Websites with CocoonOSCOM 4: Managing Beautiful Websites with Cocoon
OSCOM 4: Managing Beautiful Websites with Cocoon
 
Lenya and Shibboleth
Lenya and ShibbolethLenya and Shibboleth
Lenya and Shibboleth
 
Creating a Resource Type with Apache Lenya 2.0
Creating a Resource Type with Apache Lenya 2.0Creating a Resource Type with Apache Lenya 2.0
Creating a Resource Type with Apache Lenya 2.0
 
What's New In Apache Lenya 1.4
What's New In Apache Lenya 1.4What's New In Apache Lenya 1.4
What's New In Apache Lenya 1.4
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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?
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Apache Sling

  • 1. Apache Sling Andreas Hartmann CTO, BeCompany GmbH
  • 2. REST REpresentational State Transfer Roy T. Fielding‘s dissertation Not a technology/standard/software Set of architectural constraints Optimized for common use-cases of the WWW (based on experience)
  • 3. REST in the WWW HTML docs (representations) = states Hyperlinks + forms = transitions GET /products/lenya /products/lenya /products /products/cocoon POST /products/cocoon title=Apache%20Cocoon
  • 4. Concerns Simplicity Reliability Visibility Extensibility Reusability Cacheability Scalability Efficiency
  • 5. REST Constraints Client-Server Layered transport (firewalls, proxies, …) Caching Stateless server Uniform interface Code on demand
  • 6. REST Data Elements Resource (anything that can be addressed, independent of a particular point in time) URIs to identify resources Resource metadata: source link, alternates, … Representation = data (byte sequence) Repr. metadata: media type, last modified, …
  • 7. Uniform Interface Representation of resources in one of an emerging set of standard formats Uniform resource identification mechanism Messages are self-descriptive: representation/resource/control metadata Intermediaries can transform the messages, e.g. compressing for optimized transport
  • 8. Common Violations Indirect application state: Addressing and caching issues Cookies (server-side state) Frames Incremental processing issues Embedding metadata in HTML head <img> without @width, @height dynamically sized table columns
  • 9. Apache Sling Web application framework JCR for content storage Process HTTP requests in a RESTful way Scripts (JSR-233) or Servlets for processing OSGi for deploying modules at runtime
  • 10. Application Scenarios Everything (well, „everything is content“) WCM, DAM, Wiki, Blog, ERP, … Especially for content-oriented applications
  • 11. Sling encourages REST Thinking in resources (mapped to JCR nodes) Representation selection (HTML, Atom, PDF, …) via part of URI Uniform interface for content handling: GET + POST + PUT + DELETE
  • 12. UnRESTful Addressing /product .jsp ?id=13423 URI doesn't address Not part of URI: the resource not cacheable
  • 13. Request Processing in Sling GET /news/today .atom PUT /news/today ?title=Today Resource Resource sling:resourceType sling:resourceType feed feed Servlet / Script Servlet / Script /apps/feed/atom.esp /apps/feed/PUT.esp
  • 14. Sling Demo Start application Connect via WebDAV Connect via Eclipse Plug-In Dojo Tree Example