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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
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
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

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