elements developing applications

Upload: odiseo-py

Post on 03-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Elements Developing Applications

    1/9

    Alfresco Elements

    Developing Applications

  • 7/29/2019 Elements Developing Applications

    2/9

    2 Alfresco Elements

    Contents

    Document information.............................................................................................................. 3

    Developing applications........................................................................................................... 4

  • 7/29/2019 Elements Developing Applications

    3/9

    Document information

    Developing Applications 3

    Document information

    Information in this document is subject to change without notice. No part of this documentmay be reproduced or transmitted in any form or by any means, electronic or mechanical,for any purpose, without the express written permission of Alfresco. The trademarks,service marks, logos, or other intellectual property rights or Alfresco and others used in this

    documentation("Trademarks") are the property of Alfresco and their respective owners. Thefurnishing of this document does not give you license to these patents, trademarks, copyrights orother intellectual property except as expressly provided in any written agreement with Alfresco.

    The United States export control laws and regulations, including the Export AdministrationRegulations of the U.S. Department of Commerce, and other applicable laws and regulationsapply to this documentation which prohibit the export or re-export of content, products, services,and technology to certain countries and persons. You agree to comply with all export laws,regulations and restrictions of the United States and any foreign agency or authority and assumesole responsibility for any such unauthorized exportation.

    You may not use this documentation if you are a competitor of Alfresco, except with Alfresco'sprior written consent. In addition, you may not use the documentation for purposes of evaluatingits functionality or for any competitive purposes.

    If you need technical support for this product, contact Customer Support by email [email protected]. If you have comments or suggestions about this documentation, contactus at [email protected].

  • 7/29/2019 Elements Developing Applications

    4/9

    Developing applications

    4 Alfresco Elements

    Developing applications

    Introduction

    The Alfresco product provides several out-of-the-box applications that interact with the coreAlfresco repository through well-defined interfaces and services. These applications provideinteraction with content and business logic from the repository to deliver solutions for Enterprise

    Content Management, such as Document Management, Records Management, and WebContent Services.

    The product suite leverages open standards and well-understood service interfaces to providevaluable options for customization and extension. In this section we focus on the extension pointsand on how they are commonly used to build custom integrations and solutions.

    As such this acts as a precursor to the Alfresco development courses where you will learn moreabout these topics.

    This Alfresco Element will explore the different approaches to application development, help youto decide on a good application development approach, examine the different APIs available and

    access and leverage the source code.Extending and customizing

    Alfresco offers a range of ways to extend or customize the system, when you get to repositorypolicies you are looking at moving towards a customization approach, indeed even implementingcontent models requires some additional effort for the user interface which may arguably calledcustomization.

    Ultimately you can of course go directly to the source code of an open source product likeAlfresco. But this is not recommended unless you never want to upgrade.

    Development environment

    The choice of development languages to use is yours.

    You can use various frontends to access Alfresco; such as Liferay and Drupal and do yourdevelopment work in those systems if this is your preferred platform.

    There are many development tools which you can use in conjunction with Alfresco the mostcommonly used one being the Eclipse IDE.

    Whatever your choice there will be some way to integrate. Some interfaces are more welldeveloped and supported than others, for instance support for PHP is available but rudimentary.Alfresco is written in Java and there is excellent support for both Java and JavaScript, with thisbeing the choice of many Alfresco developers.

  • 7/29/2019 Elements Developing Applications

    5/9

    Developing applications

    Developing Applications 5

    Alfresco also makes extensive use of frameworks such as Spring, Spring Surf, YUI Library (theYahoo User Interface) as well as other existing Open Source technologies and projects such asSolr and Quartz.

    The architecture of Alfresco was explored in the architecture and technologies Alfresco Element.Lets know explore the integration points and widely used interfaces.

    Interfaces for Share

    As Share is used as the primary user interface by such a large number of people we focus on thisfirst.

    Share is built on the Spring Surf framework and this framework is available to you. Theframework in turn provides connectors for accessing the repository through a Web Scripts basedREST style interface.

    Recently the CMIS standard has been ratified and Alfresco provides a compliant CMISinterface which can be used as Web Scripts or through SOAP. The extended superset of CMIS,OpenCMIS, (part of the Apache Chemistry project) is available through client side Java APIs.

    User interface development

    When you need to undertake user interface development you have a number of options.

    You can write your own interface to Alfresco in your preferred development environment andthen use the appropriate connector for that environment. This approach gives you the mostflexibility allowing you to build a user interface which completely matches your needs in whatevertechnology you want. Using this approach, people have developed user interface applications forAlfresco based on Adobe Air and for the Apple iPhone to name but two. This is also the approachyou would use if you wanted to integrate in another different front-end for example a portal suchas Liferay or Drupal. With this approach you can develop both thin and thick client applications.

  • 7/29/2019 Elements Developing Applications

    6/9

    Developing applications

    6 Alfresco Elements

    The second approach uses the Spring Surf framework, this framework was created by Alfrescofor developing model-view-controller (MVC) type web applications and works very well withAlfresco. This provides some structure for your application and eases the programmingdevelopment burden.

    Finally you can take the Share user interface, which itself is built on Surf, and customize thisinterface to your requirements. Using this approach can get you further more quickly becauseyou can use the work which Alfresco has already put into the user interface. You can take what

    we provide and extend and tailor to your own requirements. Whilst there is a lot you can do usingthis approach you are ultimately restricted to the overall look and feel and structure which Shareimposes.

  • 7/29/2019 Elements Developing Applications

    7/9

    Developing applications

    Developing Applications 7

    Server side development

    On the server side you also have some development options, the one most commonly used,is the addition of content models into the server. The second way of extending the server is byadding process or workflow definitions using Activiti.

    The server also has a mechanism whereby you can extend its behavior through policies. This isdone by using Java and a JavaScript API is also available server side which can be used withinworkflows, for example.

  • 7/29/2019 Elements Developing Applications

    8/9

    Developing applications

    8 Alfresco Elements

    Alfresco Public API

    The Alfresco public API allows developers to create custom applications (desktop, mobile, orcloud) that persists content to Alfresco in the Cloud. The API includes CMIS and some AlfrescoREST calls where CMIS does not provide the functionality.

    Any kind of application can be written which also affords integration with applications in the cloud.

    This requires registration at this address: http://developer.alfresco.com

    Once registered you can add applications to your profile. Each application has a uniqueauthentication key and a secret. OAuth2 is used to handle authentication.

    Presently this is restricted to Alfresco in the cloud, however integration to on-premise AlfrescoEnterprise will come soon.

  • 7/29/2019 Elements Developing Applications

    9/9

    Developing applications

    Developing Applications 9

    Source code

    Whilst it is only the Community Edition source code which is available to you, this code is updatedwith bug fixes from the Enterprise Edition. The Community Edition runs ahead of the EnterpriseEdition in terms of new features and functionality.

    The Alfresco Community source code is stored in a Subversion repository. For more informationsee these two links.

    http://wiki.alfresco.com/wiki/Source_Code

    http://wiki.alfresco.com/wiki/Development_Environment