Date post: | 18-Dec-2014 |
Category: |
Documents |
Upload: | david-nuescheler |
View: | 1,952 times |
Download: | 4 times |
Introducing JCR
sep-2010David Nuescheler
Introductions
David Nuescheler Chief Technology [email protected]
David NueschelerJackrabbit Committer / [email protected]
David NueschelerJSR-170 Spec [email protected]
David NueschelerTC Member / CMIS-JCR [email protected]
Day Software
1
Introducing JCR 1.0History, Adoption, Usage.
3
Beyond the SpecReal-life use...
2
JCR 2.0Evolution, What’s new?
JCR.
“The API should be a standard, implementation independent, way to access content bi-directionally on a granular level to a content repository.”
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
7
When to use?
JCRpermissions
versions
binaries
unstructuredread-mostsearch
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:
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
10
Beyond the SpecRI & TCK
The Spec:300 PagesApache Jackrabbit:more than a reference implementation
Technology
Compatibility Kit:
+1000 Tests
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
Java Only?
“A Content Repository Standard, sure, but why Java ‘only’?”
Question?
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
Introducing JCR Catalyst
JCRapachesling
WEBAPP
The Web and Content?
JCR: Yours truly
REST -> Roy T. Fielding
released y2k162 pages
v1.0 released 2005
+300 pages
16
Industry Standards
170
283
17
Tracking success
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
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
1
Introducing JCR 1.0History, Adoption, Usage.
3
Beyond the SpecReal-life use...
2
JCR 2.0Evolution, What’s new?
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
Backwards Compatible.
100%NEW & IMPROVEDBACKWARDS COMPATIBLE
Binary CompatibleJSR-170 (JCR v1.0) Applications do not require modificationMixed environment supported (1.0 & 2.0 Apps)
Reorganized.
100%NEW & IMPROVEDBACKWARDS COMPATIBLE
MODEL & BINDINGNEW & IMPROVED
Completely re-organized and clarifiedSpecificationSeparate Content Repository model sectionRemoved a lot of the Java Language specification
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
Favorites.
10
Query extensions
2.0NEW & IMPROVED#1 QUERY
AQMJQOM
SQLAbstract Query ModelJava Query Object Model (Java Binding)SQL Bindings
Query extensions
2.0NEW & IMPROVED#1 QUERY
+JOINRevamped Result-Set to allow for multiple nodesNew and Improved query capabilities
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
Access Control Management
2.0NEW & IMPROVED
#2 ACL
+ACL+POLICY
Allows to set ACL and Access Control Policies
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
Simple versioning
2.0NEW & IMPROVED
#4 SIMPLE VERSIONING
+LINEAR VERSIONING
Simplified Versioning Model to allowfor ease of adoption.
Lifecycle Management
2.0NEW & IMPROVED
#5 LIFECYCLE
+BPMAllows to express and introspect Lifecycle statusand transitions.
Nodetype Registration
2.0NEW & IMPROVED#6 NODETYPE MANAGEMENT
+REGISTERNODETYPES
Standardized way of registering new and modifyregistered Nodetypes
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
Workspace Management
2.0NEW & IMPROVED
#8 WORKSPACEMANAGEMENT
+CREATE & REMOVE WS
Standardized way of create and removeworkspaces
Shareable nodes
2.0NEW & IMPROVED
#9 SHAREABLE NODES
+GRAPHMulti-filing. Nodes can have multiple parents.
Journalling Observation
2.0NEW & IMPROVED#10 JOURNALLINGOBSERVATION
+DELTA SINCE?what changed since I last checked?
1
Introducing JCR 1.0History, Adoption, Usage.
3
Beyond the SpecReal-life use...
2
JCR 2.0Evolution, What’s new?
Beyond the Spec.
2.0NEW & IMPROVEDAPACHE JACKRABBITNEW & PROVEN ;)
Robust Code baseFully JCR 2.0 Compliant ;)More tooling than everEstablished eco-system
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!