froscamp zurich: introducing jcr - 2010

41
Introducing JCR sep-2010 David Nuescheler

Upload: david-nuescheler

Post on 18-Dec-2014

1.952 views

Category:

Documents


4 download

DESCRIPTION

Introducing JCR. Presentation for the Hackfest at FrOScamp in Zurich.

TRANSCRIPT

Page 1: FrOScamp Zurich: Introducing JCR - 2010

Introducing JCR

sep-2010David Nuescheler

Page 3: FrOScamp Zurich: Introducing JCR - 2010

Day Software

Page 4: FrOScamp Zurich: Introducing JCR - 2010

1

Introducing JCR 1.0History, Adoption, Usage.

3

Beyond the SpecReal-life use...

2

JCR 2.0Evolution, What’s new?

Page 5: FrOScamp Zurich: Introducing JCR - 2010

JCR.

“The API should be a standard, implementation independent, way to access content bi-directionally on a granular level to a content repository.”

Page 6: FrOScamp Zurich: Introducing JCR - 2010

A Content Repository!?

RDBMSFEATURES OF AN

FILESYSTEMFEATURES OF A

YOU ALWAYS WANTED

GOOD STUFFALL THE OTHER+

Transactions, Query, Structure, Integrity Binaries, Hierarchy, Locking, Access Control

Data First, Versioning, Full-text, Multi-Value, Sort-Order, Observation

CONTENT REPOSITORY

Page 7: FrOScamp Zurich: Introducing JCR - 2010

7

When to use?

JCRpermissions

versions

binaries

unstructuredread-mostsearch

Page 8: FrOScamp Zurich: Introducing JCR - 2010

Reality Check!

write a “JSP snippet” that lists all the documents in a folder by “title”.

Task

...Code Snippets courtesy of the early JSR-170 Expert-Group:

Page 9: FrOScamp Zurich: Introducing JCR - 2010

Reality CheckList all documents in a folder

<%childCount = node.getContentCount();for(int i=0;i<childCount;i++) { IContent child = node.getContent(i); Property title = child.getPropertyByName("Title"); %><%= title.getValue() %><br/><%}%>

<%LAPI_DOCUMENTS document

s = new LAPI_DOCUMENTS(session);

LLValue childTable = new LLValue();

documents.ListObjects(volumeID, folderID,

null, null, LAPI_DOCUMENTS.PERM_SEE, c

hildTable);

Enumeration children = childTable.enumerateVal

ues();

while(children.hasMoreElements()) {

LLValue child = (LLValue)e.nextElement

();

String title = child.toString("Name");

%><%= title %><br/><%

}%>

<%fndocs = new IFnObjSetDualProxy( fnfolder.getContents

(idmFolderContent.idmFolderContentDocument));

int numDocs = fndocs.getCount();for (int i = 1; i <= numDocs; i++) {

IFnDocumentDual fndoc = new IFnDocumentDualProxy(fndocs.getItem(new Integer(i)));

IFnPropertiesDual propset = fndoc.getProperties();

IFnPropertyDual idmTitleProp = propset.getItem("Title");

String title = idmTitleProp.getValue();

%><%= title %><br/><% if (comCleanup) { cleaner.release(fndoc); }}%>

<%IDocuments documents

= new IDocumentsProxy(binder.getDocuments(

));

documents.cache();

int documentCount = documents.getCount();

for (int i = 0; i<documentCount; i++) {

document = new IDocumentProxy(docu

ments.getItemByIndex(i));

String title = document.getTitle()

%><%= title %><br/><%

}%>

<%PageIterator children = page.getPages();while (children.hasNext()) { Page child = children.nextPage(); Container toplevel = child.getContent(); Atom title = toplevel.getAtom("Title"); %><%= title %><br /><%}%>

+800

<%NodeIterator children = node.getNodes();while (children.hasNext()) { Node child = children.nextNode(); Property title = child.getProperty("Title"); %><%= title %><br /><%}%>

JCR API

Page 10: FrOScamp Zurich: Introducing JCR - 2010

10

Beyond the SpecRI & TCK

The Spec:300 PagesApache Jackrabbit:more than a reference implementation

Technology

Compatibility Kit:

+1000 Tests

