SlideShare a Scribd company logo
1 of 27
Download to read offline
CQ5/WEM Developer Tricks
      Gabriel Walt




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
CQ5/WEM Developer Tricks

  Quick intro to a few mostly unknown new features:
  1.         Front-End Optimization
  2.         Mobile Detection
  3.         Mobile Content Synchronization




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   2
1.  Front-End Optimization




                 h p://www. ickr.com/photos/amorsiko/3355940427/
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   3
1.  Front-End Optimization




                 h p://www. ickr.com/photos/amorsiko/3355940427/
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   4
Front-End is about



                                                                                 CQ5 structures well HTML:
  §    HTML = Markup + Content                                                  §  under the content node

                                                                                 §  under the component node

  §    CSS               = Layout
                                                                                 Client Libraries
  §    JS                = Behavior




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

  Each project usually has:
  §    Various CSS & JS libraries                                               Framework

                                                                                 Library A
  §    Express relations between client libs
        §    dependencies                                                       Library B

        §    embed                                                              Component A

  Various optimizations                                                          Component B

  §    concatenated                                                             Component C
  §    mini ed
                                                                                 Site Design
  §    gzipped
                                                                                 Publish ClientLib



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



                       /                                                                      Framework

                                        etc                                                   Library A

                                                          clientlibs                          Library B

                                                          designs                             Component A

                                                                             site             Component B

                                        apps                                                  Component C

                                                          site                                Site Design

                                                                             components       Publish ClientLib



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




                                                                             Demo




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.      8
Client Libraries – Cheat Sheet



  List ClientLib dependencies and embeds:
  h p://SERVER/libs/cq/ui/content/dumplibs.html




  Include JS and CSS in separate les:
  h p://SERVER/PAGE.html?debugClientLibs=true




  Show Firebug console:
  h p://SERVER/PAGE.html?debugConsole=true




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




                 h p://www. ickr.com/photos/mikecogh/4520411836/
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   10
Why?

  We are facing:
  §          ousands of devices – with varying capabilities
  §    Rare so ware updates – still, for most devices


  Unequal capabilities
  §    Screen size                                                          Serve a different design
                                                                                                             Need to abstract
  §    JS support
                                                                                                             away capabilities
  §    CSS support                                                          Server-side feature detection
  §    Image support




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




  Wireless Universal Resource FiLe
  §    Con guration le for all known mobile devices on earth
  §    Over 500 capabilities for each device that are broken up into 30 groups
  §    Used by many others, such as Facebook
  §    is Free and Open Source So ware – h p://wur .sourceforge.net/




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

                                                                             HTML Renditions    Content in Repository

                      HTTP request
                                                                       CQ5     Default Site        Master Content


                                                                                                        Live Copy
                                                                             Touch Phone Site

                                                                                                   Mobile Content
       Device Capabilities (from WURFL)
       §    Supports JS                                                     Smart Phone Site    Different avors of same content
       §    Supports CSS
       §    Supports Image
       §    Exact Screen Size
       §    Supports Device Rotation
       §    Etc.



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
Mobile Page Rendering

                                                                                    Web Path                       Node Path
                                                                             /site/news.html                /content/site/news
                      HTTP request
                                                                       CQ5         Default Site               Master Content


                                                                             /site-mobile/news.touch.html          Live Copy
                                                                              Touch Phone Site
                                                                                                            /content/site-mobile/news

                                                                                                              Mobile Content
       Device Capabilities (from WURFL)                                      /site-mobile/news.smart.html

       §    Supports JS                                                      Smart Phone Site              Different avors of same content
       §    Supports CSS
       §    Supports Image
       §    Exact Screen Size
       §    Supports Device Rotation
       §    Etc.



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
Mobile Page Rendering with Dispatchers




                               Visit site with                                                  Dispatcher forwards     Lookup device
                               mobile browser                                               request to publish server   list and evaluate
                                                                                                                        device group

                                                                                                  Sends back URL to

                                                                             Dispatchers           optimized version
                                                                                                                               CQ5
                                Request mobile                                                 Render device-group
                                optimized version                                                     speci c page




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




                                                                             Demo




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.      16
Improving the default solution

  Server A ention Span




           h p://xkcd.com/869/




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




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   18
e default solution, improved




  We need JavaScript to improve it further!

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   19
Adding a “check” selector




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   20
e full solution




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   21
3.  Mobile Content Synchronization




           h p://www. ickr.com/photos/clemmac/3571171997/
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   22
What it does


                               HTTP request with timestamp of latest sync

                                                                                             CQ5
                               Redirects client to cache URL

                                                                                                     If needed:
                                                       Req                                           generates content package
                                                          uest
                                                                       s co                          and stores it in cache
               Unpacks content                                               nten
                                                                                 t pa
               and merges it with                                                    ckag
                                                                                         e
               previous content                                                              Cache
       App Content, can be:                                                                      Content changes from
                                                                                                 time Y to time Z
       §    Web UI: HTML+CSS+JS
             displayed in web frame                                                              Content changes from
                                                                                                 time X to time Z
       §    Native UI: JSON or XML
             parsed and displayed                                                                Content changes from
                                                                                                 time X to time Y
             using native widgets




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
Mobile Content Synchronization – Bene ts

  §    Optimized for low bandwidth consumption
        §    Only diff is transferred
        §    Content is ZIPed

  §    Client Technology Agnostic:
        §    Requires HTTP client
        §    Requires ZIP library

  §    Reuse of content for mobile app
  §    Can synchronize any kind of content: HTML, XML, JSON, Images, PDF, les, …
  §    App can be:
        §    Web UI: HTML+CSS+JS displayed in web frame
        §    Native UI: JSON or XML parsed and displayed using native widgets


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   24
Mobile Content Synchronization




                                                                             Demo




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.      25
Mobile Content Synchronization – Cheat Sheet

  Con guration:
  §    copy – Copy les and folders
        parameters: path
  §    content – Render content using standard Sling request processing
        parameters: path, extension, selector
  §    clientlib – Package a Javascript or CSS client library
        parameters: path, extension
  §    assets – Collect original renditions of assets
        parameters: path
  §    pages – Render CQ pages and collect referenced assets
        parameters: path, extension, selector, deep


  Console to update the content of the ContentSync packages:
  h p://SERVER/libs/cq/contentsync/content/console.html




  Documentation:
  h p://dev.day.com/docs/en/cq/current/developing/mobile/contentsync.html


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

