Flex   alfresco
Upcoming SlideShare
Loading in...5

Flex alfresco






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Flex   alfresco Flex alfresco Presentation Transcript

  • MTC3 Flex – Alfresco Integration Case Study
  • Flex - Alfresco • Goal : provide a Flex-based client to access Alfresco content repository • Why: • Improve user experience by delivering an easily cutomizable and highly-interactive interface • Seemless integration in the user desktop • Cross-platform • How : • First approach uses custom Java services • Second one uses Alfresco WebScripts (REST)
  • Standard Alfresco Architecture Web Browser Alfresco Server Web client application Alfresco Repository Storage File DB System
  • 1 Flex / Alfresco Architecture Flex Client AMF / HTTP Alfresco Server LiveCycle Data Services Service Service Alfresco Repository Foundation API Storage File DB System
  • 1 Flex client Flex Client • Implemented using the Cairngorm micro-architecture • Uses serializable ActionScript objects (DTOs) that hold document meta-data • Access Java service through a RemoteObject (async RPC) • Borrows several components from the Flex community (multiple file upload, searchbox, …)
  • 1 Serialization • LiveCycle Data Services is Adobe server-side component that allows communication between Flex client and Java application • Java serializable pojos are mapped to ActionScript objects (using annotations in ActionScript) • Serialization mechanism uses the AMF over HTTP protocol (binary) • Flex RemoteObject access Java services (pojos) using configured destinations in LC DS • In the future : replace the LiveCycle DS component with Adobe BlazeDS open-source alternative
  • 1 Java services • Java services • Are just plain java objects • Use the Alfresco Foundation API to authenticate and manipulate the repository (store, create, search documents) • Can access services and beans defined in Spring • A Java Adapter has been created to : demarcate transaction on operations annotated with Spring Transaction annotation re-authenticate user on each subsequent service request (using the initial ticket returned by the authentication process)
  • 2 Flex / Alfresco Architecture Flex Client HTTP Alfresco Server Alfresco Repository Web script Create and publish Web Script Platform Foundation API Storage File DB System
  • 2 Flex / Alfresco • Flex client • Uses HTTPService instead of RemoteObject • Web Scripts • Are written in JavaScript • Can be registered at runtime • Can return HTML, ATOM, XML, RSS, JSON, CSV, … (using Freemarker templates) • LiveCycle Data Services and custom Java services are no longer needed
  • Comparison • First version • - More complex deployment (LC Data Services, custom Java services) • - Less productive : must maintain DTOs in Java/AS and Java services each service change requires re-deployment / server restart • + More efficient • Requires knowledge of Flex, Java and Alfresco Foundation API • Second version • + Easily deployable (no server-side component) • + Quickly implemented using JavaScript • - hard to debug JavaScript (logging required) • - Restricted to the functions exposed by the JavaScript engine unless … • + Can be implemented in Java to have access to the Foundation API • Requires knowledge of Flex, JavaScript (basic), Alfresco JavaScript API, Freemarker template
  • Conclusions • Several options to create an Alfresco client: • Protocols : FTP, WebDAV, CIFS • APIs: Web Services Web Scripts Custom solution that uses the Alfresco Foundation API directly • Next Step : create an AIR application to leverage integration with user’s desktop • Drag-n-Drop documents (inbound/outbound) • Access file system • Embedded SQL DB to provide ‘offline’ functions ? • Even further : a Silverlight / JavaFX client ?