SlideShare a Scribd company logo
cq5 and Sling
overview
 Bertrand Delacrétaz
 Senior Developer, R&D, Day Software, www.day.com
 Apache Software Foundation Member
 http://grep.codeconsult.ch - twitter: @bdelacretaz - bdelacretaz@apache.org
 Logica Geneva monthly developer meeting, February 2010
 slides revision: 2010-02-25


CQ5 and Sling                                                                  1
overview                                                                       Bertrand Delacrétaz
Basel, Switzerland headquarters
           (~80 people, ~150 worldwide)
           Munich        “Day allows us to quickly


          London
                         and reliably deliver content
                         to our entire McFamily,                      content-centric
                         helping us to be flexible and
                         drive new opportunities.”                      products
           Newport
           Beach, CA     Steve Wilson, Senior
                         Director of Web
          Toronto
                         Communications,
                         McDonald’s                                       (everything is content)

www.day.com
                                              Swiss open source
                                            award / business / 2008

note the 3-letter domain name:
we’ve been doing this for a while...
                                                        Strong ties to the Apache Software Foundation
2001

2001



        2009

                                                            Roy T. Fielding and David Nuescheler,
Survived tough times (SWX:DAYN)                                    “Mr. REST” and “Mr. JCR”
What              is cq5?
content management system
   no database? No SQL? everything is content
                                                  fun to use
    digital assets              OSGi applications framework
            JCR repository
                               Marketing dept. loves IT dept.?
CQ5 and Sling
overview
cq5: welcome
cq5: content tree
cq5: page editing
cq5: visual workflow
cq5: multivariate testing

                                  User provides 3 (N) possible
                                  banner designs (drag & drop)




     cq5 provides statistics on
     impressions and click-
     through rates -> helps
     selecting the best banner.
cq5: zero-install IDE
content
                structures
     no database? No SQL?    everything is content


            JCR repository
CQ5 and Sling
overview
geometrixx page content
              /content
               /geometrixx
                /en
                 /company
                   /jcr:content
                     /par
                      /title
blog design content




    /etc/designs/blog/kubrick/jcr:content
code content!


                /libs
                  /cq
                    /code
                     /install
                       /xyz.jar
dynamic java modules (OSGi)
Apache
       Sling
Apache Software Foundation       open source
     script == servlet           open development
Applications layer for JCR repositories   OSGi-based
HTTP                                    debugger       filesystem     browser



       content administration UI


     standard        custom servlets                           WebDAV      Sling OSGi
     servlets        and components                             server       console
                                                javascript
                                                   JSP
  resource      servlet/script     JSR 223        Ruby
 resolution      resolution        scripting     Velocity
                                                  etc..
                                                                 Apache Sling framework

                                   OSGi framework
                                    (Apache Felix)
                                       JSR-170 API

                                          JCR
                                        content
CQ5/Sling                              repository
                                                           storage
                                                         components
architecture
HTTP                                    debugger       filesystem   browser



       content administration UI


     standard        custom servlets                           WebDAV     Sling OSGi
     servlets        and components                             server      console
                                                javascript
                                                   JSP
  resource      servlet/script     JSR 223        Ruby
 resolution      resolution        scripting     Velocity
                                                  etc..


                                   OSGi framework
                                    (Apache Felix)
                                       JSR-170 API


                                          JCR

open source?
                                       repository          storage
                                                         components
you bet!
OSGi?
  OSGi is great for modularity

  Fosters better structured code

  Dynamic services and plugins

  Tooling needs to improve, but usable

  OSGi skills? - OSGi way of thinking is new...

  Asynchronous startup can be problematic if
  using declarative services

CQ5 and Sling
overview                                          Bertrand Delacrétaz
Sling blog
46 lines of code
Sling POST servlet
  # POST to Sling
  curl -F title=hi http://localhost:8888/foo
  -> 200 OK

  # GET created node in json format
  curl http://localhost:8888/foo.tidy.json
  {
    "jcr:primaryType": "nt:unstructured",
    "title": "hi"
  }
                               POST ters se t
                                       e
                                param operties
                                 node pr

CQ5 and Sling                              20
overview                                    Bertrand Delacrétaz
blog step 1: create content
      <form method="POST">
         Title:
         <input type="text" name="title"/>
         Text:
         <textarea name="text"></textarea>
         <input type="submit" value="save"/>
         <input type="hidden"
                name=":redirect" value="*"/>
      </form>
                                     Form e fields
                                      dri ve th model
CQ5 and Sling
                                        ontent
                                                        21
