How to start working with Alfresco (for developers)

/ / Blog, Digital Development en, Document Management
keensoft takes part in Alfresco Summit 2013
New edition of data integration course at CTA

Alfresco provides one of the most complete open source products for implementing Document Management in an organization.  There are two versions of the product: the licensed version (called Enterprise) and the free version (called Community). The Enterprise version is recommended for organizations in which Document Management is their core work, while the Community version is used for test periods and for processes of adapting to the environment.

This article provides a rundown of the technologies required to begin developing using Alfresco in its version 4.

Development environment

  • Java 6.0 or above
  • Eclipse, NetBeans, IntelliJ IDEA…
  • Maven
    • Alfresco Maven SDK is the Maven work framework proposed by Alfresco from version 4.1 Enterprise and 4.2 Community onwards.
    • It enables component building to be integrated with Jetty to carry out unit testing or automatic integration tests
  • AMP
    • The components in Alfresco are not packaged in standard JEE formats (JAR, WAR, EAR…) but in a proprietary format called AMP
    • It is necessary to know the structure of these AMP packages to be able to carry out a development that extends the product’s own components without modifying them
  • Alfresco source code
    • The development of new functions often requires consulting the Alfresco source code, both to find examples of programming and to understand the operation of its different components
  • Community Edition of Alfresco
    • The default installation of Alfresco provides preconfigured software: Tomcat, Postgresql, LibreOffice, ImageMagick and Solr
    • In this software, applications for the Alfresco repository and for the Alfresco Share web client are deployed, although there are other optional applications such as integration with GoogleDocs and Sharepoint or the Web Quick Start content manager

 

Areas of development

Having prepared the environment we now need to review our knowledge of the different technologies in play in each of the areas of development of Alfresco:

  • Protocol configuration
    • There are many ways to access Alfresco contents (CIFS, WebDAV, FTP, IMAP, Microsoft Sharepoint) and each requires specific parameterization to adapt to the needs of each organization
  • Authentication subsystems
    • Users can be identified by username and password, by means of integration with an LDAP or Active Directory, accessing the services of a Windows domain, establishing an SSO session with Kerberos or developing an external identification system (such as CAS)
    • In all cases, specific parameterization of the Alfresco components or a custom development for integration with the native authentication of Alfresco NTLM is required.
  • Development in Alfresco (repository)
    • Alfresco Java Foundation API, allows access to all the native services via Java
    • JavaScript API, based on Rhino and executed in the server, allows object transfer operations between layers to be carried out
    • FreeMarker API, personalized for the creation of mail templates or content
    • Content Definition, available through XML for defining new types of content, aspects or associations
    • Workflow Definition, based on the standard Activiti BPM engine and available through XML
    • Webscripts, for creating REST services
    • Configuration and creation of beans via Spring Framework 3
  • Development in Alfresco Share
    • FreeMarker as a language for developing web pages, although at some points it is possible to develop components in JSP, HTML or Java
    • UI library that can be parametrized in XML for building web pages based on the data model
    • Rendering of pages in different formats
    • JavaScript library based on YUI 2 integrated with AJAX
    • Spring Surf as a framework for REST to access contents and remote authentication
    • Configuration and creation of beans via Spring Framework 3.0
  • Development in Alfresco Web Quick Start
    • The module for managing Alfresco web contents is based on the same technology as Alfresco Share
  • Development in Alfresco Records Management
    • The module for archiving is based on the same technology as Alfresco Share
    • It enables organization charts to be personalized and to carry out searches and specific actions in the Alfresco repository
  • Configuration of the Alfresco Workdesk
    • This is a new web interface on Alfresco, based on the configuration of business views on the repository
    • It is not designed for extension by programming, although new workflows can be incorporated by means of Activiti
    • It works on any CMIS repository, in fact, it can work on several at once
  • CMIS development
    • Alfresco is compatible with CMIS 1.0 and 1.1
    • It can be accessed via Atom or web services
    • The API of CMIS allows the integration of any application and access to all the functions of the repository
    • It is based on Apache Chemistry
  • Mobile Development
    • The source code of the application for Android is available in Android App
    • The source code of the application for iOS is available in iOS App
    • The CMIS API makes it easy to carry out native applications for mobile operating systems
  • Cloud development
    • Alfresco has a public REST API in the cloud for development of apps on Alfresco Cloud

Users must be registered in Alfresco Cloud

Resources

  • There are different open source addons that can be used as templates for projects or taken as examples of code
  • The source code of Alfresco is an indispensable reference element, both to decide how to address extensions and to learn the platform’s specific programming techniques
  • Alfresco official documentation, as a basic reference of the features available
  • Alfresco wiki , maintained by the community. A compendium of technical information that is somewhat chaotic, although useful in some areas
  • Alfresco forums, with a highly active community, is a must for solving problems (especially the English edition)
  • Alfresco developer’s blog, where the engineers write articles about new functions and features.

 

Starting to develop in Alfresco is no easy task as there are many areas to get to know and understand in order to feel at home on the platform. In addition, the product is constantly evolving and each new minor version includes a multitude of changes that directly affect the structure of the different applications. However, with time and experience it is possible to acquire the necessary skills to master all of the different areas and carry out successful custom developments of Alfresco.

 

Unidad de negocio, keensoft