SlideShare a Scribd company logo
1 of 26
Download to read offline
Using Enterprise Content in Grails!
             Robin Bramley, Ixxus!
Agenda!

 •  Who I am!
 •  Setting the scene!
  •  Grails!
  •  CMIS!
 •  Sample application styles!
  •  Document Management!
  •  Managed web content!
 •  CMIS clients!
  •  Roll your own!
  •  OpenCMIS!
 •  Practicalities!
  •  Alfresco extensions to CMIS!
  •  Performance!
 •  Grails OpenCMIS Plugin!
  •  Alternatives!
My Background!

 •  Senior Architect @ Ixxus!
  •  The UK Platinum partner!
 •  Worked at consultancies for 13 years!
  •  Developing solutions with Alfresco since 0.6!
  •  First UK Alfresco Gold partner!
 •  Around the edges I also write!
  •  GroovyMag author – inc. 4 hands-on Grails articles!
  •  DZone Most Valuable Blogger!
    •     Re-published my series on Grails & Hudson / Jenkins!
  •  Open source contributions!
    •     OpenID support for Acegi / Spring Security!
    •     Codenarc support for Hudson / Jenkins CI Violations plugin!
         •    Presented at the London GGUG!
Grails!

  •  Full-stack web framework!
    •     Embedded Tomcat & database!
    •     Allows for rapid development!
         •    > grails create-application test
         •    > cd test
         •    > grails run-app
  •  Scaffolding from domain classes!
  •  Convention over configuration!
  •  Builds on the shoulders of Giants!
    •     Groovy!
    •     Spring Framework!
    •     Spring MVC!
    •     Hibernate!
  •  Rich plugin ecosystem!
  •  Backed by SpringSource!
CMIS!

 Content Management Interoperability Services standard!
 • Open standard published by OASIS!
   •     Version 1.0 – 1st May 2010!
   •     Alfresco 3.3 was first CMIS 1.0 compliant product launched!
 • ʻSQL for contentʼ!
   •     Query language!
   •     Virtual tables!
        •    Folder!
        •    Document!
        •    Relationship!
        •    Policy!
 • Bindings (ʻJDBC/ODBC equivalentʼ)!
   •     REST / AtomPub!
   •     SOAP Web Services!
   •     Browser binding in CMIS 1.1!
Documents & Folders!

Document                         Folder
  •  Has a set of metadata         •  Has a set of metadata
     properties !                     properties!
    •    Columns!                  •  Can have zero or more
    •    Custom extensions!           children!
  •  May have a content stream       •    Documents or Folders!
     (e.g. an actual file)!
  •  May have renditions!
CMIS Repository Information !

Service Document
    •  3.x CMIS AtomPub binding: /alfresco/service/cmis
    •  4.x CMIS AtomPub binding: /alfresco/cmisatom

<cmisra:repositoryInfo>
 <cmis:repositoryId>ea9c2b9e-2892-4370-8791-4b0049f917f3</cmis:repositoryId>
 <cmis:repositoryName>Main Repository</cmis:repositoryName>
 <cmis:repositoryDescription>Main Repository</cmis:repositoryDescription>
 <cmis:vendorName>Alfresco</cmis:vendorName>
 <cmis:productName>Alfresco Repository (Community)</cmis:productName>
 <cmis:productVersion>4.0.0 (a 3755)</cmis:productVersion>
 <cmis:rootFolderId>workspace://SpacesStore/784b5b19-61ee-4963-a367-
db6164ed43af</cmis:rootFolderId>
CMIS Query Syntax!
SQL like
•  Subset of SQL-92 with some extensions !
  •    SELECT * FROM cmis:document
  •    SELECT * FROM cmis:folder
       WHERE IN_FOLDER(‘folder-id’)
  •    SELECT * FROM cmis:document
       WHERE IN_TREE(‘folder-id’)
  •    SELECT cmis:objectId, cmis:name, cmis:contentStreamLength
       FROM cmis:DOCUMENT
       WHERE contains(‘fox’) OR cmis:name like ‘%fox%’

•  The complete BNF grammar is included in the specification at 

   http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-
   v1.0.html#_Toc243905422 !
CMIS Query Submission!
•  Queries are submitted by POSTing application/cmisquery+xml
  •    Accepted response format e.g. application/atom+xml;type=feed