More Related Content

What's hot

Adobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsAdobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsGabriel Walt
 
Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt AEM HUB
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMconnectwebex
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2Tricode (part of Dept)
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationChristian Meyer
 
Bridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEMBridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEMrbl002
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMAdobeMarketingCloud
 
Dynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMDynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMBojana Popovska
 
SPA Editing with Sling to the rescue - adaptTo() 2021
SPA Editing with Sling to the rescue - adaptTo() 2021 SPA Editing with Sling to the rescue - adaptTo() 2021
SPA Editing with Sling to the rescue - adaptTo() 2021 Hanish Bansal
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander ZengAlex Zeng
 
Professional Frontend Engineering
Professional Frontend EngineeringProfessional Frontend Engineering
Professional Frontend EngineeringNate Koechley
 
UI Customization in AEM 6.0
UI Customization in AEM 6.0UI Customization in AEM 6.0
UI Customization in AEM 6.0Gilles Knobloch
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Ivano Malavolta
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsJames Pearce
 
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Brian Huff
 
JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?connectwebex
 
Frontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsFrontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsKarthik Ramgopal
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the webIvano Malavolta
 

What's hot (20)

Adobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsAdobe Experience Manager Core Components
Adobe Experience Manager Core Components
 
Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface Customization
 
Bridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEMBridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEM
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
Dynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMDynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEM
 
SPA Editing with Sling to the rescue - adaptTo() 2021
SPA Editing with Sling to the rescue - adaptTo() 2021 SPA Editing with Sling to the rescue - adaptTo() 2021
SPA Editing with Sling to the rescue - adaptTo() 2021
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander Zeng
 
Professional Frontend Engineering
Professional Frontend EngineeringProfessional Frontend Engineering
Professional Frontend Engineering
 