overview                               c                 Bertrand Delacrétaz
blog step 2: retrieve content
 <script src="/system/sling.js"></script>
 <form method="POST">
   ...(as in step 1)...
 </form>

 <!-- set form fields to current node values -->
 <script>Sling.wizard();</script>




                                  t CRU(D)
                           Instan
CQ5 and Sling                                22
overview                                      Bertrand Delacrétaz
blog step 3: navigation
   <ul>
     <li>
        <a href="/content/blog/*">[Create post]</a>
     </li>
     <script>
        var posts = Sling.getContent("/content/blog", 2);
        for(var post in posts) {
           document.write(
             "<li><a href=’” + post + "'>"
             + posts[post].title + "</a></li>");
         }
     </script>
   </ul>


CQ5 and Sling                                      23
overview                                            Bertrand Delacrétaz
we’ve got a blog!
html form + Sling wizard() + Sling.getContent()
more info?
www.day.com/cq5
www.day.com/crx (free download)
sling.apache.org
jackrabbit.apache.org
felix.apache.org
slideshare.net/bdelacretaz
CQ5 and Sling
overview                   Bertrand Delacrétaz
This slide deck is licensed under the
Creative Commons Attribution-Noncommercial-Share Alike 3 license.
            Copyright (C) 2010, Bertrand Delacretaz

More Related Content

PDF
Frontend Application Architecture, Patterns, and Workflows
PDF
RESTful Web Applications with Apache Sling
PPT
Build Your Own CMS with Apache Sling
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
PPTX
Introduction to Sightly and Sling Models
PDF
JCR and Sling Quick Dive
PPTX
Building single page applications
PDF
OSGi and Spring Data for simple (Web) Application Development
Frontend Application Architecture, Patterns, and Workflows
RESTful Web Applications with Apache Sling
Build Your Own CMS with Apache Sling
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Introduction to Sightly and Sling Models
JCR and Sling Quick Dive
Building single page applications
OSGi and Spring Data for simple (Web) Application Development

What's hot (20)

PDF
GitBucket: The perfect Github clone by Scala
PDF
Choosing the best JavaScript framework/library/toolkit
PDF
Building Real World Application with Azure
PDF
RESTFul development with Apache sling
KEY
Flash And Dom
PDF
Developing realtime apps with Drupal and NodeJS
PDF
Here Be Dragons - Debugging WordPress
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
PDF
Bringing Interactivity to Your Drupal Site with Node.js Integration
PDF
Modular JavaScript in an OSGi World - S Mak
PDF
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
PPTX
Building and Managing Projects with Maven
PDF
Moving from PHP to a nodejs full stack CMS
PPTX
jQuery Conference 2012 keynote
PDF
Building an E-commerce website in MEAN stack
PPTX
Play! Framework for JavaEE Developers
PDF
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
KEY
Single Page Applications - Desert Code Camp 2012
PDF
Mean Stack - An Overview
PDF
The MEAN Stack
GitBucket: The perfect Github clone by Scala
Choosing the best JavaScript framework/library/toolkit
Building Real World Application with Azure
RESTFul development with Apache sling
Flash And Dom
Developing realtime apps with Drupal and NodeJS
Here Be Dragons - Debugging WordPress
Using Web Standards to create Interactive Data Visualizations for the Web
Bringing Interactivity to Your Drupal Site with Node.js Integration
Modular JavaScript in an OSGi World - S Mak
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Building and Managing Projects with Maven
Moving from PHP to a nodejs full stack CMS
jQuery Conference 2012 keynote
Building an E-commerce website in MEAN stack
Play! Framework for JavaEE Developers
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
Single Page Applications - Desert Code Camp 2012
Mean Stack - An Overview
The MEAN Stack
Ad

Viewers also liked (9)

PDF
Introduction to CQ5
PPTX
Adobe CQ5 for Developers - Introduction
PDF
Adobe AEM CQ5 - Developer Introduction
PDF
Adobe Experience Manager 6 Certificaton
PDF
SocialAnalyticsとCQ5がスゴイ
PPTX
Rapid RESTful Web Applications with Apache Sling and Jackrabbit
PDF
Adobe Analytics 2015: 異常値の原因を自動検出&CRMデータ統合
PDF
Apache Sling : JCR, OSGi, Scripting and REST
PDF
AEM 6.1 User Interface Customization
Introduction to CQ5
Adobe CQ5 for Developers - Introduction
Adobe AEM CQ5 - Developer Introduction
Adobe Experience Manager 6 Certificaton
SocialAnalyticsとCQ5がスゴイ
Rapid RESTful Web Applications with Apache Sling and Jackrabbit
Adobe Analytics 2015: 異常値の原因を自動検出&CRMデータ統合
Apache Sling : JCR, OSGi, Scripting and REST
AEM 6.1 User Interface Customization
Ad

