Effective Web Application Development with Apache Sling. Robert Munteanu ( @rombert ), Adobe Systems Romania



Similar documents
Apache Sling A REST-based Web Application Framework Carsten Ziegeler cziegeler@apache.org ApacheCon NA 2014

NextRow - AEM Training Program Course Catalog

Creating a REST API for Cloud services using Apache Felix and Sling Carsten Ziegeler and David Bosschaert

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Developer s Guide. How to Develop a Communiqué Digital Asset Management Solution

RESTful web applications with Apache Sling

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER APACHE SLING & SCALA Jochen Fliedner

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

CQCON 2013: five Sling features you should know

Sonatype CLM for Maven. Sonatype CLM for Maven

Integrating your Maven Build and Tomcat Deployment

Continuous Delivery of Apache Sling Applications

Contents. Apache Log4j. What is logging. Disadvantages 15/01/2013. What are the advantages of logging? Enterprise Systems Log4j and Maven

RepoGuard Validation Framework for Version Control Systems

Software project management. and. Maven

Elgg 1.8 Social Networking

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

Build management & Continuous integration. with Maven & Hudson

AEM Developer Tools for Eclipse

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Hands on exercise for

Apache Karaf in real life ApacheCon NA 2014

Getting Started with SandStorm NoSQL Benchmark

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Rapid Application Development. and Application Generation Tools. Walter Knesel

The Apache Software Foundation

Developing modular Java applications

Creating Java EE Applications and Servlets with IntelliJ IDEA

INTRODUCTION TO WEB TECHNOLOGY

Builder User Guide. Version 5.4. Visual Rules Suite - Builder. Bosch Software Innovations

Builder User Guide. Version Visual Rules Suite - Builder. Bosch Software Innovations

Selenium Automation set up with TestNG and Eclipse- A Beginners Guide

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:

Building a Service Oriented Architecture with ServiceMix. Jeff Genender CTO Savoir Technologies, Inc

Geronimo Quartz Plugins

Pro/INTRALINK Curriculum Guide

Maven 2 in the real world

Integration in Practice

DESIGN OF AUTOMATION SCRIPTS EXECUTION APPLICATION FOR SELENIUM WEBDRIVER AND TestNG FRAMEWORK

Sightly Component Development

In this chapter, we lay the foundation for all our further discussions. We start

Slide.Show Quick Start Guide

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

1 How to install CQ5 with an Application Server

Hudson configuration manual

Introducing the Adobe Digital Enterprise Platform

PA165 - Lab session - Web Presentation Layer

Software project management. and. Maven

CI/CD Cheatsheet. Lars Fabian Tuchel Date: 18.March 2014 DOC:

JBoss Portal 2.4. Quickstart User Guide

Meister Going Beyond Maven

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

Kohsuke Kawaguchi Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID

San Jose State University

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

Mocean Android SDK Developer Guide

Maven or how to automate java builds, tests and version management with open source tools

Content. Development Tools 2(63)

How To Develop An Open Play Context Framework For Android (For Android)

Setting Up Resources in VMware Identity Manager

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Grails 1.1. Web Application. Development. Reclaiming Productivity for Faster. Java Web Development. Jon Dickinson PUBLISHING J MUMBAI BIRMINGHAM

Amazon Glacier. Developer Guide API Version

Open Source SOA with Service Component Architecture and Apache Tuscany. Jean-Sebastien Delfino Mario Antollini Raymond Feng

vs. Web Site: Blog: blog.soebes.com Dipl.Ing.(FH) Karl Heinz Marbaise

File S1: Supplementary Information of CloudDOE

Continuous Automated Deployment with

Integration in the cloud - IPaaS with Fuse technology. Charles Moulliard Apache Committer

1 What is Cloud Computing? Cloud Infrastructures OpenStack Amazon EC CAMF Cloud Application Management

HELIO Storage Service Developers Guide Draft

Presentation of Enterprise Service Bus(ESB) and. Apache ServiceMix. Håkon Sagehaug

1 Building, Deploying and Testing DPES application

Agile Best Practices and Patterns for Success on an Agile Software development project.

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Configuring the LCDS Load Test Tool

WP Popup Magic User Guide

Java/J2EE or Web Developer. Formal Education. Technical knowledge. Spoken Languages

BIRT Application and BIRT Report Deployment Functional Specification

Software infrastructure for Java development projects

Configuring CQ Security

Braindumps.C questions

Using SAPUI5 to Enhance LSO Manager Capabilities Rob Becker & Steve Sweeney Lockheed Martin SESSION CODE: AD124

Sample HP OO Web Application

Software Development In the Cloud Cloud management and ALM

Crystal Reports for Eclipse

WEBLOGIC ADMINISTRATION

Advertiser Campaign SDK Your How-to Guide

Glassfish, JAVA EE, Servlets, JSP, EJB

Tutorial: setting up a web application

Tool-Assisted Knowledge to HL7 v3 Message Translation (TAMMP) Installation Guide December 23, 2009

With a single download, the ADT Bundle includes everything you need to begin developing apps:

An introduction to web programming with Java

Introduction to Tizen SDK Alpha. Taiho Choi Samsung Electronics