Page 11: FrOScamp Zurich: Introducing JCR - 2010

Took about 4 years

Investment for Day ~30 man years of work to complete (Spec, TCK & RI)

First JSR in History of the JCP with a true Open Source License (Apache Style)

Star Spec-Lead Award for process excellence

The OSS Reference Implementation “Jackrabbit” graduated to a Top Level Apache Project

JSR-170: Some Specifics

Page 12: FrOScamp Zurich: Introducing JCR - 2010

Java Only?

“A Content Repository Standard, sure, but why Java ‘only’?”

Question?

Page 13: FrOScamp Zurich: Introducing JCR - 2010

Why Java…

…because of its standardizing body: The JCP.

Good track record with respect to implementations and finished specifications

Reference Implementations and Technology Compatibility Kit are mandatory

Efficient Specification Cycles

A lot of the JCR specification can still be applied other environments and languages

Page 14: FrOScamp Zurich: Introducing JCR - 2010

Introducing JCR Catalyst

JCRapachesling

WEBAPP

Page 15: FrOScamp Zurich: Introducing JCR - 2010

The Web and Content?

JCR: Yours truly

REST -> Roy T. Fielding

released y2k162 pages

v1.0 released 2005

+300 pages

Page 16: FrOScamp Zurich: Introducing JCR - 2010

16

Industry Standards

170

283

Page 17: FrOScamp Zurich: Introducing JCR - 2010

17

Tracking success

Page 18: FrOScamp Zurich: Introducing JCR - 2010

Known Compliant Repositories(* partially using 3rd party connectors)

Apache Jackrabbit Oracle XML DBExo

ECMS PlatformMicrosoft

Sharepoint OpenText Livelink

Day CRX IBM FileNet P8 Xythos Repository Alfresco ECM Vignette V7

Interwoven Repository IBM CM / Domino EMC Documentum

+hundreds of TCKsregisteredSaperionArchive

Page 19: FrOScamp Zurich: Introducing JCR - 2010

Sourcemix Sourcemix

Percussion Rhythmix Lutece

Portal

QuickWCM WCMS

Jahia Framework

Hippo CMS

InfoQ Online CommunityNuxeo ECM

Sakai E-learning

TYPO3 v5.0 WCMGX WebManager

Exo ECMS Platform

Liferay Enterprise Portal

Artifactory Maven Proxy

IBM FileNet WebSiteManagerApache James

medic-2-medic mapofmedicine

Day Communiqué WCMS

Apache Tapestry

Day Communique Collab

QSLabs ComplianceApache

Cocoon

Alfresco ECMSApache Sling

Mindquarry Collaboration

Day Communique DAMmagnolia WCMS

JBoss Portal

Some known JCR Applications

Sun OpenPortal Interface 21

Spring Framework

Fast Enterprise SearchOracle WebCenterBEA Portal

Page 20: FrOScamp Zurich: Introducing JCR - 2010

1

Introducing JCR 1.0History, Adoption, Usage.

3

Beyond the SpecReal-life use...

2

JCR 2.0Evolution, What’s new?

Page 21: FrOScamp Zurich: Introducing JCR - 2010

Took about 4 years

Investment for Day ~30 man years of work to complete (Spec, TCK & RI)

Star Spec-Lead Award for process excellence

The OSS Reference Implementation “Apache Jackrabbit” Top Level Project

JSR-283: Some Specifics

Page 22: FrOScamp Zurich: Introducing JCR - 2010

Backwards Compatible.

100%NEW & IMPROVEDBACKWARDS COMPATIBLE

Binary CompatibleJSR-170 (JCR v1.0) Applications do not require modificationMixed environment supported (1.0 & 2.0 Apps)

Page 23: FrOScamp Zurich: Introducing JCR - 2010

Reorganized.

100%NEW & IMPROVEDBACKWARDS COMPATIBLE

MODEL & BINDINGNEW & IMPROVED

Completely re-organized and clarifiedSpecificationSeparate Content Repository model sectionRemoved a lot of the Java Language specification

Page 24: FrOScamp Zurich: Introducing JCR - 2010

Bundled.

100%NEW & IMPROVEDBACKWARDS COMPATIBLE

MODEL & BINDINGNEW & IMPROVED

