Docsity

Rapid JCR Applications Development with Apache Sling, Lecture notes of Programming Methodologies

Partial preview of the text

Download Rapid JCR Applications Development with Apache Sling and more Lecture notes Programming Methodologies in PDF only on Docsity!

Rapid JCR applications development

with Apache Sling

Bertrand Delacrétaz, Senior R&D Developer,

Day Software

[email protected] - grep.codeconsult.ch

Slides revision: 2008-11-
Slides theme design: David Nuescheler

Don’t

miss

Jukka

on

JCR,

Thursday!

code is there

is this slide busy enough?

Intro to JCR

JCR = Java Content Repository API

JSR-170 / JSR- 283

Everything Is Content - and JCR manages it as

trees of Nodes and Properties, using rich data

types.

silver

Don’t

miss

Jukka

on

JCR,

Thursday!

bñéÉêí=dêçìéW

gpoJNTM

gpoJOUP

`çåíÉåí=oÉéçëáíçêó=Ñçê=

g~î~qj=íÉÅÜåçäçÖó=^mf=îOKM

péÉÅJiÉ~ÇW

a~ó=pçÑíï~êÉ

pí~íìëW=

mìÄäáÅ=oÉîáÉï=`äçëÉÇ=ëÉéJOMMT

What’s JCR?

What’s JCR?

“The API should be a standard,

implementation independent, way to

access content bi-directionally on a

granular level to a

content repository.”^?

Known compliant Repositories

Apache Jackrabbit Oracle XML DB

Exo ECMS Platform

Microsoft Sharepoint OpenText Livelink

Day CRX IBM FileNet P8 Xythos Repository Alfresco ECM Vignette V

Interwoven Repository IBM CM EMC Documentum

How

many

RDBMS

vendors

do you +hundreds of TCKs^ need? registered

  • using third party connector

Sourcemix Sourcemix

Percussion Rhythmix Lutece Portal

QuickWCM WCMS

Jahia Framework

Hippo CMS

InfoQ Nuxeo ECM Online Community Sakai E-learning

TYPO

GX WebManager v5.0 WCM

Exo ECMS Platform

Liferay Enterprise Portal

Artifactory Maven Proxy

IBM FileNet WebSiteManager Apache James

medic-2-medic mapofmedicine

Day Communiqué WCMS

Apache Tapestry

Day Communique Collab

QSLabs Apache Compliance Cocoon

Alfresco ECMS

Apache Sling Mindquarry Collaboration

Day Communique DAM magnolia WCMS

JBoss Portal

Some known JCR Applications

Sun OpenPortal Interface 21 Spring Framework

Fast BEA Portal Oracle Portal Enterprise Search

join the

fun!

Sling builds on top of JCR

Scriptable applications layer on top of JCR

OSGi-based industrial-strength framework

Simple, powerful, JCR inside

Runs on Apache Jackrabbit by default

http://incubator.apache.org/sling

JCR: David Nuescheler

REST over JCR

REST -> Roy T. Fielding

released y2k

162 pages

v1.

released 2005

+^300

pages

Sling architecture

OSGi bundles

OSGi webapp

OSGi framework

(Apache Felix)

JCR

repository

javascript

JSP Ruby Velocity etc..

debugger

WebDAV

server

Sling OSGi console

filesystem browser

JSR-170 API
HTTP

resource resolution

custom servlets and components

JSR 223

scripting

servlet/script resolution

standard servlets

POST,

json GET

ESP

server-side javascript

sling.js utility

WebDAV access

Friday: Felix

Meschberger on Thursday: Carsten scripting on Apache Felix

Thursday: Jukka on JCR I should do my slides on post-its only

A minimal Sling blog

Consisting of one .esp script

cat /Volumes/localhost/apps/blog/blog.esp | wc -l 54

get the code at

grep.codeconsult.ch

blog step 1: create content

!

! Title:

!

!

! Text:

!

!

!

!

!

!

Form fields drive

the content

model

blog step 2: retrieve content

!

Instant CRU(D)

we got a blog!

html form + Sling.wizard() + Sling.getContent()

The filetagger sample

ESP scripting + java + javascript + YUI

OSGi bundle, initial content, WebDAV, observation, RAD