Spectrum Technology Platform. Version 9.0. Spectrum Spatial Administration Guide

MEGA Web Application Architecture Overview MEGA 2009 SP4

Transcription:

Effective Web Application Development with Apache Sling Robert Munteanu ( @rombert ), Adobe Systems Romania

About the Speaker Apache Sling PMC member Fanboy of the Sling/JCR/OSGi stack Enthusiastic Open-Source contributor Senior Computer Scientist at Adobe in Romania Speaker.currentSpeaker().interrupt(); 2

Presentation Flow Quick facts and figures Conceptual foundations Building blocks Building Sling applications 3

Quick facts and figures

Apache Sling - History 200x Pre-Apache 2007 incubation 2009 TLP 2014 Version 7 5

Apache Sling High-level View of the Code Source: OpenHub 6

Apache Sling - Activity Level Source: OpenHub Source: status.apache.org 7

Conceptual Foundations

Apache Sling Conceptual Foundations OSGi-powered REST-based Content-driven Apache Scripting inside 9

Apache Sling Apache Open Source 17 4 1 7 Felix Aries ServiceMix Commons 3 6 1 2 Geronimo Jackrabbit Derby Tika 10

Apache Sling REST-based /blog/{0}.html /blog/ BlogViewController BlogListController / HomeController / /blog /blog/hello-world SlingMainServlet 11

Apache Sling Content-Driven blog hello-world jcr:content images some-cat.jpg other-cat.jpg 12

Apache Sling Content-Driven some-cat.jpg - jcr:primarytype = app:asset - jcr:title = Some Cat - jcr:description = A longer description of this picture of a cat - jcr:created = 2014-06-03T00:00:00.000+02:00 - jcr:lastupdated = 2014-06-03T11:00:00.000+02:00 - tags = [Animal, Cat, Color] - width = 400 - height = 600 13

Apache Sling Scripting Inside JSP 14

Apache Sling Scripting Inside libs blogapp welcome.jsp welcome json.html 15

Apache Sling OSGi-powered Provision and deploy bundles Configure, register and lookup services Eventing Web Console 16

Building blocks

Apache Sling Serving a request GET /blog/welcome.html /blog/welcome??? myblog/blog.groovy 18

Apache Sling Resource Types blog [blogapp/listing] hello-world jcr:content [blogapp/blog/content] images some-cat.jpg other-cat.jpg 19

Apache Sling Script Resolution GET /blog.html Type: blogapp/listing Extension: html Method: GET /libs/blogapp/listing.jsp /libs/blogapp/listing/html.jsp @SlingServlet(resourceTypes= blogapp/list ing,...) 20

Apache Sling Request Selectors GET /blog.rss.xml Type: blogapp/listing Extension: xml Selector: rss Method: GET /libs/blogapp/listing/rss.html 21

Apache Sling Resource Providers JCR FS / /content/ /content/comments /logs MongoDB Cassandra 22

Apache Sling JCR 23

Apache Sling JCR implementations Apache Jackrabbit Oak 24

Building Sling Applications

Apache Sling JCR modeling images some-cat.jpg renditions File upload Observation small.jpg ripple.jpg annotations ACLs initial-review 26

Apache Sling - JCR etc rendition ripple - orientation = /etc/rendition/ripple/options /orientation/vertical - antialiasing = true - edges = /etc/rendition/ripple/options/ edges/wrap - wave type = /etc/rendition/ripple/options/ wave_type/simple - period = 20 - amplitude = 5 27

Apache Sling Everything is a Resource Everything is a Resource 28

Apache Sling Reading from the Repository @SlingServlet(resourceTypes = "blogapp/listing", extensions = "xml", methods = "GET") public class RSSFeedServlet extends SlingSafeMethodsServlet { @Override protected void doget(slinghttpservletrequest request, SlingHttpServletResponse response) throws ServletException, IOException { // actual implementation } } 29

Apache Sling Reading from the Repository Resource res = request.getresource(); ValueMap properties = res.adaptto(valuemap.class); String title = properties.get( jcr:title, Missing ); Post post = res.adaptto(post.class); title = post.gettitle(); 30

Apache Sling - Extensions Thread Pools and Scheduled Tasks I18n Caching Models Health Checks Eventing 31

Apache Sling - SlingQuery Get the closest Folder parent $(resource).parents("sling:folder").last(); Get the second child of each resource $(resource1, resource2).children(":eq(1)"); Find children named en or de $(resource).children("#en, #de") 32

Apache Sling - Deployment Single executable Jar or War file the Sling launchpad Configuration defined in multiple text files, defining bundles, configuration, variables, bootstrap commands, etc 33

Apache Sling Provisioning Model [feature name=main] [variables] io.version=1.4 [configurations] org.apache.jackrabbit...segmentnodestoreservice name="default\ NodeStore" repository.home="sling/oak/repository" [artifacts startlevel=5] commons-io/commons-io/${io.version}/jar commons-fileupload/commons-fileupload/1.3.1/jar 34

Apache Sling - Tooling Maven Plugins Bundle deployment Launchpad creation Maven Archetypes IDE Tooling Eclipse Netbeans (external) 35

Resources http://sling.apache.org/ http://jackrabbit.apache.org/ 36