Similar to CQ5 and Sling overview (20)

PDF
Why we (Day) open source most of our code
PPTX
StrongLoop Overview
PPTX
Java @ Cloud - Setor Público SP
PDF
End-to-end HTML5 APIs - The Geek Gathering 2013
PPTX
Building assets on the fly with Node.js
ODP
Dynamic Languages Web Frameworks Indicthreads 2009
PDF
Java 23 and Beyond - A Roadmap Of Innovations
PDF
Intro to Sails.js
PDF
Open Innovation means Open Source
PDF
Introduction and hacking OpenStack, Pycon India
PDF
Make easier Integration of your services with Fuse Solutions - RedHat 2013
PDF
IBM Think Session 8598 Domino and JavaScript Development MasterClass
PPTX
Liferay (DXP) 7 Tech Meetup for Developers
PDF
Building a modern SaaS in 2020
ODP
Knolx session
PPTX
The next step from Microsoft - Vnext (Srdjan Poznic)
PDF
Cloud standards interoperability: status update on OCCI and CDMI implementations
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
PDF
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
PDF
(2018) Webpack Encore - Asset Management for the rest of us
Why we (Day) open source most of our code
StrongLoop Overview
Java @ Cloud - Setor Público SP
End-to-end HTML5 APIs - The Geek Gathering 2013
Building assets on the fly with Node.js
Dynamic Languages Web Frameworks Indicthreads 2009
Java 23 and Beyond - A Roadmap Of Innovations
Intro to Sails.js
Open Innovation means Open Source
Introduction and hacking OpenStack, Pycon India
Make easier Integration of your services with Fuse Solutions - RedHat 2013
IBM Think Session 8598 Domino and JavaScript Development MasterClass
Liferay (DXP) 7 Tech Meetup for Developers
Building a modern SaaS in 2020
Knolx session
The next step from Microsoft - Vnext (Srdjan Poznic)
Cloud standards interoperability: status update on OCCI and CDMI implementations
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
(2018) Webpack Encore - Asset Management for the rest of us

More from Bertrand Delacretaz (20)

PDF
VanillaJS & the Web Platform, a match made in heaven?
PDF
Surviving large online communities with conciseness and clarity
PDF
Repoinit: a mini-language for content repository initialization
PDF
The Moving House Model, adhocracy and remote collaboration
PDF
GraphQL in Apache Sling - but isn't it the opposite of REST?
PDF
Open Source Changes the World!
PDF
How to convince your left brain (or manager) to follow the Open Source path t...
PDF
L'Open Source change le Monde - BlendWebMix 2019
PDF
Shared Neurons - the Secret Sauce of Open Source communities?
PDF
Sling and Serverless, Best Friends Forever?
PDF
Serverless - introduction et perspectives concrètes
PDF
State of the Feather - ApacheCon North America 2018
PDF
Karate, the black belt of HTTP API testing?
PDF
Open Source at Scale: the Apache Software Foundation (2018)
PDF
They don't understand me! Tales from the multi-cultural trenches
PDF
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
PDF
Project and Community Services the Apache Way
PDF
La Fondation Apache - keynote au Paris Open Source Summit 2017
PDF
Asynchronous Decision Making - FOSS Backstage 2017
PDF
Building an Apache Sling Rendering Farm
VanillaJS & the Web Platform, a match made in heaven?
Surviving large online communities with conciseness and clarity
Repoinit: a mini-language for content repository initialization
The Moving House Model, adhocracy and remote collaboration
GraphQL in Apache Sling - but isn't it the opposite of REST?
Open Source Changes the World!
How to convince your left brain (or manager) to follow the Open Source path t...
L'Open Source change le Monde - BlendWebMix 2019
Shared Neurons - the Secret Sauce of Open Source communities?
Sling and Serverless, Best Friends Forever?
Serverless - introduction et perspectives concrètes
State of the Feather - ApacheCon North America 2018
Karate, the black belt of HTTP API testing?
Open Source at Scale: the Apache Software Foundation (2018)
They don't understand me! Tales from the multi-cultural trenches
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Project and Community Services the Apache Way
La Fondation Apache - keynote au Paris Open Source Summit 2017
Asynchronous Decision Making - FOSS Backstage 2017
Building an Apache Sling Rendering Farm

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
Cloud computing and distributed systems.
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced Soft Computing BINUS July 2025.pdf
Cloud computing and distributed systems.
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
GamePlan Trading System Review: Professional Trader's Honest Take
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?

