Rapid RESTful Web Applications with Apache Sling and Jackrabbit

Preview:

DESCRIPTION

This is the presentation from JavaOne 2011 that Ruben Reusser and I worked on. The presentation was heavily demonstration based, so there are not as many slides.

Citation preview

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

RAPID RESTFUL WEB APPLICATIONS WITH APACHE SLING AND JACKRABBIT

Speakers Craig S Dickson

craig@craigsdickson.com Ruben Reusser

headwire.com, Inc rr@headwire.com

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

Agenda What is

Apache Jackrabbit/JCR170 and 283 Apache Sling

Demo Application

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide? JCR 170/283 repository Hierarchical Storage of Data Versioning Query Language Search Security Pluggable Persistence Manager

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide?

Hierarchical Storage of Dataroot

dataconten

t

sling:resourceTypejcr:title

apps

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide? Query Language

select * from nt:base where jcr:path like ‘/data/%’

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide?

Search

Select * from nt:base where contains(*, ‘hello world’)

Query is executed with apache lucene and result snippets are automatically provided.

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide?

Security• By default path based security, respected

by search and access to the repository

• Allows for row level security per user

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Jackrabbit Provide?

Pluggable Persistence Manager• Jackrabbit can store data on:

• File System• Database

• Oracle• Derby• MySQL• DB2• MS SQL Server

• Persistence Manager is pluggable, new persistence managers can be written

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Sling Provide? RESTful framework to access and

develop OSGi (Felix) Script execution and resolution Multiple programming languages WebDav

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

What does Sling Provide? RESTful framework to access and develop

What does Sling Provide? Script execution and resolution• Primary Resource Type is used to find corresponding script in

/apps• Each resource type can provide a script for any VERB

(GET/PUT/DELETE)• Each resource type can provide a script for any extension and

selector

Index.html, index.json, index.hello.html

Out of the box supported languages:JSP, ECMA Script, Groovy, Scala, Java

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

Why Rapid? Easy to create forms Easy to store/retrieve data Script Engine Content Driven Developer works on extending the

engine and not on Individual page

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

DEMO Add a Form Create the Data Render a list of the Data View the Data Update the Data Delete the Data

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

Ready for Prime Time? Sling/Jackrabbit are the backbone of

multiple CMS and other applications Examples:

Adobe ADEP/WEM Magnolia Jahia …

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

More Information

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

org

headwire.com, Inc, Craig S. Dickson, Ruben Reusser

Questions? Craig S Dickson

craig@craigsdickson.com http://www.craigsdickson.com

Ruben Reusser headwire.com, Inc rr@headwire.com http://www.headwire.com

Recommended