SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
CRX and Sling Best Practices for Web Apps
        Tools, Resources & Scripts




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   2011-Mar-30



Wednesday, 30 March 2011
Outline
   CRX Overview
   Resource Addressing
   Components / Modularization
   Component Inheritance
   Side track: GFX Rendering
   Using File Vault Command Line Tool
   Updating Content
   Q&A

  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   2


Wednesday, 30 March 2011
CRX Terminology
       § CRX Platform
       § CRX JCR Repository

       § CRX Quickstart

       § CRX Welcome Screen

       § CRX Admin Console (legacy)

       § CRX Explorer

       § CRX Package Manager & Package Share

       § OSGi Console (Apache Felix)

       § CQSE Admin (Communique Servlet Engine)

       § CRXDE Lite (vs CRXDE Eclipse)




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   3


Wednesday, 30 March 2011
CRX Open Core Architecture

                                                                               Application Runtime
                      Web Framework: Apache Sling                                          Web/Eclipse IDE     Repository Admin

                         OSGi Runtime: Apache Felix                                        Vault & SVN Tools


                                                                                 JCR Repository
                              JCR: Apache Jackrabbit                                       Search Extensions   Virtual Repository

                                            Search: Lucene                                  GFX Rendering      CIFS/SMB Access

                                       Content Extraction:                                    TAR-based         Shared-nothing
                                        POI, Tika, PDFBox                                     Node-store            Cluster



                    CRX Platform
                                                                                       4
  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.



Wednesday, 30 March 2011
CRX Open Core Architecture

                                                                               Application Runtime
                      Web Framework: Apache Sling                                          Web/Eclipse IDE     Repository Admin

                         OSGi Runtime: Apache Felix                                        Vault & SVN Tools


                                                                                 JCR Repository
                              JCR: Apache Jackrabbit                                       Search Extensions   Virtual Repository

                                            Search: Lucene                                  GFX Rendering      CIFS/SMB Access

                                       Content Extraction:                                    TAR-based         Shared-nothing
                                        POI, Tika, PDFBox                                     Node-store            Cluster


                                                                                                          ...CRX is the
                    CRX Platform                                                                          commercial
                                                                                                            version of
                                                                                                       Jackrabbit + Sling
                                                                                       4
  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.



Wednesday, 30 March 2011
Coding - Let’s Begin
       § Reuse  old OOP example: Shapes
       § Content goes here: /content

       § Scripts go here: /apps/shapes/components




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   5


Wednesday, 30 March 2011
Resource Addressing
   Old School Static HTML
       § h           p://xyz.com/products/12345.html


               e Script Hype (jsp, .net, cgi-bin, ...)
       § h  p://xyz.com/products.jsp?id=12345
       § Script centric



   RESTful / Sling
       § h p://xyz.com/products/12345.html
       § Resource centric


  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   6


Wednesday, 30 March 2011
Resources & Resource Types
       § Resource   hierarchy
       § Each resource has a type

       § Scripts (and Servlets) are resources, too

       § URLs are mapped to resources




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   7


Wednesday, 30 March 2011
URL Decomposition
                                                                               selector               suffix

   GET /content/shape.head.html/markup?simple=true HTTP/1.1
                                           path                                       extension              query parameters



   1. Content resolution: “/content/shape”
   2. Resource type: “sling:resourceType = /apps/shapes/shape”
   3. Script resolution look in /apps/shapes/shape:
      1. “head.html.jsp” or “head.jsp”
      2. “html.jsp” or “shape.jsp”
      3. “GET.jsp”

   for more info google: “sling script resolution”
  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.                      8


Wednesday, 30 March 2011
Coding - Modularize
       § Identifysemantical / reusable blocks
       § use the <sling:include/> tag




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   9


Wednesday, 30 March 2011
Script Resource Inheritance
       § sling:resourceSuperType

       § Scriptresolution traverses the inheritance chain
       § Components = Script resources

       § CQ Components = Script resources++

       § Fallback: DefaultGetServlet / SlingPostServlet




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   10


Wednesday, 30 March 2011
Coding - Create sub types
       § Create new types for rectangle and triangle shapes
       § Only “implement” scripts that differ




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   11