OSGI BUNDLENEW & IMPROVED

Shipped jcr-2.0.jar is an OSGI BundleReady to deploy in an OSGI Container

Page 25: FrOScamp Zurich: Introducing JCR - 2010

Favorites.

10

Page 26: FrOScamp Zurich: Introducing JCR - 2010

Query extensions

2.0NEW & IMPROVED#1 QUERY

AQMJQOM

SQLAbstract Query ModelJava Query Object Model (Java Binding)SQL Bindings

Page 27: FrOScamp Zurich: Introducing JCR - 2010

Query extensions

2.0NEW & IMPROVED#1 QUERY

+JOINRevamped Result-Set to allow for multiple nodesNew and Improved query capabilities

Page 28: FrOScamp Zurich: Introducing JCR - 2010

Query extensions

2.0NEW & IMPROVED#1 QUERY

-XPATH**well, still available but deprecated

Not enough support from the EGJQOM allows for many implementationsJackrabbit / CRX will support XPATH

Page 29: FrOScamp Zurich: Introducing JCR - 2010

Access Control Management

2.0NEW & IMPROVED

#2 ACL

+ACL+POLICY

Allows to set ACL and Access Control Policies

Page 30: FrOScamp Zurich: Introducing JCR - 2010

Retention Policy & Hold

2.0NEW & IMPROVED#3 RM

+RETENTION+LEGAL HOLD

Support for interaction with RM systemsAllows setting and introspection of Retention Policies and Holds

Page 31: FrOScamp Zurich: Introducing JCR - 2010

Simple versioning

2.0NEW & IMPROVED

#4 SIMPLE VERSIONING

+LINEAR VERSIONING

Simplified Versioning Model to allowfor ease of adoption.

Page 32: FrOScamp Zurich: Introducing JCR - 2010

Lifecycle Management

2.0NEW & IMPROVED

#5 LIFECYCLE

+BPMAllows to express and introspect Lifecycle statusand transitions.

Page 33: FrOScamp Zurich: Introducing JCR - 2010

Nodetype Registration

2.0NEW & IMPROVED#6 NODETYPE MANAGEMENT

+REGISTERNODETYPES

Standardized way of registering new and modifyregistered Nodetypes

Page 34: FrOScamp Zurich: Introducing JCR - 2010

New property & nodetypes

2.0NEW & IMPROVED

#7 NEW PROPERTY& NODETYPES

+URL+WEAK REFERENCE

+DECIMAL

+mix:title

+mix:lastModified+mix:created

+mix:language+mix:etag+nt:address

Things we missed in JCR 1.0 applications

Page 35: FrOScamp Zurich: Introducing JCR - 2010

Workspace Management

2.0NEW & IMPROVED

#8 WORKSPACEMANAGEMENT

+CREATE & REMOVE WS

Standardized way of create and removeworkspaces

Page 36: FrOScamp Zurich: Introducing JCR - 2010

Shareable nodes

2.0NEW & IMPROVED

#9 SHAREABLE NODES

+GRAPHMulti-filing. Nodes can have multiple parents.

Page 37: FrOScamp Zurich: Introducing JCR - 2010

Journalling Observation

2.0NEW & IMPROVED#10 JOURNALLINGOBSERVATION

+DELTA SINCE?what changed since I last checked?

Page 38: FrOScamp Zurich: Introducing JCR - 2010

1

Introducing JCR 1.0History, Adoption, Usage.

3

Beyond the SpecReal-life use...

2

JCR 2.0Evolution, What’s new?

Page 39: FrOScamp Zurich: Introducing JCR - 2010

Beyond the Spec.

2.0NEW & IMPROVEDAPACHE JACKRABBITNEW & PROVEN ;)

Robust Code baseFully JCR 2.0 Compliant ;)More tooling than everEstablished eco-system

Page 40: FrOScamp Zurich: Introducing JCR - 2010

Beyond the Spec.

2.0NEW & IMPROVEDAPACHE JACKRABBITNEW & PROVEN ;)

APACHE SLING!JCR CATALYST

Restful Web FrameworkRunning on top of JCRNever build a JCR WebApp without it. Seriously!

Page 41: FrOScamp Zurich: Introducing JCR - 2010