<cmis:query xmlns:cmis=’http://docs.oasis-open.org/ns/cmis/core/200908/’>
  <cmis:statement>SELECT * FROM cmis:document</cmis:statement>
  <cmis:searchAllVersions>false</cmis:searchAllVersions>
  <cmis:includeAllowableActions>false<cmis:includeAllowableActions>
  <cmis:includeRelationships>none</cmis:includeRelationships>
  <cmis:renditionFilter>*</cmis:renditionFilter>
  <cmis:maxItems>-1</cmis:maxItems>
  <cmis:pageSize>-1</cmis:pageSize>
  <cmis:skipCount>0</cmis:skipCount>
</cmis:query>
Atom response!
Atom response – feed metadata!


                       <author><name>System</name></author>
                       <generator version="4.0.0">Alfresco</generator>
                       <icon>http://localhost:8080/alfresco/images/logo/
                       <id>urn:uuid:784b5b19-61ee-4963-a367-db6164ed43af
                       <title>Company Home Children</title>
                       <updated>2011-11-01T18:54:14.541Z</updated>
                       <opensearch:totalResults>5</opensearch:totalResul
                       <opensearch:startIndex>0</opensearch:startIndex>
                       <opensearch:itemsPerPage>-1</opensearch:itemsPerP
                       <cmisra:numItems>5</cmisra:numItems>
Atom response – entry!

                         <author><name>admin</name></author>
                         <content src="http://localhost:8080/alfresco/serv
                         <published>2011-11-01T18:54:14.529Z</published>
                         <summary></summary>
                         <title>Projects</title>
                         <updated>2011-11-01T18:54:38.831Z</updated>
                         <app:edited>2011-11-01T18:54:38.831Z</app:edited>
                         <alf:icon>http://localhost:8080/alfresco/images/i
                         <cmisra:object>
                          <cmis:properties>
                           <cmis:propertyId propertyDefinitionId="cmis:all
                           <cmis:propertyId propertyDefinitionId="cmis:obj
                           <cmis:propertyString propertyDefinitionId="cmis
                           <cmis:propertyString propertyDefinitionId="cmis
                           <cmis:propertyDateTime propertyDefinitionId="cm
                           <cmis:propertyString propertyDefinitionId="cmis
                           <cmis:propertyString propertyDefinitionId="cmis
                           <cmis:propertyId propertyDefinitionId="cmis:obj
                           <cmis:propertyDateTime propertyDefinitionId="cm
                           <cmis:propertyId propertyDefinitionId="cmis:par
                          </cmis:properties>
                         </cmisra:object>
                         <cmisra:pathSegment>Projects</cmisra:pathSegment>
Links!
Folder Tree Navigation
•  Can be achieved through queries!
  •     Specifying attributes means you can pull back less data!
  •     Can also apply criteria!

•  Atom entries also feature links including:!
  •     children (immediate)!
       •    <link rel=”down” href=”http://cmis.alfresco. com:80/service/cmis/s/
            workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/
            children” type=”application/atom+xml;type=feed”/> !
Links!
Folder Tree Navigation
•  Atom entries links also including:!
  •     descendants (note type is cmistree)
       •    <link rel=”down” href=”http://cmis.alfresco. com:80/service/cmis/s/
            workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/
            descendants” type=”application/cmistree+xml”/> !


  •     tree
       •    <link rel=”http://docs.oasis-open.org/ns/cmis/ link/200908/
            foldertree” href=”http://cmis.alfresco. com:80/service/cmis/s/
            workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/tree”
            type=”application/atom+xml;type=feed”/> !


  •     Can apply depth control to these two!
Enough Theory?!
Application styles: Document Management!
Simple repository client
  •  First phase provided browse-search-retrieve!
  •  Intended for mobile usage (as featured in Alfresco 3 Business
     Solutions by Martin Bergljung of Ixxus)!
  •  Uses an in-house roll your own Grails CMIS plugin!
  •  Authenticates users against Alfresco!
Application styles: Document Management!
Simple repository client
Application styles: Web Content!

Blurb-style WCM
  •  Featured in!
    •    Code requested by NASA !
  •  Taglib to embed identified
     content!
    •    Backed by a service!
  •  Uses OpenCMIS!
  •  Application level
     credentials!
Application styles: Web Content!
Associated documents
  •  Web applications commonly have a
     need for associated documents!
    •     E.g. case studies!
  •  This can be achieved by linking a
     record to an Alfresco node reference!
    •     To zero to many documents!
    •     Or a folder!
  •  An application built for one customer
     featured a folder picker for the admins!
    •     Built as a taglib using AJAX with jQuery
          and jQuery UI components:!
         •    dialog!
         •    treeview + treeview.async!