Wednesday, 30 March 2011
Script Like Java Servlets (Java Scriptlets?)
       § Normal   Java classes extend H pServlet
       § Naming follows normal script resolution rules
          e.g: “text.java”, “png.java”, etc.
       § Compiled on demand

       § Example: GFX Rendering




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   12


Wednesday, 30 March 2011
Coding - Let’s add Images
   Graphic Rendering
       § day-commons-gfx    bundle (CQ, but not in CRX 2.2, yet)
       § Simple tools to generate png, jpeg and gif images

       § Multiple layers with alpha blending support

       § Text rendering with in-repository font support




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   13


Wednesday, 30 March 2011
Coding - Let’s use a real IDE
   Using the File Vault command line tool
       § Source                       control like synchronization with JCR repository
            §   check-out les
            §   view changes / differences
            §   check-in les
       § Same  format as CRX Content Packages
       § Setup your IDE to use offline content + libs
            §   Code completion and be er syntax highlighting
       § Hybrid  variant allows tight integration with SCM and
            automated build systems.




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   14


Wednesday, 30 March 2011
Updating Content
   Sling Post Servlet
       § POST  requests to the resources
       § AJAX friendly responses

       § Mapping for CREATE / DELETE / MOVE operations

       § h p://sling.apache.org/site/manipulating-content-the-
          slingpostservlet-servletspost.html




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   15


Wednesday, 30 March 2011
More Information
   Official Sites
       § h p://sling.apache.org/
       § h p://felix.apache.org/

       § h p://dev.day.com/docs/en/crx/current.html

       § h p://jackrabbit.apache.org/



   CRX / Jackrabbit Source Code
       § h p://svn.day.com/repos/crx/branches/2.2/
       § h p://svn.apache.org/repos/asf/jackrabbit/branches/2.2/




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   16


Wednesday, 30 March 2011
More Information
   Visit this sessions wiki page
       § h   ps://zerowing.corp.adobe.com/display/~tripod/
            CRXBestPractices

       § Slidesand recording available
       § Feedback welcome!

       § Vote for future topics




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   17


Wednesday, 30 March 2011
ank you.




  © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.     18


Wednesday, 30 March 2011

Contenu connexe

Tendances

Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsSrdjan Strbanovic
 
Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010Gunnar Wagenknecht
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersSascha Corti
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBayTony Ng
 
Cloud Foundry, Spring and Vaadin
Cloud Foundry, Spring and VaadinCloud Foundry, Spring and Vaadin
Cloud Foundry, Spring and VaadinJoshua Long
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsPetr Jiricka
 
Jug Poitou Charentes - Apache, OSGi and Karaf
Jug Poitou Charentes -  Apache, OSGi and KarafJug Poitou Charentes -  Apache, OSGi and Karaf
Jug Poitou Charentes - Apache, OSGi and KarafGuillaume Nodet
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open SourceBertrand Delacretaz
 
The CakePHP Media Plugin
The CakePHP Media PluginThe CakePHP Media Plugin
The CakePHP Media PluginPierre MARTIN
 
Building Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applicationsBuilding Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applicationsGunnar Wagenknecht
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...Alexandre Morgaut
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityGraham Charters
 
CouchDB, PHPillow & PHP
CouchDB, PHPillow & PHPCouchDB, PHPillow & PHP
CouchDB, PHPillow & PHPGreg Knapp
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Gaetano Giunta
 
CamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityCamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityKenneth Peeples
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentPaul Withers
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development Shean McManus
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesJan S. Rellermeyer
 

Tendances (20)

Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
 
Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 
Cloud Foundry, Spring and Vaadin
Cloud Foundry, Spring and VaadinCloud Foundry, Spring and Vaadin
Cloud Foundry, Spring and Vaadin
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
Jug Poitou Charentes - Apache, OSGi and Karaf
Jug Poitou Charentes -  Apache, OSGi and KarafJug Poitou Charentes -  Apache, OSGi and Karaf
Jug Poitou Charentes - Apache, OSGi and Karaf
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open Source
 
The CakePHP Media Plugin
The CakePHP Media PluginThe CakePHP Media Plugin
The CakePHP Media Plugin
 
Building Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applicationsBuilding Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applications
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is Modularity
 
