Content Management with
Apache Jackrabbit



Jukka Zitting
Day Software
(862)
2


Overview

What to ex pect               What not to expect
> Apache Jackrabbit           > Source code
>              ...
3


Agenda

>   Apache Jackrabbit

>   Basic content modeling

>   References and search

>   Advanced features

>   Summa...
4


Apache Jackrabbit

>   JSR 170 reference implementation
>   Apache TLP since 2006
>   Looking back
    – 1.0: April 20...
5


Apache Jackrabbit: Words of advice

> Read (or browse) the JCR specification
  – jcr- 1.0.jar included
> Getting start...
6


Agenda

>   Apache Jackrabbit

>   Basic content modeling

>   References and search

>   Advanced features

>   Summa...
7


Introducing JCR Tunes

> JCR example application
  – “How to implement a music store or library with JCR?”
  – Designe...
8


Starting point: Leverage the standard node
types
         Type hierarchy       Content hierarchy


  nt:hierarchyNode
...
9


Bottom- up modeling: Content types

   my:album > nt:folder
   - artist (string)
                                     ...
10


Top- down modeling: Content hierarchies


                        Label           Label


                 Band      ...
11


Content Modeling: Words of advice

> Namespaces
  – Use a single namespace per company or application
  – Use a reaso...
12


Agenda

>   Apache Jackrabbit

>   Basic content modeling

>   References and search

>   Advanced features

>   Summ...
13


Alternative Views: References




         tags                tunes           playlists


                      Tune...
14


Alternative Views: Search

Looking    XPath                                     SQL
for
Latest     / jcr:root/ my:tun...
15


Alternative Views: Words of advice

> Moderate use of references
  – Circular references only within a subtree
  – Pl...
16


Agenda

>   Apache Jackrabbit

>   Basic content modeling

>   References and search

>   Advanced features

>   Summ...
17


Staged Publishing: Versioning

                   Version store




         Staging                   Live
18


Personalization



           tunes                      users


    Tune                           John         Jane...
19


Authentication and Authorization

> Java Authentication and Authorization Services (JAAS)
  – Mostly the authenticati...
20


Agenda

>   Apache Jackrabbit

>   Basic content modeling

>   References and search

>   Advanced features

>   Summ...
21


Last words

> Everything is content
  – Application content
   –   HTML pages, CSS and JavaScript files, static image...
Jukka Zitting                     http:/ / www.day.com/
Day Software                      jukka.zitting@day.com



Apache ...
Upcoming SlideShare
Loading in …5
×

862

1,371 views

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,371
On SlideShare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

