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

  • 539 views
Uploaded on

Slides from my "JCR view of the world" presentation at Berlin Buzzwords 2012, http://2012.berlinbuzzwords.de/sessions/jcr-view-world-everything-content-everything-tree …

Slides from my "JCR view of the world" presentation at Berlin Buzzwords 2012, http://2012.berlinbuzzwords.de/sessions/jcr-view-world-everything-content-everything-tree
See also the video at

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
539
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmla-jcr-nodepropertyA : Nodes have 0..N propertiesanotherProperty : Another valuea-subfoldera-jcr-folderA JCR view of the worldEverything is content, everything is a treeBertrand Delacretaz, Senior Developer, Adobe CQ5 team.Apache Software Foundation member and (current) director@bdelacretaz - http://grep.codeconsult.chBerlin Buzzwords 2012Powered by Apache Sling (content and rendering) and deck.js(presentation)
  • 2. 2A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlJCR?Java API for content repositories (JSR 283)A big tree of nodes and properties.Rich infrastructure for content-based applications.
  • 3. 3A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlJCR ExplorerJava API for content repositories (JSR 283)A big tree of nodes and properties.Rich infrastructure for content-based applications.
  • 4. 4A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlimage_1.jpgimage_2.jpgimagesjcr:contentjcr:text : This is the text of the page.jcr:title : Title of my pagemy-pageA basic website pageThe jcr:content subnode will later act as a container for morecomplex content structures.
  • 5. 5A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlblock_1block_2content-blocksoriginal.jpgfirst-image-212x43.jpgfirst-image-512x83.jpgrenditionsfirst-image.jpgimagesjcr:contentjcr:title : Title of my page/content/my-site/my-pageA more realistic pageUses JCR observation to generate renditions when original image isuploaded.The first-image node is a folder, not just a file. A "micro-tree" ofcontent.
  • 6. 6A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlprintjob_20120524 _1502incomingdoneprintjob_20120524 _1458canonMP640Laserjet5Mprintersprintjob_20120524 _1458rejectedprint-queue-exampleA print queueJobs arrive under "incoming" and move under a printers node whilethey are executed. Remember unix spooling?The "rejected" folder holds jobs that could not be executed.
  • 7. 7A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlwww_geometrixx_desling:internalRedirect : /content/geometrixx/desling:match : www.geometrixx.de/$www_geometrixx_frsling:internalRedirect : /content/geometrixx/frsling:match : www.geometrixx.fr/$/etc/map/httpDefining virtual hostsObvious, transparent...no explanation needed
  • 8. 8A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlgeometrixx_encontentconfiginstallwcm/mobilelibsinstallwcm/mobileappsvirtual-hostsetccompiled-scriptsvarAdobe CQ5s content structureLooks familiar?
  • 9. 9A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmla-bundle.jarsling.get.servlet.jarinstallo.a.sling.GET.configconfigo.a.sling.logging.configconfig.dev/apps/my-appCode and configurationsSlings JCR installer detects and installs bundles, configs and otherresources.Scary? Extremely useful - with access controls of course.
  • 10. 10A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlpreconditionstransitionsstate_1preconditionstransitionsstate_2states/etc/workflow/models/my-modeljcr:description : Please approve...jcr:title : Content ApprovalA workflow modelUseful JCR features: versioning, access control, observation, ...Semi-generic editor is relatively easy to implement.
  • 11. 11A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlwf_45f23cmodelPath : /etc/models/approve_contentwf_45f23dday24wf_6534efday25month03year2012year2011/var/workflow/instancesWorkflow instancesUnder /var for distinct access control and lifecycle.Purge old workflows? Delete year2011 folder.
  • 12. 12A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlsome_image.jpginvalid.pdf/var/public/incomingimage-to-check.jpg/var/assets/to-validatevalidated_image.jpgmonth04year2012/content/assetsother_invalid.pdf/var/readonly/rejectedIngesting assetsWatch the incoming folder using JCR observationValidate , accept and route assets based on content, filenames, etc.Only incoming folder needs to be writable by users.
  • 13. 13A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlorder_b45627order_f32136confirmed-ordersprivateorder_c325421coffeeType : espressocupSize : tallpublic/content/slingbucksSlingbucks sample: ordering coffeeAccess control requirements for the private/public folders is obvious.Orders move from public to private, as if passed over the counter(using JCR observation).
  • 14. 14A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlcapuccinoespressocoffee-typesmallmediumprice_factor : 1.4name_fr : Moyennename_en : Mediumcup-type/content/slingbucksSlingbucks sample: coffee optionsOptions are defined in content, updates are dynamically applied.Access control defines who can modify options.
  • 15. 15A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.htmlThanks for your attention - Im @bdelacretaz
  • 16. 16A JCR view of the world1 juin 2012 14:18:09http://localhost:4502/content/bb12.html