17
RAPID RESTFUL WEB APPLICATIONS WITH APACHE SLING AND JACKRABBIT headwire.com, Inc, Craig S. Dickson, Ruben Reusser

Rapid RESTful Web Applications with Apache Sling and Jackrabbit

Embed Size (px)

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

Page 1: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

RAPID RESTFUL WEB APPLICATIONS WITH APACHE SLING AND JACKRABBIT

Page 2: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

Speakers Craig S Dickson

[email protected] Ruben Reusser

headwire.com, Inc [email protected]

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

Page 3: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Agenda What is

Apache Jackrabbit/JCR170 and 283 Apache Sling

Demo Application

Page 4: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 5: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

What does Jackrabbit Provide?

Hierarchical Storage of Dataroot

dataconten

t

sling:resourceTypejcr:title

apps

Page 6: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

What does Jackrabbit Provide? Query Language

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

Page 7: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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.

Page 8: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 9: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 10: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 11: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

What does Sling Provide? RESTful framework to access and develop

Page 12: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 13: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 14: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Page 15: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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 …

Page 16: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

More Information

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

org

Page 17: Rapid RESTful Web Applications with Apache Sling and Jackrabbit

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

Questions? Craig S Dickson

[email protected] http://www.craigsdickson.com

Ruben Reusser headwire.com, Inc [email protected] http://www.headwire.com