862

  1. 1. Content Management with Apache Jackrabbit Jukka Zitting Day Software (862)
  2. 2. 2 Overview What to ex pect What not to expect > Apache Jackrabbit > Source code > > JCR content modeling Live demo > > Best practices Business perspective > > Things to watch for Management perspective > Engineering perspective
  3. 3. 3 Agenda > Apache Jackrabbit > Basic content modeling > References and search > Advanced features > Summary and questions
  4. 4. 4 Apache Jackrabbit > JSR 170 reference implementation > Apache TLP since 2006 > Looking back – 1.0: April 2006 – 1.1: October 2006 – 1.2: January 2007 – 1.3: April 2007 > Looking forward (tentative) – 1.4: 2007 – 2.0: 2008 (JCR 2.0 RI) – announce- subscribe@jackrabbit.apache.org http:/ / jackrabbit.apache.org/ > Components – Core, API, RMI, WebDAV, webapp, JCA, …
  5. 5. 5 Apache Jackrabbit: Words of advice > Read (or browse) the JCR specification – jcr- 1.0.jar included > Getting started with Jackrabbit – jackrabbit- webapp: Drop- in deployment – First Hops: Embedded repository – Take your time > Resources – Mailing lists: Ex cellent support, but may delay you – Website: Some good parts, but not complete or very well structured – Wiki: End user ex perience (especially for JBoss) – FAQ: outdated – Issue tracker: Good response time
  6. 6. 6 Agenda > Apache Jackrabbit > Basic content modeling > References and search > Advanced features > Summary and questions
  7. 7. 7 Introducing JCR Tunes > JCR example application – “How to implement a music store or library with JCR?” – Designed to showcase JCR features and best practices – JCR book in progress > Store and manage individual “tunes”, optionally organized in albums, etc. > Support alternative views like predefined genres, or more ad- hoc searches > Integrated handling of reviews, cover images, and other related content > Staged publishing and timed releases of tunes or albums > Personalization for things like settings, favorites, personal play- lists, etc. > Ex tensibility and flex ibility
  8. 8. 8 Starting point: Leverage the standard node types Type hierarchy Content hierarchy nt:hierarchyNode nt:folder nt:file nt:linkedFile nt:resource
  9. 9. 9 Bottom- up modeling: Content types my:album > nt:folder - artist (string) my:review > nt:file - release date (date) - author (string) - star rating (long) my:tune > nt:file - artist (string) - release date (date) my:resource > nt:resource - codec (string) - bitrate (long)
  10. 10. 10 Top- down modeling: Content hierarchies Label Label Band Label Album Album Band Reviews Tune Tune Images Tune Reviews Images
  11. 11. 11 Content Modeling: Words of advice > Namespaces – Use a single namespace per company or application – Use a reasonably unique namespace prefix – Prefix ed names for structured content – Default namespace for unstructured content > Use an application root node, / my:content – Good for searching, backup, and migration > Avoid flat hierarchies – User interface complex ity – Jackrabbit performance > Content- driven design – Design your content before your application
  12. 12. 12 Agenda > Apache Jackrabbit > Basic content modeling > References and search > Advanced features > Summary and questions
  13. 13. 13 Alternative Views: References tags tunes playlists Tune Rock Classic Top 10 Picks link link link Tune
  14. 14. 14 Alternative Views: Search Looking XPath SQL for Latest / jcr:root/ my:tunes/ / element(*,my:tu SELECT * FROM my:tune releases ne) WHERE [@released > xs:dateTime(‘…’)] jcr:path LIKE ‘/ my:tunes/ %’ AND released > DATE ‘…’ Reviews / jcr:root/ my:tunes/ / element(*,my:re SELECT * FROM my:review with view) WHERE keywords / jcr:content[jcr:contains(.,’…’)] jcr:path LIKE ‘/ my:tunes/ %’ AND CONTAINS(*,‘…’)
  15. 15. 15 Alternative Views: Words of advice > Moderate use of references – Circular references only within a subtree – Plan for backup and content migration – Jackrabbit performance: max 10k references to a single node > Best search performance when selecting a small subset of content > No joins or aggregate searches > Full text index ing of binary properties only for jcr:data in nt:resource nodes > Formatting date queries – ISO 8601 as the string format – session.getValueFactory().createValue(Calendar.getInstance()).getString( ) > JCR 2.0: Query Object Model? Mandatory SQL?
  16. 16. 16 Agenda > Apache Jackrabbit > Basic content modeling > References and search > Advanced features > Summary and questions
  17. 17. 17 Staged Publishing: Versioning Version store Staging Live
  18. 18. 18 Personalization tunes users Tune John Jane tunes favorites playlists Tune link link
  19. 19. 19 Authentication and Authorization > Java Authentication and Authorization Services (JAAS) – Mostly the authentication part is currently used by Jackrabbit – Pluggable authentication components – Support for single sing- on > Custom AccessManager interface in Jackrabbit – Pluggable authorization components – The default implementation supports only global read, write, and admin access – More advanced implementations are proprietary > Repository- level authentication and authorization applies to all clients – Better than application- level authorization
  20. 20. 20 Agenda > Apache Jackrabbit > Basic content modeling > References and search > Advanced features > Summary and questions
  21. 21. 21 Last words > Everything is content – Application content – HTML pages, CSS and JavaScript files, static images – JSP pages, Java classes and libraries – Documentation, resource bundles, etc. – With versioning, ex port/ import, full tex t search, etc. > Web- friendly – Trivial URI mapping – WebDAV access for free – Dispatch on node type, not on URI path > In your application?
  22. 22. Jukka Zitting http:/ / www.day.com/ Day Software jukka.zitting@day.com Apache Jackrabbit http:/ / jackrabbit.apache.org/ users@jackrabbit.apache.org Apache Software Foundation http:/ / www.apache.org/

×