CouchDB, PHPillow & PHP
CouchDB, PHPillow & PHPCouchDB, PHPillow & PHP
CouchDB, PHPillow & PHP
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
 
CamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF SecurityCamelOne 2013 Karaf A-MQ Camel CXF Security
CamelOne 2013 Karaf A-MQ Camel CXF Security
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 

Similaire à CRX Best practices

Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFrançois Le Droff
 
Building an MLOps Stack for Companies at Reasonable Scale
Building an MLOps Stack for Companies at Reasonable ScaleBuilding an MLOps Stack for Companies at Reasonable Scale
Building an MLOps Stack for Companies at Reasonable ScaleMerelda
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content RepositoryGabriel Walt
 
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)Data processing at the speed of 100 Gbps@Apache Crail (Incubating)
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)DataWorks Summit
 
CM WebClient for CA Plex
CM WebClient for CA PlexCM WebClient for CA Plex
CM WebClient for CA PlexCM First Group
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
CRX 2 Content Application Platform
CRX 2 Content Application PlatformCRX 2 Content Application Platform
CRX 2 Content Application PlatformCédric Hüsler
 
Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2cmcavoy
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventJohn Schneider
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Amazon Web Services
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open SourceBertrand Delacretaz
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Animesh Singh
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seamashishkulkarni
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Nicole Szigeti
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBertrand Delacretaz
 
Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]Alfresco Software
 
ABD315_Serverless ETL with AWS Glue
ABD315_Serverless ETL with AWS GlueABD315_Serverless ETL with AWS Glue
ABD315_Serverless ETL with AWS GlueAmazon Web Services
 

Similaire à CRX Best practices (20)

Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 
Building an MLOps Stack for Companies at Reasonable Scale
Building an MLOps Stack for Companies at Reasonable ScaleBuilding an MLOps Stack for Companies at Reasonable Scale
Building an MLOps Stack for Companies at Reasonable Scale
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)Data processing at the speed of 100 Gbps@Apache Crail (Incubating)
Data processing at the speed of 100 Gbps@Apache Crail (Incubating)
 
CM WebClient for CA Plex
CM WebClient for CA PlexCM WebClient for CA Plex
CM WebClient for CA Plex
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
CRX 2 Content Application Platform
CRX 2 Content Application PlatformCRX 2 Content Application Platform
CRX 2 Content Application Platform
 
Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open Source
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering Farm
 
Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]Switch to alfresco with wasaaiq [compatibility mode]
Switch to alfresco with wasaaiq [compatibility mode]
 
ABD315_Serverless ETL with AWS Glue
ABD315_Serverless ETL with AWS GlueABD315_Serverless ETL with AWS Glue
ABD315_Serverless ETL with AWS Glue
 
CQ5 and Sling overview
CQ5 and Sling overviewCQ5 and Sling overview
CQ5 and Sling overview
 