UI Customization in AEM 6.0
UI Customization in AEM 6.0UI Customization in AEM 6.0
UI Customization in AEM 6.0
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
 
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
 
JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?
 
Frontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsFrontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterations
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
 

Similar to CQ5 WEM Developer Tricks for Mobile Optimization

Android Development with Flash Platform
Android Development with Flash PlatformAndroid Development with Flash Platform
Android Development with Flash PlatformMihai Corlan
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile developmentMichael Chaize
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiCédric Hüsler
 
Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Codemotion
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with FlexConFoo
 
Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterBrian Huff
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo MobileAndrew Ferrier
 
IBM Worklight - Technical Overview
IBM Worklight - Technical OverviewIBM Worklight - Technical Overview
IBM Worklight - Technical OverviewIIC_Barcelona
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stackALDAN3
 
Adobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBookAdobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBookMihai Corlan
 
Xebia adobe flash mobile applications
Xebia adobe flash mobile applicationsXebia adobe flash mobile applications
Xebia adobe flash mobile applicationsMichael Chaize
 
Duncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassDuncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassJames Cameron
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsMichael Chaize
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...AIP Foundation
 
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Gabriel Walt
 
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
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 

Similar to CQ5 WEM Developer Tricks for Mobile Optimization (20)

Android Development with Flash Platform
Android Development with Flash PlatformAndroid Development with Flash Platform
Android Development with Flash Platform
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile development
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGi
 
Develop multi-screen applications with Flex
Develop multi-screen applications with Flex Develop multi-screen applications with Flex
Develop multi-screen applications with Flex
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with Flex
 
Flex mobile for JUG
Flex mobile for JUGFlex mobile for JUG
Flex mobile for JUG
 
Integrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenterIntegrating ADF Mobile with WebCenter
Integrating ADF Mobile with WebCenter
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
 
IBM Worklight - Technical Overview
IBM Worklight - Technical OverviewIBM Worklight - Technical Overview
IBM Worklight - Technical Overview
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stack
 
Worklight Overview
Worklight OverviewWorklight Overview
Worklight Overview
 
Adobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBookAdobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBook
 
Xebia adobe flash mobile applications
Xebia adobe flash mobile applicationsXebia adobe flash mobile applications
Xebia adobe flash mobile applications
 
Duncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassDuncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclass
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex apps
 
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
 
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
Managing Omnichannel Experiences with Adobe Experience Manager (AEM)
 
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
 
MMT 28: Adobe »Edge to the Flash«
MMT 28: Adobe »Edge to the Flash«MMT 28: Adobe »Edge to the Flash«
MMT 28: Adobe »Edge to the Flash«
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 

Recently uploaded

React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 

Recently uploaded (20)

React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 