CQ5 and Sling overview

  • 1. cq5 and Sling overview Bertrand Delacrétaz Senior Developer, R&D, Day Software, www.day.com Apache Software Foundation Member http://grep.codeconsult.ch - twitter: @bdelacretaz - [email protected] Logica Geneva monthly developer meeting, February 2010 slides revision: 2010-02-25 CQ5 and Sling 1 overview Bertrand Delacrétaz
  • 2. Basel, Switzerland headquarters (~80 people, ~150 worldwide) Munich “Day allows us to quickly London and reliably deliver content to our entire McFamily, content-centric helping us to be flexible and drive new opportunities.” products Newport Beach, CA Steve Wilson, Senior Director of Web Toronto Communications, McDonald’s (everything is content) www.day.com Swiss open source award / business / 2008 note the 3-letter domain name: we’ve been doing this for a while... Strong ties to the Apache Software Foundation 2001 2001 2009 Roy T. Fielding and David Nuescheler, Survived tough times (SWX:DAYN) “Mr. REST” and “Mr. JCR”
  • 3. What is cq5? content management system no database? No SQL? everything is content fun to use digital assets OSGi applications framework JCR repository Marketing dept. loves IT dept.? CQ5 and Sling overview
  • 8. cq5: multivariate testing User provides 3 (N) possible banner designs (drag & drop) cq5 provides statistics on impressions and click- through rates -> helps selecting the best banner.
  • 10. content structures no database? No SQL? everything is content JCR repository CQ5 and Sling overview
  • 11. geometrixx page content /content /geometrixx /en /company /jcr:content /par /title
  • 12. blog design content /etc/designs/blog/kubrick/jcr:content
  • 13. code content! /libs /cq /code /install /xyz.jar
  • 15. Apache Sling Apache Software Foundation open source script == servlet open development Applications layer for JCR repositories OSGi-based
  • 16. HTTP debugger filesystem browser content administration UI standard custom servlets WebDAV Sling OSGi servlets and components server console javascript JSP resource servlet/script JSR 223 Ruby resolution resolution scripting Velocity etc.. Apache Sling framework OSGi framework (Apache Felix) JSR-170 API JCR content CQ5/Sling repository storage components architecture
  • 17. HTTP debugger filesystem browser content administration UI standard custom servlets WebDAV Sling OSGi servlets and components server console javascript JSP resource servlet/script JSR 223 Ruby resolution resolution scripting Velocity etc.. OSGi framework (Apache Felix) JSR-170 API JCR open source? repository storage components you bet!
  • 18. OSGi? OSGi is great for modularity Fosters better structured code Dynamic services and plugins Tooling needs to improve, but usable OSGi skills? - OSGi way of thinking is new... Asynchronous startup can be problematic if using declarative services CQ5 and Sling overview Bertrand Delacrétaz
  • 20. Sling POST servlet # POST to Sling curl -F title=hi http://localhost:8888/foo -> 200 OK # GET created node in json format curl http://localhost:8888/foo.tidy.json { "jcr:primaryType": "nt:unstructured", "title": "hi" } POST ters se t e param operties node pr CQ5 and Sling 20 overview Bertrand Delacrétaz
  • 21. blog step 1: create content <form method="POST"> Title: <input type="text" name="title"/> Text: <textarea name="text"></textarea> <input type="submit" value="save"/> <input type="hidden" name=":redirect" value="*"/> </form> Form e fields dri ve th model CQ5 and Sling ontent 21 overview c Bertrand Delacrétaz
  • 22. blog step 2: retrieve content <script src="/system/sling.js"></script> <form method="POST"> ...(as in step 1)... </form> <!-- set form fields to current node values --> <script>Sling.wizard();</script> t CRU(D) Instan CQ5 and Sling 22 overview Bertrand Delacrétaz
  • 23. blog step 3: navigation <ul> <li> <a href="/content/blog/*">[Create post]</a> </li> <script> var posts = Sling.getContent("/content/blog", 2); for(var post in posts) { document.write( "<li><a href=’” + post + "'>" + posts[post].title + "</a></li>"); } </script> </ul> CQ5 and Sling 23 overview Bertrand Delacrétaz
  • 24. we’ve got a blog! html form + Sling wizard() + Sling.getContent()
  • 25. more info? www.day.com/cq5 www.day.com/crx (free download) sling.apache.org jackrabbit.apache.org felix.apache.org slideshare.net/bdelacretaz CQ5 and Sling overview Bertrand Delacrétaz
  • 26. This slide deck is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3 license. Copyright (C) 2010, Bertrand Delacretaz