Successfully reported this slideshow.
A JCR view of the world                                                                1        A JCR view of the world   ...
A JCR view of the world                                                         2        JCR?        Java API for content ...
A JCR view of the world                                                         3        JCR Explorer        Java API for ...
A JCR view of the world                                                                    4        A basic website page  ...
A JCR view of the world                                                                    5        A more realistic page ...
A JCR view of the world                                                                  6        A print queue           ...
A JCR view of the world                                                                    7        Defining virtual hosts ...
A JCR view of the world                                     8        Adobe CQ5s content structure               content   ...
A JCR view of the world                                                                  9        Code and configurations  ...
A JCR view of the world                                                                 10        A workflow model         ...
A JCR view of the world                                                                          11        Workflow instanc...
A JCR view of the world                                                                 12        Ingesting assets        ...
A JCR view of the world                                                                13        Slingbucks sample: orderi...
A JCR view of the world                                                              14        Slingbucks sample: coffee o...
A JCR view of the world                                                 15        Thanks for your attention - Im @bdelacre...
A JCR view of the world                                    16http://localhost:4502/content/bb12.html   1 juin 2012 14:18:09
Upcoming SlideShare
Loading in …5
×

A JCR view of the world: everything is content, everything is a tree!

2,587 views

Published on

Slides of my Berlin Buzzwords 2012 talk: http://berlinbuzzwords.de/sessions/jcr-view-world-everything-content-everything-tree

This talk presents a number of real-world examples of how JCR tree structures are used to store content in heavy-duty content management systems such as Adobe CQ5. We'll describe a number of macro- and micro-tree structures that expose your content in a transparent, evolvable and self-documenting way.

Published in: Technology
  • Be the first to comment

A JCR view of the world: everything is content, everything is a tree!

  1. 1. A JCR view of the world 1 A JCR view of the world a-jcr-folder a-subfolder a-jcr-node propertyA : Nodes have 0..N properties anotherProperty : Another value Everything is content, everything is a tree Bertrand Delacretaz , Senior Developer, Adobe CQ5 team. Apache Software Foundation member and (current) director @bdelacretaz - http://grep.codeconsult.ch Berlin Buzzwords 2012 Powered by Apache Sling (content and rendering) and deck.js (presentation)http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  2. 2. A JCR view of the world 2 JCR? Java API for content repositories (JSR 283) A big tree of nodes and properties. Rich infrastructure for content-based applications.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  3. 3. A JCR view of the world 3 JCR Explorer Java API for content repositories (JSR 283) A big tree of nodes and properties. Rich infrastructure for content-based applications.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  4. 4. A JCR view of the world 4 A basic website page my-page jcr:content jcr:text : This is the text of the page. jcr:title : Title of my page images image_1.jpg image_2.jpg The jcr:content subnode will later act as a container for more complex content structures.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  5. 5. A JCR view of the world 5 A more realistic page /content /my-site/my-page jcr:content jcr:title : Title of my page content -blocks block_1 block_2 images first-image.jpg original .jpg renditions first-image-212x43.jpg first-image-512x83.jpg Uses JCR observation to generate renditions when original image is uploaded. The first-image node is a folder, not just a file. A "micro-tree" of content.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  6. 6. A JCR view of the world 6 A print queue print-queue -example incoming printjob _20120524 _1502 printers canonMP640 done printjob _20120524 _1458 Laserjet 5M rejected printjob _20120524 _1458 Jobs arrive under "incoming" and move under a printers node while they are executed. Remember unix spooling? The "rejected" folder holds jobs that could not be executed.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  7. 7. A JCR view of the world 7 Defining virtual hosts /etc/map/http www_geometrixx _de sling:internalRedirect : /content /geometrixx /de sling:match : www.geometrixx .de/$ www_geometrixx _fr sling:internalRedirect : /content /geometrixx /fr sling:match : www.geometrixx .fr/$ Obvious, transparent...no explanation neededhttp://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  8. 8. A JCR view of the world 8 Adobe CQ5s content structure content geometrixx _en libs wcm/mobile config install apps wcm/mobile install etc virtual-hosts var compiled-scripts Looks familiar?http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  9. 9. A JCR view of the world 9 Code and configurations /apps/my-app install a-bundle .jar sling.get.servlet .jar config o.a.sling.GET.config config.dev o.a.sling.logging .config Slings JCR installer detects and installs bundles, configs and other resources. Scary? Extremely useful - with access controls of course.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  10. 10. A JCR view of the world 10 A workflow model /etc/workflow/models/my-model jcr:description : Please approve ... jcr:title : Content Approval states state_1 preconditions transitions state_2 preconditions transitions Useful JCR features: versioning, access control, observation, ... Semi-generic editor is relatively easy to implement.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  11. 11. A JCR view of the world 11 Workflow instances /var/workflow/instances year2012 month03 day24 wf_45f23c modelPath : /etc/models/approve _content wf_45f23d day25 wf_6534ef year2011 Under /var for distinct access control and lifecycle. Purge old workflows? Delete year2011 folder.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  12. 12. A JCR view of the world 12 Ingesting assets /var/public/incoming some_image.jpg invalid .pdf /var/assets /to-validate image-to-check.jpg /content /assets year2012 month04 validated _image.jpg /var/readonly /rejected other_invalid .pdf Watch the incoming folder using JCR observation Validate , accept and route assets based on content, filenames, etc. Only incoming folder needs to be writable by users.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  13. 13. A JCR view of the world 13 Slingbucks sample: ordering coffee /content /slingbucks private confirmed -orders order_b45627 order_f32136 public order_c325421 coffeeType : espresso cupSize : tall Access control requirements for the private/public folders is obvious. Orders move from public to private, as if passed over the counter (using JCR observation).http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  14. 14. A JCR view of the world 14 Slingbucks sample: coffee options /content /slingbucks coffee -type capuccino espresso cup-type small medium price_factor : 1.4 name_fr : Moyenne name_en : Medium Options are defined in content, updates are dynamically applied. Access control defines who can modify options.http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  15. 15. A JCR view of the world 15 Thanks for your attention - Im @bdelacretazhttp://localhost:4502/content/bb12.html 1 juin 2012 14:18:09
  16. 16. A JCR view of the world 16http://localhost:4502/content/bb12.html 1 juin 2012 14:18:09

×