intro to alfresco for developers

33
A Developer’s Intro to the Alfresco Platform JBoss World 2011

Upload: jeff-potts

Post on 08-May-2015

7.942 views

Category:

Technology


2 download

DESCRIPTION

Extremely high-level overview of some of the major components and sub-systems of the Alfresco platform for content management. Delivered to the Red Hat Summit/JBoss World Campground session on 5/4/2011.

TRANSCRIPT

Page 1: Intro to Alfresco for Developers

A Developer’s Intro to the Alfresco Platform

JBoss World 2011

Page 2: Intro to Alfresco for Developers

Agenda

• Extremely High-Level Alfresco Overview• Alfresco Architecture• Alfresco Development Model• Alfresco User Interface• Alfresco App Examples

Page 3: Intro to Alfresco for Developers

EXTREMELY HIGH-LEVEL OVERVIEW

source: flyfshrmn98

Page 4: Intro to Alfresco for Developers

Alfresco Overview

• Alfresco is an Enterprise Content Management platform• Can manage any kind of file• Stores the file and metadata about

the fileo Metadata model is extensible

• All content and metadata is searchable• Files can be secured to specific users

and groups

Page 5: Intro to Alfresco for Developers

Alfresco Overview (Cont’d)

• Provides versioning and check-in/check-out• Has a built-in workflow engine• Can be accessed through a browser

or from desktop applications via CIFS, WebDAV, FTP, IMAP, etc.• Community Edition (Community

supported)• Enterprise Edition (Alfresco

supported for a paid subscription)

Page 6: Intro to Alfresco for Developers

Origins

• Founded in 2005o John Newton• Founding developer of Ingres• Co-founded Documentum

o John Powell• COO of Business Objects• President of Oracle UK

o Lots of Engineers from Documentum, Interwoven, Vignette

• Assembled from Open Source components

Page 7: Intro to Alfresco for Developers

Core Products

• Repository• Explorer Client• Share Client• Web Content Management• Records Management

Page 8: Intro to Alfresco for Developers

Add-ons

• WCM QuickStart• Sharepoint integration• Google Docs integration• Facebook integration• Plus many add-ons and extensions available from

the communityo Alfresco Forgeo Google Codeo Githubo Alfresco Wikio Alfresco Community Committer Program

(ACCP)

Page 9: Intro to Alfresco for Developers

What can I do with it?

• Out-of-the-boxo Document Managemento Web Content Managemento Team/Project Collaborationo Records Managemento Imaging/Digital Asset Managemento Sharepoint Replacement

• Custom content-centric applicationso Lots of options hereo API’s discussed later

Source: craig rodway

Page 10: Intro to Alfresco for Developers

Obtaining Alfresco

• Requirementso An operating system that can run Javao A servlet container such as Tomcat or JBosso A Hibernate-compliant database

• Where to get ito Alfresco home pageo Public SVN for Community sourceo Alfresco Customer/Partner site for Enterprise

binarieso Private SVN for Enterprise source

Page 11: Intro to Alfresco for Developers

Obtaining Alfresco (cont’d)

• Distributiono Repository (bundled with Tomcat or WAR-only)

• Includes Alfresco Explorer and Alfresco Share

o SDKo WCM add-ono WCM FSR deployment processo Source includes all of the above

Page 12: Intro to Alfresco for Developers

Installing Alfresco

• Alfresco deploys as a web application

• Alfresco-Tomcat bundleo Unzip, update the startup script (if needed) and

runo If no specific database is provided, an

embedded database will be used

• Alfresco WAR fileo Deploys like any other WARo By default, looks for MySQL db alfresco/alfresco

Page 13: Intro to Alfresco for Developers

ALFRESCO ARCHITECTURE

source: phil romans

Page 14: Intro to Alfresco for Developers

High-level Architecture

Plus:• IMAP• SharePoint

Page 15: Intro to Alfresco for Developers

High-level Custom Front-End

AlfrescoSurfDrupal

Page 16: Intro to Alfresco for Developers

Spring Surf Framework

Page 17: Intro to Alfresco for Developers

Spring Surf’s Two-Tier MVC Architecture

Presentation Tier

Repository Tier

Spring

Connectors

REST

Web Scripts

FreeMarker

Dis

pa

tcher

Surf

Model Objects

PagesTemplates

ComponentsThemes

Associations

JSON

Web Scripts

