Docsity

Apache Sling API and Usage, Lecture notes of Programming Methodologies

Partial preview of the text

Download Apache Sling API and Usage and more Lecture notes Programming Methodologies in PDF only on Docsity!

Apache Sling – A REST-based Web Application Framework

Carsten Ziegeler | [email protected]

ApacheCon NA 2014

About [email protected] @cziegeler

  • RnD Team at Adobe Research Switzerland
  • Member of the Apache Software Foundation
    • Apache Felix and Apache Sling (PMC and committer)
    • And other Apache projects
  • OSGi Core Platform and Enterprise Expert Groups
  • Member of the OSGi Board
  • Book / article author, technical reviewer, conference speaker

Web Challenges – Entering Apache Sling

§ Publish and process huge amount of information § Highly dynamic § Different types § Different output formats § Collaboration and integration § Fast changing requirements § Rapid prototyping and development § Dynamic, extensible but maintainable JCR REST / ROA Scripting OSGI

Apache Sling – The Fun is Back

§ Web framework § Java Content Repository (JCR) § ROA / REST § Scripting Inside § OSGi § Apache Open Source top level project § http://sling.apache.org § Driving force behind several OSGi related projects at Apache

Apache Jackrabbit - A Java Content Repository

Motivation for JCR

§ Tried and trusted NoSQL solution

§ Standard Java API

§ First spec released in May 2005

§ Various implementations, products, and solutions

§ Open Source implementation since 2006 (Apache Jackrabbit)

§ Think about your data use cases / problems

§ JCR might help!

The Structure of Data

§ A data storage should be flexible and § Allow to model app data in the “right” way § Optimal way of dealing with the data in the app

The Structure of Data

§ A data storage should be flexible and § Allow to model data in the “right” way § What is the “right” way? § Tables? § Key-Value-Pairs? § Schema based? § Semi structured or even unstructured? § Flat, hierarchical or graph?

IT Databases English Books DVDs Fiction Douglas Adams English SF 2010 Apache Jackrabbit 2001 A Hitch..

Sample: Product Catalog

Java Content Repository

§ Hierarchical content § Nodes with properties § (Table is a special tree) § Structured § Nodetypes with typed properties § And/or semi structured and unstructured § Fine and coarse-grained § Single repository for all content!

Databases title authors cover

Sample: Product Catalog

ISBN Apache Jackrabbit Defined by node type

Databases title authors cover

Sample: Product Catalog

ISBN Apache Jackrabbit Defined by node type User Images img1 img

Basel public johndoe janedoe Amsterdam (^) Wedding 1997 Photo Photo Photo Photo

Sample Content Structure with ACLs

private public private Read for everyone, write for owner Write for owner

JSR 170 / JSR 283: Content Repository for JavaTM technology API § (Java) Standard – Version 1.0 and 2. § Supported by many vendors § Used by many products and projects § Several open source solutions § Data model and features § Query and observation