Dernier

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Dernier (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

CRX Best practices

  • 1. CRX and Sling Best Practices for Web Apps Tools, Resources & Scripts © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2011-Mar-30 Wednesday, 30 March 2011
  • 2. Outline CRX Overview Resource Addressing Components / Modularization Component Inheritance Side track: GFX Rendering Using File Vault Command Line Tool Updating Content Q&A © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2 Wednesday, 30 March 2011
  • 3. CRX Terminology § CRX Platform § CRX JCR Repository § CRX Quickstart § CRX Welcome Screen § CRX Admin Console (legacy) § CRX Explorer § CRX Package Manager & Package Share § OSGi Console (Apache Felix) § CQSE Admin (Communique Servlet Engine) § CRXDE Lite (vs CRXDE Eclipse) © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 3 Wednesday, 30 March 2011
  • 4. CRX Open Core Architecture Application Runtime Web Framework: Apache Sling Web/Eclipse IDE Repository Admin OSGi Runtime: Apache Felix Vault & SVN Tools JCR Repository JCR: Apache Jackrabbit Search Extensions Virtual Repository Search: Lucene GFX Rendering CIFS/SMB Access Content Extraction: TAR-based Shared-nothing POI, Tika, PDFBox Node-store Cluster CRX Platform 4 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. Wednesday, 30 March 2011
  • 5. CRX Open Core Architecture Application Runtime Web Framework: Apache Sling Web/Eclipse IDE Repository Admin OSGi Runtime: Apache Felix Vault & SVN Tools JCR Repository JCR: Apache Jackrabbit Search Extensions Virtual Repository Search: Lucene GFX Rendering CIFS/SMB Access Content Extraction: TAR-based Shared-nothing POI, Tika, PDFBox Node-store Cluster ...CRX is the CRX Platform commercial version of Jackrabbit + Sling 4 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. Wednesday, 30 March 2011
  • 6. Coding - Let’s Begin § Reuse old OOP example: Shapes § Content goes here: /content § Scripts go here: /apps/shapes/components © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 5 Wednesday, 30 March 2011
  • 7. Resource Addressing Old School Static HTML § h p://xyz.com/products/12345.html e Script Hype (jsp, .net, cgi-bin, ...) § h p://xyz.com/products.jsp?id=12345 § Script centric RESTful / Sling § h p://xyz.com/products/12345.html § Resource centric © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 6 Wednesday, 30 March 2011
  • 8. Resources & Resource Types § Resource hierarchy § Each resource has a type § Scripts (and Servlets) are resources, too § URLs are mapped to resources © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 7 Wednesday, 30 March 2011
  • 9. URL Decomposition selector suffix GET /content/shape.head.html/markup?simple=true HTTP/1.1 path extension query parameters 1. Content resolution: “/content/shape” 2. Resource type: “sling:resourceType = /apps/shapes/shape” 3. Script resolution look in /apps/shapes/shape: 1. “head.html.jsp” or “head.jsp” 2. “html.jsp” or “shape.jsp” 3. “GET.jsp” for more info google: “sling script resolution” © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 8 Wednesday, 30 March 2011
  • 10. Coding - Modularize § Identifysemantical / reusable blocks § use the <sling:include/> tag © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 9 Wednesday, 30 March 2011
  • 11. Script Resource Inheritance § sling:resourceSuperType § Scriptresolution traverses the inheritance chain § Components = Script resources § CQ Components = Script resources++ § Fallback: DefaultGetServlet / SlingPostServlet © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 10 Wednesday, 30 March 2011
  • 12. Coding - Create sub types § Create new types for rectangle and triangle shapes § Only “implement” scripts that differ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 11 Wednesday, 30 March 2011
  • 13. Script Like Java Servlets (Java Scriptlets?) § Normal Java classes extend H pServlet § Naming follows normal script resolution rules e.g: “text.java”, “png.java”, etc. § Compiled on demand § Example: GFX Rendering © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 12 Wednesday, 30 March 2011
  • 14. Coding - Let’s add Images Graphic Rendering § day-commons-gfx bundle (CQ, but not in CRX 2.2, yet) § Simple tools to generate png, jpeg and gif images § Multiple layers with alpha blending support § Text rendering with in-repository font support © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 13 Wednesday, 30 March 2011
  • 15. Coding - Let’s use a real IDE Using the File Vault command line tool § Source control like synchronization with JCR repository § check-out les § view changes / differences § check-in les § Same format as CRX Content Packages § Setup your IDE to use offline content + libs § Code completion and be er syntax highlighting § Hybrid variant allows tight integration with SCM and automated build systems. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 14 Wednesday, 30 March 2011
  • 16. Updating Content Sling Post Servlet § POST requests to the resources § AJAX friendly responses § Mapping for CREATE / DELETE / MOVE operations § h p://sling.apache.org/site/manipulating-content-the- slingpostservlet-servletspost.html © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 15 Wednesday, 30 March 2011
  • 17. More Information Official Sites § h p://sling.apache.org/ § h p://felix.apache.org/ § h p://dev.day.com/docs/en/crx/current.html § h p://jackrabbit.apache.org/ CRX / Jackrabbit Source Code § h p://svn.day.com/repos/crx/branches/2.2/ § h p://svn.apache.org/repos/asf/jackrabbit/branches/2.2/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 16 Wednesday, 30 March 2011
  • 18. More Information Visit this sessions wiki page § h ps://zerowing.corp.adobe.com/display/~tripod/ CRXBestPractices § Slidesand recording available § Feedback welcome! § Vote for future topics © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 17 Wednesday, 30 March 2011
  • 19. ank you. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 18 Wednesday, 30 March 2011