CMIS clients!

Roll your own                              OpenCMIS
  •  Easy with
                              •  Java CMIS client and server
                                                libraries!
    •    Commons HttpClient!                 •  Part of!
    •    XmlSlurper / GPath!                   •    Graduated from incubator in
    •    MarkupBuilder!                             February!
  •  Can add caching in Grails                 •    Currently at version 0.5!
     using Spring Modules                    •  Provides session-level
     Caching!                                   caching!
  •  Flexible!                               •  Used by Alfresco!
    •    Can easily get alf:icon etc.!       •  Doesnʼt support Alfresco
  •  Arguably higher                            CMIS extensions*!
     maintenance!
    •    Minimal changes from
         3.1.1/3.2  3.3/3.4 and then to
         4.0!
Practicalities: Alfresco CMIS extensions!
Aspects
  •  Alfresco uses the CMIS extension mechanism to allow for usage of
     Aspects!
    •    E.g.!
           <alf:aspects>
            <alf:appliedAspects>P:cm:titled</alf:appliedAspects>
            <alf:properties>
             <cmis:propertyString propertyDefinitionId="cm:description"
           displayName="Description" queryName="cm:description">
              <cmis:value></cmis:value></cmis:propertyString>
             <cmis:propertyString propertyDefinitionId="cm:title" displayName="Title"
           queryName="cm:title">
              <cmis:value></cmis:value></cmis:propertyString>
            </alf:properties>
           </alf:aspects>
  •  There is also an Alfresco OpenCMIS Extension!
    •    http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/ !
    •    Custom aspect-aware ObjectFactory implementation!
    •    0.2 POM depends on OpenCMIS Client Impl 0.3!