CQ5 WEM Developer Tricks for Mobile Optimization

  • 1. CQ5/WEM Developer Tricks Gabriel Walt © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 2. CQ5/WEM Developer Tricks Quick intro to a few mostly unknown new features: 1.  Front-End Optimization 2.  Mobile Detection 3.  Mobile Content Synchronization © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2
  • 3. 1.  Front-End Optimization h p://www. ickr.com/photos/amorsiko/3355940427/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 3
  • 4. 1.  Front-End Optimization h p://www. ickr.com/photos/amorsiko/3355940427/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 4
  • 5. Front-End is about CQ5 structures well HTML: §  HTML = Markup + Content §  under the content node §  under the component node §  CSS = Layout Client Libraries §  JS = Behavior © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 5
  • 6. Client Libraries Each project usually has: §  Various CSS & JS libraries Framework Library A §  Express relations between client libs §  dependencies Library B §  embed Component A Various optimizations Component B §  concatenated Component C §  mini ed Site Design §  gzipped Publish ClientLib © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 6
  • 7. Client Libraries / Framework etc Library A clientlibs Library B designs Component A site Component B apps Component C site Site Design components Publish ClientLib © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 7
  • 8. Client Libraries Demo © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 8
  • 9. Client Libraries – Cheat Sheet List ClientLib dependencies and embeds: h p://SERVER/libs/cq/ui/content/dumplibs.html Include JS and CSS in separate les: h p://SERVER/PAGE.html?debugClientLibs=true Show Firebug console: h p://SERVER/PAGE.html?debugConsole=true © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 9
  • 10. 2.  Mobile Detection h p://www. ickr.com/photos/mikecogh/4520411836/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 10
  • 11. Why? We are facing: §  ousands of devices – with varying capabilities §  Rare so ware updates – still, for most devices Unequal capabilities §  Screen size Serve a different design Need to abstract §  JS support away capabilities §  CSS support Server-side feature detection §  Image support © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 11
  • 12. Device Capabilities Abstraction Wireless Universal Resource FiLe §  Con guration le for all known mobile devices on earth §  Over 500 capabilities for each device that are broken up into 30 groups §  Used by many others, such as Facebook §  is Free and Open Source So ware – h p://wur .sourceforge.net/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 12
  • 13. Mobile Page Rendering HTML Renditions Content in Repository HTTP request CQ5 Default Site Master Content Live Copy Touch Phone Site Mobile Content Device Capabilities (from WURFL) §  Supports JS Smart Phone Site Different avors of same content §  Supports CSS §  Supports Image §  Exact Screen Size §  Supports Device Rotation §  Etc. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 14. Mobile Page Rendering Web Path Node Path /site/news.html /content/site/news HTTP request CQ5 Default Site Master Content /site-mobile/news.touch.html Live Copy Touch Phone Site /content/site-mobile/news Mobile Content Device Capabilities (from WURFL) /site-mobile/news.smart.html §  Supports JS Smart Phone Site Different avors of same content §  Supports CSS §  Supports Image §  Exact Screen Size §  Supports Device Rotation §  Etc. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 15. Mobile Page Rendering with Dispatchers Visit site with Dispatcher forwards Lookup device mobile browser request to publish server list and evaluate device group Sends back URL to Dispatchers optimized version CQ5 Request mobile Render device-group optimized version speci c page © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 15
  • 16. Mobile Page Rendering Demo © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 16
  • 17. Improving the default solution Server A ention Span h p://xkcd.com/869/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 17
  • 18. e default solution © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 18
  • 19. e default solution, improved We need JavaScript to improve it further! © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 19
  • 20. Adding a “check” selector © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 20
  • 21. e full solution © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 21
  • 22. 3.  Mobile Content Synchronization h p://www. ickr.com/photos/clemmac/3571171997/ © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 22
  • 23. What it does HTTP request with timestamp of latest sync CQ5 Redirects client to cache URL If needed: Req generates content package uest s co and stores it in cache Unpacks content nten t pa and merges it with ckag e previous content Cache App Content, can be: Content changes from time Y to time Z §  Web UI: HTML+CSS+JS displayed in web frame Content changes from time X to time Z §  Native UI: JSON or XML parsed and displayed Content changes from time X to time Y using native widgets © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 24. Mobile Content Synchronization – Bene ts §  Optimized for low bandwidth consumption §  Only diff is transferred §  Content is ZIPed §  Client Technology Agnostic: §  Requires HTTP client §  Requires ZIP library §  Reuse of content for mobile app §  Can synchronize any kind of content: HTML, XML, JSON, Images, PDF, les, … §  App can be: §  Web UI: HTML+CSS+JS displayed in web frame §  Native UI: JSON or XML parsed and displayed using native widgets © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 24
  • 25. Mobile Content Synchronization Demo © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 25
  • 26. Mobile Content Synchronization – Cheat Sheet Con guration: §  copy – Copy les and folders parameters: path §  content – Render content using standard Sling request processing parameters: path, extension, selector §  clientlib – Package a Javascript or CSS client library parameters: path, extension §  assets – Collect original renditions of assets parameters: path §  pages – Render CQ pages and collect referenced assets parameters: path, extension, selector, deep Console to update the content of the ContentSync packages: h p://SERVER/libs/cq/contentsync/content/console.html Documentation: h p://dev.day.com/docs/en/cq/current/developing/mobile/contentsync.html © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 26
  • 27. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.