RepositoryCMIS

SocialUI

JSON

Content Graph

DocumentsFoldersAssociationsAspects

Page 18: Intro to Alfresco for Developers

The Beauty of

?

Presentation Tier

Content Services Tier

?Enterprise Apps Tier

Fast, flexible, modular user interface

Open, scalable repository, metadata, versioning, workflow

REST SOAP

Page 19: Intro to Alfresco for Developers

Major Sub-systems

• Authentication• Workflow

o JBoss jBPM• Scheduler• Auditing• Renditions

o ImageMagicko OpenOffice

• Email

Page 20: Intro to Alfresco for Developers

HIGH-LEVEL DEVELOPMENT MODEL

Sou

rce:

thom

as

haw

k

Page 21: Intro to Alfresco for Developers

Data Modeling

• Repository is a collection of nodes• Everything is a node, nodes are

typed• Content Model is expressed in XML

o Cold-deploy most common, hot deploy possible

• Types, aspects, properties, associations, constraints• Hierarchical

o Types inherit from super types

Page 22: Intro to Alfresco for Developers

Forms/UI Config

• Forms are modeled in XML• Form Service

o Processes and persists form datao Filters for intercepting form data before and

after form submito RESTful API for retrieving form model as JSON

Page 23: Intro to Alfresco for Developers

Form Config Example

<field id=”sc:itemShortDescription" label-id="label.shortDescription" description-id="description.shortDescription" set="header" mandatory="true”> <control template="controls/textfield.ftl”> <control-param name="maxLength">100</control-param> </control></field>

<field id=”sc:itemSku" label-id="label.sku" description-id="description.sku" set="header" />

<field id=”sc:solutionSections" label-id="label.solutionSections” description-id="description.solutionSections" set="sections”> <control template="/org/alfresco/components/form/controls/sc-association.ftl”> <control-param name="showTargetLink">true</control-param> <control-param name="allowOtherAssocs">false</control-param> </control></field>

Page 24: Intro to Alfresco for Developers

Queries

• Alfresco isn't relational• Lucene• CMIS queries (SQL-like)• Xpath• Apache Solr Coming Soon!

SQL

Page 25: Intro to Alfresco for Developers

Security - Authentication

• Spring Security Framework (ACEGI) under the covers• Alfresco can handle it or pass it off to

others• ActiveDirectory• LDAP• Kerberos• NTLM• SSO• Custom

Source: roo reynolds

Page 26: Intro to Alfresco for Developers

Security - Authorization

• Users & Groups• Access Control Lists• Permissions• Hierarchical

Page 27: Intro to Alfresco for Developers

What is the Web Script Framework?

• Web Script Framework used to declare a URL, bind it to logic, provide viewso Model-View-Controller patterno Controller implemented in JavaScript or Javao Views implemented in FreeMarker

• Deployed to the repository or the classpath• Part of the Spring Surf Project

http://springsurf.org/

Page 28: Intro to Alfresco for Developers

What is Spring Surf?

• Web application development framework built on web scripts• Essentially web scripts++

o Page definitiono Declarative handshakes to HTTP end pointso Page, page type, and object dispatching

• Includes built-in hooks for talking to Alfresco and loading objects from the repository

Page 29: Intro to Alfresco for Developers

What is CMIS?

• OASIS standardo Alfresco, IBM, Microsoft, Oracle, FileNet supporto Alfresco was first to production with CMIS

• Two partso Interoperability through standard SOAP and

Atom Pub bindingso SQL-based query language for rich content

repositories

• New JSON binding coming soon

Page 30: Intro to Alfresco for Developers

What is CMIS? (Cont’d)

• Think of it as a language-independent, repository-independent API for content managemento CRUD functions for nodeso Check-in/check-outo Associationso Permissions (Access Control Lists)o Policieso Querieso Repository traversal

Page 31: Intro to Alfresco for Developers

Demo/Code

Page 32: Intro to Alfresco for Developers

For More Information…

• Alfresco Communityo http://www.alfresco.org

• Alfresco Forumso http://forums.alfresco.com

• Alfresco Wikio http://wiki.alfresco.com

• Alfresco Blogrollo http://blogs.alfresco.com/planet/

• ECM Architecto http://ecmarchitect.com

Page 33: Intro to Alfresco for Developers

THANK YOU!Tweet me with questions/feedback @jeffpotts01