Practicalities: Performance!
Tips
  •  Filter!
   •  Donʼt ask for more data than you need!
     •    Specify columns on queries (the wildcard is lazy)!
     •    Use the OperationContext filter!

  •  Cache!
   •  Donʼt repeat yourself requests!
     •    Use OpenCMIS session-level caching!
     •    Use Spring Modules application level caching if appropriate!
     •    Consider reverse proxy caches such as Varnish!

  •  Compress!
   •  Donʼt waste bandwidth!
     •    Compress the XML data types if the clients can handle it

          (see http://wiki.alfresco.com/wiki/CMIS#Compression) !
Time to crack open the code!
Grails OpenCMIS Plugin!
 •  What happened to it?!
  •  I jokingly blame Marc Palmer and his advice to plugin authors…!
    •     Distilled guidance: “Make it work, make it simple, make it magic”!
    •     Though he didnʼt want people to not put a 0.1 out there!
  •  But in reality the sponsoring project got delayed!
 •  So what magic is being considered for the road map?!
  •  Content-centric DSL !
    •     Primarily around OpenCMIS API!
  •  GORM domain mapWith / mapping magic!
    •     Could join the data mapping project as datastore-cmis!
    •     static mapWith = “cmis”
    •     Dynamic finders / criteria could use CMIS QL!
    •     But need to work out how feasible associative documents are!
         •    E.g. only persist certain properties to CMIS

              byte[] document
              static mapping = { document mapWith:’cmis’ }
  •  Plus taglibs, service, implementing the Alfresco extensions as a
     child plugin etc.!
Alternative Plugins!

Other possible solutions
 •  Plugins that use the RivetLogic APIs!
   • http://www.grails.org/plugin/alfresco!
     •    Last release 0.4 for Grails 1.1.1 in Feb 2010!
     •    Bundles old Alfresco core/repository jars and CMA 1.11!


   • https://github.com/fix/grails-alfresco-plugin - uses Remote Access API rivet !

   • RivetLogicʼs Crafter rivet for Grails!
     •    June 2010!

 •  GORM JCR datastore!
   • Had dependencies on Jackrabbit!
Twitter: @rbramley

 GitHub: https://github.com/rbramley 

Blog: http://leanjavaengineering.com/ 

     Web: http://www.ixxus.com !

More Related Content

What's hot

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 
Riding rails for 10 years
Riding rails for 10 yearsRiding rails for 10 years
Riding rails for 10 years
jduff
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
Wen-Tien Chang
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance Tuning
Christian Posta
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 

What's hot (20)

CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Riding rails for 10 years
Riding rails for 10 yearsRiding rails for 10 years
Riding rails for 10 years
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
Hey My Web App is Slow Where is the Problem
Hey My Web App is Slow Where is the ProblemHey My Web App is Slow Where is the Problem
Hey My Web App is Slow Where is the Problem
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
4 JVM Web Frameworks
4 JVM Web Frameworks4 JVM Web Frameworks
4 JVM Web Frameworks
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance Tuning
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 

Similar to PLAT-16 Using Enterprise Content in Grails

Similar to PLAT-16 Using Enterprise Content in Grails (20)

Tech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupalTech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupal
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Tech talk live alfresco cmis
Tech talk live alfresco cmisTech talk live alfresco cmis
Tech talk live alfresco cmis
 
PLAT-17 Alfresco iOS Mobile Application Details and Design
PLAT-17 Alfresco iOS Mobile Application Details and DesignPLAT-17 Alfresco iOS Mobile Application Details and Design
PLAT-17 Alfresco iOS Mobile Application Details and Design
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Oracle APEX Nitro
Oracle APEX NitroOracle APEX Nitro
Oracle APEX Nitro
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web Performance
 
T3 - Deploy, manage, and scale your apps
T3 - Deploy, manage, and scale your appsT3 - Deploy, manage, and scale your apps
T3 - Deploy, manage, and scale your apps
 
PLAT-3 CMIS — What’s coming next?
PLAT-3 CMIS — What’s coming next?PLAT-3 CMIS — What’s coming next?
PLAT-3 CMIS — What’s coming next?
 

More from Alfresco Software

More from Alfresco Software (20)

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossier
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management application
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of Alfresco
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest API
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

PLAT-16 Using Enterprise Content in Grails

  • 1. Using Enterprise Content in Grails! Robin Bramley, Ixxus!
  • 2. Agenda! •  Who I am! •  Setting the scene! •  Grails! •  CMIS! •  Sample application styles! •  Document Management! •  Managed web content! •  CMIS clients! •  Roll your own! •  OpenCMIS! •  Practicalities! •  Alfresco extensions to CMIS! •  Performance! •  Grails OpenCMIS Plugin! •  Alternatives!
  • 3. My Background! •  Senior Architect @ Ixxus! •  The UK Platinum partner! •  Worked at consultancies for 13 years! •  Developing solutions with Alfresco since 0.6! •  First UK Alfresco Gold partner! •  Around the edges I also write! •  GroovyMag author – inc. 4 hands-on Grails articles! •  DZone Most Valuable Blogger! •  Re-published my series on Grails & Hudson / Jenkins! •  Open source contributions! •  OpenID support for Acegi / Spring Security! •  Codenarc support for Hudson / Jenkins CI Violations plugin! •  Presented at the London GGUG!
  • 4. Grails! •  Full-stack web framework! •  Embedded Tomcat & database! •  Allows for rapid development! •  > grails create-application test •  > cd test •  > grails run-app •  Scaffolding from domain classes! •  Convention over configuration! •  Builds on the shoulders of Giants! •  Groovy! •  Spring Framework! •  Spring MVC! •  Hibernate! •  Rich plugin ecosystem! •  Backed by SpringSource!
  • 5. CMIS! Content Management Interoperability Services standard! • Open standard published by OASIS! •  Version 1.0 – 1st May 2010! •  Alfresco 3.3 was first CMIS 1.0 compliant product launched! • ʻSQL for contentʼ! •  Query language! •  Virtual tables! •  Folder! •  Document! •  Relationship! •  Policy! • Bindings (ʻJDBC/ODBC equivalentʼ)! •  REST / AtomPub! •  SOAP Web Services! •  Browser binding in CMIS 1.1!
  • 6. Documents & Folders! Document Folder •  Has a set of metadata •  Has a set of metadata properties ! properties! •  Columns! •  Can have zero or more •  Custom extensions! children! •  May have a content stream •  Documents or Folders! (e.g. an actual file)! •  May have renditions!
  • 7. CMIS Repository Information ! Service Document •  3.x CMIS AtomPub binding: /alfresco/service/cmis •  4.x CMIS AtomPub binding: /alfresco/cmisatom <cmisra:repositoryInfo> <cmis:repositoryId>ea9c2b9e-2892-4370-8791-4b0049f917f3</cmis:repositoryId> <cmis:repositoryName>Main Repository</cmis:repositoryName> <cmis:repositoryDescription>Main Repository</cmis:repositoryDescription> <cmis:vendorName>Alfresco</cmis:vendorName> <cmis:productName>Alfresco Repository (Community)</cmis:productName> <cmis:productVersion>4.0.0 (a 3755)</cmis:productVersion> <cmis:rootFolderId>workspace://SpacesStore/784b5b19-61ee-4963-a367- db6164ed43af</cmis:rootFolderId>
  • 8. CMIS Query Syntax! SQL like •  Subset of SQL-92 with some extensions ! •  SELECT * FROM cmis:document •  SELECT * FROM cmis:folder WHERE IN_FOLDER(‘folder-id’) •  SELECT * FROM cmis:document WHERE IN_TREE(‘folder-id’) •  SELECT cmis:objectId, cmis:name, cmis:contentStreamLength FROM cmis:DOCUMENT WHERE contains(‘fox’) OR cmis:name like ‘%fox%’ •  The complete BNF grammar is included in the specification at 
 http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec- v1.0.html#_Toc243905422 !
  • 9. CMIS Query Submission! •  Queries are submitted by POSTing application/cmisquery+xml •  Accepted response format e.g. application/atom+xml;type=feed <cmis:query xmlns:cmis=’http://docs.oasis-open.org/ns/cmis/core/200908/’> <cmis:statement>SELECT * FROM cmis:document</cmis:statement> <cmis:searchAllVersions>false</cmis:searchAllVersions> <cmis:includeAllowableActions>false<cmis:includeAllowableActions> <cmis:includeRelationships>none</cmis:includeRelationships> <cmis:renditionFilter>*</cmis:renditionFilter> <cmis:maxItems>-1</cmis:maxItems> <cmis:pageSize>-1</cmis:pageSize> <cmis:skipCount>0</cmis:skipCount> </cmis:query>
  • 11. Atom response – feed metadata! <author><name>System</name></author> <generator version="4.0.0">Alfresco</generator> <icon>http://localhost:8080/alfresco/images/logo/ <id>urn:uuid:784b5b19-61ee-4963-a367-db6164ed43af <title>Company Home Children</title> <updated>2011-11-01T18:54:14.541Z</updated> <opensearch:totalResults>5</opensearch:totalResul <opensearch:startIndex>0</opensearch:startIndex> <opensearch:itemsPerPage>-1</opensearch:itemsPerP <cmisra:numItems>5</cmisra:numItems>
  • 12. Atom response – entry! <author><name>admin</name></author> <content src="http://localhost:8080/alfresco/serv <published>2011-11-01T18:54:14.529Z</published> <summary></summary> <title>Projects</title> <updated>2011-11-01T18:54:38.831Z</updated> <app:edited>2011-11-01T18:54:38.831Z</app:edited> <alf:icon>http://localhost:8080/alfresco/images/i <cmisra:object> <cmis:properties> <cmis:propertyId propertyDefinitionId="cmis:all <cmis:propertyId propertyDefinitionId="cmis:obj <cmis:propertyString propertyDefinitionId="cmis <cmis:propertyString propertyDefinitionId="cmis <cmis:propertyDateTime propertyDefinitionId="cm <cmis:propertyString propertyDefinitionId="cmis <cmis:propertyString propertyDefinitionId="cmis <cmis:propertyId propertyDefinitionId="cmis:obj <cmis:propertyDateTime propertyDefinitionId="cm <cmis:propertyId propertyDefinitionId="cmis:par </cmis:properties> </cmisra:object> <cmisra:pathSegment>Projects</cmisra:pathSegment>
  • 13. Links! Folder Tree Navigation •  Can be achieved through queries! •  Specifying attributes means you can pull back less data! •  Can also apply criteria! •  Atom entries also feature links including:! •  children (immediate)! •  <link rel=”down” href=”http://cmis.alfresco. com:80/service/cmis/s/ workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/ children” type=”application/atom+xml;type=feed”/> !
  • 14. Links! Folder Tree Navigation •  Atom entries links also including:! •  descendants (note type is cmistree) •  <link rel=”down” href=”http://cmis.alfresco. com:80/service/cmis/s/ workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/ descendants” type=”application/cmistree+xml”/> ! •  tree •  <link rel=”http://docs.oasis-open.org/ns/cmis/ link/200908/ foldertree” href=”http://cmis.alfresco. com:80/service/cmis/s/ workspace:SpacesStore/ i/2dfb66de-9cb5-4e60-a786-5ea2ad8740d6/tree” type=”application/atom+xml;type=feed”/> ! •  Can apply depth control to these two!
  • 16. Application styles: Document Management! Simple repository client •  First phase provided browse-search-retrieve! •  Intended for mobile usage (as featured in Alfresco 3 Business Solutions by Martin Bergljung of Ixxus)! •  Uses an in-house roll your own Grails CMIS plugin! •  Authenticates users against Alfresco!
  • 17. Application styles: Document Management! Simple repository client
  • 18. Application styles: Web Content! Blurb-style WCM •  Featured in! •  Code requested by NASA ! •  Taglib to embed identified content! •  Backed by a service! •  Uses OpenCMIS! •  Application level credentials!
  • 19. Application styles: Web Content! Associated documents •  Web applications commonly have a need for associated documents! •  E.g. case studies! •  This can be achieved by linking a record to an Alfresco node reference! •  To zero to many documents! •  Or a folder! •  An application built for one customer featured a folder picker for the admins! •  Built as a taglib using AJAX with jQuery and jQuery UI components:! •  dialog! •  treeview + treeview.async!
  • 20. CMIS clients! Roll your own OpenCMIS •  Easy with
 •  Java CMIS client and server libraries! •  Commons HttpClient! •  Part of! •  XmlSlurper / GPath! •  Graduated from incubator in •  MarkupBuilder! February! •  Can add caching in Grails •  Currently at version 0.5! using Spring Modules •  Provides session-level Caching! caching! •  Flexible! •  Used by Alfresco! •  Can easily get alf:icon etc.! •  Doesnʼt support Alfresco •  Arguably higher CMIS extensions*! maintenance! •  Minimal changes from 3.1.1/3.2  3.3/3.4 and then to 4.0!
  • 21. Practicalities: Alfresco CMIS extensions! Aspects •  Alfresco uses the CMIS extension mechanism to allow for usage of Aspects! •  E.g.! <alf:aspects> <alf:appliedAspects>P:cm:titled</alf:appliedAspects> <alf:properties> <cmis:propertyString propertyDefinitionId="cm:description" displayName="Description" queryName="cm:description"> <cmis:value></cmis:value></cmis:propertyString> <cmis:propertyString propertyDefinitionId="cm:title" displayName="Title" queryName="cm:title"> <cmis:value></cmis:value></cmis:propertyString> </alf:properties> </alf:aspects> •  There is also an Alfresco OpenCMIS Extension! •  http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/ ! •  Custom aspect-aware ObjectFactory implementation! •  0.2 POM depends on OpenCMIS Client Impl 0.3!
  • 22. Practicalities: Performance! Tips •  Filter! •  Donʼt ask for more data than you need! •  Specify columns on queries (the wildcard is lazy)! •  Use the OperationContext filter! •  Cache! •  Donʼt repeat yourself requests! •  Use OpenCMIS session-level caching! •  Use Spring Modules application level caching if appropriate! •  Consider reverse proxy caches such as Varnish! •  Compress! •  Donʼt waste bandwidth! •  Compress the XML data types if the clients can handle it
 (see http://wiki.alfresco.com/wiki/CMIS#Compression) !
  • 23. Time to crack open the code!
  • 24. Grails OpenCMIS Plugin! •  What happened to it?! •  I jokingly blame Marc Palmer and his advice to plugin authors…! •  Distilled guidance: “Make it work, make it simple, make it magic”! •  Though he didnʼt want people to not put a 0.1 out there! •  But in reality the sponsoring project got delayed! •  So what magic is being considered for the road map?! •  Content-centric DSL ! •  Primarily around OpenCMIS API! •  GORM domain mapWith / mapping magic! •  Could join the data mapping project as datastore-cmis! •  static mapWith = “cmis” •  Dynamic finders / criteria could use CMIS QL! •  But need to work out how feasible associative documents are! •  E.g. only persist certain properties to CMIS
 byte[] document static mapping = { document mapWith:’cmis’ } •  Plus taglibs, service, implementing the Alfresco extensions as a child plugin etc.!
  • 25. Alternative Plugins! Other possible solutions •  Plugins that use the RivetLogic APIs! • http://www.grails.org/plugin/alfresco! •  Last release 0.4 for Grails 1.1.1 in Feb 2010! •  Bundles old Alfresco core/repository jars and CMA 1.11! • https://github.com/fix/grails-alfresco-plugin - uses Remote Access API rivet ! • RivetLogicʼs Crafter rivet for Grails! •  June 2010! •  GORM JCR datastore! • Had dependencies on Jackrabbit!
  • 26. Twitter: @rbramley
 GitHub: https://github.com/rbramley 
 Blog: http://leanjavaengineering.com/ 
 Web: http://www.ixxus.com !