Alfresco One 5.x Developer’s Guide - Second Edition
By Benjamin Chevallereau and Jeff Potts
3/5
()
About this ebook
- Create reliable and secure enterprise apps with the latest Alfresco One 5.x platform
- Explore all the latest Alfresco One 5.x APIs such as the CMIS API, Alfresco One API, and the integrated RESTful API to get more out of your enterprise apps
- Unleash the power of the latest JavaScript engine and the JavaScript API for Alfresco to customize your existing apps for the Alfresco 5 platform
If you’re an enterprise app developer who wants to create custom applications with Alfresco, then this book is for you. Previous knowledge with Alfresco would be helpful but is not necessary.
Related to Alfresco One 5.x Developer’s Guide - Second Edition
Related ebooks
Heroku Cloud Application Development Rating: 0 out of 5 stars0 ratingsBuilding Websites with VB.NET and DotNetNuke 4 Rating: 1 out of 5 stars1/5PHP 5 CMS Framework Development - 2nd Edition Rating: 0 out of 5 stars0 ratingsNode Web Development, Second Edition Rating: 0 out of 5 stars0 ratingsModernizing Legacy Applications in PHP Rating: 0 out of 5 stars0 ratingsAjax in Action Rating: 0 out of 5 stars0 ratingsImplementing Splunk - Second Edition Rating: 0 out of 5 stars0 ratingsMastering Eclipse Plug-in Development Rating: 0 out of 5 stars0 ratingsApplied Architecture Patterns on the Microsoft Platform Second Edition Rating: 0 out of 5 stars0 ratingsAlfresco Developer Guide Rating: 0 out of 5 stars0 ratingsDevOps with Windows Server 2016 Rating: 0 out of 5 stars0 ratingsNginx Troubleshooting Rating: 0 out of 5 stars0 ratingsMastering Symfony Rating: 0 out of 5 stars0 ratingsAlfresco 3 Cookbook Rating: 0 out of 5 stars0 ratingsAlfresco 3 Business Solutions Rating: 0 out of 5 stars0 ratingsSoftware architecture A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsNosql A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsNoSQL Databases A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsKubernetes A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsPractical OneOps Rating: 0 out of 5 stars0 ratingsJava Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsDevOps Tools Standard Requirements Rating: 0 out of 5 stars0 ratingsExtending Jenkins Rating: 0 out of 5 stars0 ratingsWildFly Cookbook Rating: 0 out of 5 stars0 ratingsKubernetes A Complete Guide Rating: 0 out of 5 stars0 ratingsMeteor Design Patterns Rating: 0 out of 5 stars0 ratingsApache Cordova in Action Rating: 0 out of 5 stars0 ratingsChaos Engineering A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsSonar Code Quality Testing Essentials Rating: 0 out of 5 stars0 ratings
Internet & Web For You
More Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 5 out of 5 stars5/5Wireless Hacking 101 Rating: 4 out of 5 stars4/5Coding For Dummies Rating: 5 out of 5 stars5/5Introduction to Internet Scams and Fraud: Credit Card Theft, Work-At-Home Scams and Lottery Scams Rating: 4 out of 5 stars4/5The Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5SEO For Dummies Rating: 4 out of 5 stars4/5How To Make Money Blogging: How I Replaced My Day-Job With My Blog and How You Can Start A Blog Today Rating: 4 out of 5 stars4/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5200+ Ways to Protect Your Privacy: Simple Ways to Prevent Hacks and Protect Your Privacy--On and Offline Rating: 0 out of 5 stars0 ratingsThe Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5The Internet Is Not What You Think It Is: A History, a Philosophy, a Warning Rating: 4 out of 5 stars4/5Podcasting For Dummies Rating: 4 out of 5 stars4/5How to Destroy Surveillance Capitalism Rating: 4 out of 5 stars4/5The Cyber Attack Survival Manual: Tools for Surviving Everything from Identity Theft to the Digital Apocalypse Rating: 0 out of 5 stars0 ratingsHow To Start A Podcast Rating: 4 out of 5 stars4/5
Reviews for Alfresco One 5.x Developer’s Guide - Second Edition
1 rating0 reviews
Book preview
Alfresco One 5.x Developer’s Guide - Second Edition - Benjamin Chevallereau
Table of Contents
Alfresco One 5.x Developer’s Guide - Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. The Alfresco Platform
Alfresco in the real world
Basic document management
Web content management
Content authoring tools
Separation of presentation from content
Systematic publication or deployment
Alfresco WCM example
Custom content-centric applications
Example used throughout this book
Alfresco architecture
High-level architecture
Add-ons
Open source components
Major standards and protocols supported
Customizing Alfresco
Basic customization
Dashlets
Custom site configuration
Rules and actions
Simple workflow
Advanced customization
Examples of advanced customizations
Extend the content model
Perform automatic operations on content
Customize Alfresco Share
Create a RESTful API
Streamline complex business processes with advanced workflows
Integrate with other systems
Dusting off your toolbox
Understanding Alfresco's editions
Significant feature differences
What's used in this book
Summary
2. Getting Started with Alfresco
Introduction to the Alfresco SDK
Maven archetypes
Install prerequisites
Spring Loaded
JDK
Maven
Install STS
Create your first application
Rapid application development
Traditional approach
Install Alfresco
Download Alfresco
Create your virtual machine
Deploy your modules
Check that your modules are installed
Extending Alfresco
Understanding the extension mechanism
Standard Java web application files
Framework files
Spring configuration files
Alfresco configuration files
Solution-specific files
Avoid Modifying Alfresco Code and Configuration
Troubleshooting
Log4j
Step-by-step - debugging from within Eclipse
Node browser
Starting over
Summary
3. Working with Content Models
Defining SomeCo's content model
Step-by-step - starting the custom content model with custom types
Types
Properties and property types
Constraints
Step-by-step - adding properties to types
Step-by-step - relating types with associations
Associations
Step-by-step - adding aspects to the content model
Aspects
Step-by-step - finishing up the model
Manage property indexing
Modeling summary
Custom behavior
Modeling best practices
Out-of-the-box models
Configuring the UI
Step-by-step - configure Share forms
Step-by-step - adding types and aspects to Alfresco Share dropdowns
Step-by-step - externalizing display labels
Setting up additional locales
Step-by-step - adding properties and types to advanced search
Working with content programmatically
Step-by-step - creating content with JavaScript
Knowing when to save documents
Using JavaScript for batch manipulation
Writing content to the content property
Creating content with CMIS
Step-by-step - run CmisClientClass to create content
Creating associations
Searching for content
Deleting content
Model manager
Summary
4. Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors
Encapsulating content operations in actions
Step-by-step - creating a basic action
Hiding the action from end users
Creating actions that require user-specified parameters
Step-by-step - creating an action configurable in Alfresco Share
Specifying parameters when code executes an action
Binding logic to custom types with behaviors
Step-by-step - writing a simple behavior in Java
Binding to multiple types/aspects
Frequency
Figuring out to which policies to bind
Step-by-step - writing a simple behavior in JavaScript
Binding behavior to child types
Step-by-step - writing a user ratings calculator
Step-by-step - testing the new rating behavior
Handling deleted ratings
Extracting metadata from files
Customizing metadata extractors
Step-by-step - customizing the metadata mapping
Overriding the default mapping
Leveraging out-of-the-box metadata extractors
Transforming content from one format to another
Step-by-step - writing a custom transformer
Summary
5. Customizing Alfresco Share
Knowing when to customize Alfresco Share and when to write your own
Adding new menu items
Step-by-step - adding a simple menu item
Adding new action items
Step-by-step - adding an action item to set the web flag
Restricting the action item by permission
Writing action evaluators to show/hide UI actions
Step-by-step - evaluating whether or not to show the set web flag actions
Changing how Share renders forms
Step-by-step - using a text area field
Step-by-step - changing the Status field on the Details page to display as a Stoplight indicator
Overriding and customizing components
How to use indicators
Step-by-step - creating indicators for the status indicator
How to create metadata template
Step-by-step - create a metadata template for Operations document
Creating custom dialogs
Step-by-step - creating a dialog to publish Whitepapers
Creating custom dashlets
Step-by-step - creating a dashlet listing Whitepapers
Step-by-step - adding filters to your Dashlet
Create custom pages
Step-by-step - create a new page to list all Webable documents
Summary
6. Creating an Angular Application
Understanding the framework
Components
Prepare your environments
Step-by-step – creating the new virtual machine
Creating your first JavaScript application
Step-by-step – develop your first custom UI using the JavaScript API
Creating your first Angular web application
Step-by-step - installing all prerequisites
Step-by-step - creating your first Angular application
Step-by-step - running the Alfresco demo shell
Summary
7. Exposing Content through a RESTful API with Web Scripts
Introducing the Web Script Framework
Step-by-step - Hello World web script
What just happened?
Following the Model-View-Controller pattern
Adding controller logic
Configuring the Web Script Framework
Specifying the HTTP method
Specifying arguments
Specifying the response format
Deploying web scripts
Building solutions with the Web Script Framework
Planning the SomeCo whitepapers and ratings API
Retrieving data with web scripts
Step-by-step - writing a web script to list whitepapers
Debugging
Fast facts
Organizing web scripts
Overriding web scripts
Choosing a URL
Choosing between the repository and the classpath
Step-by-step - retrieving the rating for a whitepaper
Specifying optional arguments
Handling errors
Writing Java-backed web scripts
Step-by-step - writing a Java-backed web script to handle ratings posts
Using the correct ID for Web Script Beans
Using both Java and JavaScript for controller logic
Wiring a web script to UI widgets
Step-by-step - using a widget to post ratings
Implementing the delete ratings link
Adding the web script calls to SomeCo's whitepaper web page
Making other types of content rateable
Dealing with the cross-domain scripting limitation
Handling form data
Step-by-step - implementing a form-based Hello World
Step-by-step - using file upload in a multipart request
Advanced web scripts
Dealing with web script authentication
Controlling web script cache
Summary
8. Advanced Workflow
What is a workflow?
Workflow options
Roll your own
Standalone engines
Embedded workflow engines
Creating process definitions
Step-by-step - creating a Hello World process definition
Using the Activiti graphical process designer
Step-by-Step - using Activiti process designer to create processes
Tokens
Node types
Versioning process definitions
Using alternative deployment methods
Wiring a process to the Alfresco UI
Step-by-step - grabbing the Hello World argument from the user
Understanding workflow-specific content models
Assigning tasks to users and groups
Step-by-step - creating the initial Whitepaper submission workflow
Controlling what actions can be taken from the Task Management dialog
Enabling the Workflow Initiator to Select Users and Groups
Step-by-step - use dynamic user assignment
Adding Logic to Workflows with Listeners and Process Variables
Storing Data in Process Variables
Step-by-step - adding logic to the Whitepaper submission workflow
Getting access to the content in the workflow
Using multi-instances
Using the Activiti API
Step-by-step - implementing third-party review
Making the third-party review more robust
Using timers
Step-by-step - adding a timer to the third-party review
Debugging workflows
Comparing Alfresco workflow options
Summary
9. Amazing Extensions
Configure and use the search manager
Configure and use the Smart Folders
Step-by-step - create your own Smart Folder template
Alfresco mobile
Step-by-step - import and run the Alfresco Sample UI
Step-by-step - create SomeCo mobile application
Summary
10. Security
Authenticating and synchronizing with LDAP
Step-by-step - setting up a local OpenLDAP server
Step-by-step - configuring Alfresco to authenticate against LDAP
Step-by-step - configuring chaining
Setting up Single Sign-On (SSO)
Step-by-step - implementing SSO
Logging Out
Step-by-step - configuring CAS to use LDAP for authentication
Working with security services
Securing the admin user
Granting additional users admin rights
Creating users and Groups Programmatically
Step-by-step - creating users and groups through the Java services
Understanding permission definitions
Permission groups
Permissions
Permission sets
Step-by-step - setting up a publisher custom role
Global Permissions
Mapping Permissions to Methods
Summary
Alfresco One 5.x Developer’s Guide - Second Edition
Alfresco One 5.x Developer’s Guide - Second Edition
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2008
Second edition: February 2017
Production reference: 1220217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78712-816-3
www.packtpub.com
Credits
About the Authors
Benjamin Chevallereau is a French software architect, based in London, who has been working on Alfresco projects for the last 8 years and Ephesoft projects for the last 3 years. He implemented solutions for small companies and global organizations in different domains such as transport, finance, and government.
He has worked for different Alfresco-recognized partners in France, the UK, and USA, including Armedia LLC, Zaizi, Michelin / Wipro, and BlueXML. He is also one of the committers and PMC members of the Apache CMIS Chemistry project.
Jeff Potts is the founder of Metaversant Group, Inc., a consulting firm focused on content management, search, and workflow. Jeff brings over 20 years of Enterprise Content Management implementation experience to organizations of all sizes including the Fortune 500. Throughout his consulting career he has worked on a number of projects for clients across the media and entertainment, airline, consumer packaged goods, and retail sectors.
Jeff began working with and blogging about Alfresco in November of 2005. In 2006 and 2007, he published a series of Alfresco tutorials and published them on his blog, ecmarchitect.com. That work, together with other Community activity in Alfresco's forum, Wiki site, and JIRA earned him Alfresco's 2007 Community Contributor of the Year Award.
In the past, Mr. Potts has worked for Alfresco Software, Inc. as Chief Community Officer, Optaros as Senior Practice Director, and Hitachi Consulting as Vice President where he ran the ECM practice.
About the Reviewer
Bindu Wavell is the chief architect at Zia Consulting. He has been doing enterprise system integration consulting for the past 24 years. At Zia, Bindu provides guidance and mentoring around Alfresco architecture and design in addition to working hands on with customers. He develops processes and technologies to streamline onboarding new developers, delivers trainings for customer developers and provides support for implementations and delivered projects.
I would like to thank the whole team at Zia for providing an amazing environment for learning, discovery and excellence. I’d also like to thank everyone at Alfresco for delivering such a great content management platform and for continuing to focus on being the best in the industry.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/Alfresco-One-5-x-Developers-Guide-ebook/dp/1787128164.
If you'd like to join our team of regular reviewers, you can e-mail us at customerreviews@packtpub.com. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
Alfresco is the leading open source platform for Enterprise Content Management. The evolution of the product has been quite impressive during the last 10 years. The first edition of this book has been published in 2008, and after 8 years, it really needed an update. This new book will give you some insights on the most advanced capabilities of the Alfresco platform. This book takes you through the process of customizing and extending the Alfresco engine, the out-of-the-box user interface Alfresco Share that will suit most of your requirements in terms of document collaboration. It uses a fictitious professional services company called SomeCo
as an example. SomeCo has decided to roll out Alfresco across the enterprise. Your job is to take advantage of Alfresco's extension mechanism, workflow engine, and various APIs and SDKs to meet the requirements from SomeCo's various departments. Although many customizations can be made by editing XML and properties files, this book is focused on developers. That might mean writing Java code against the Alfresco API to implement an action or a behavior, maybe creating some server-side JavaScript to use as the controller of a RESTful web script, or perhaps implementing custom business logic in an advanced workflow. The point is that all but the most basic implementations of any ECM platform require code to be written. The goal of this book is to help you identify patterns, techniques, and specific steps that you can use to become productive on the platform more quickly. By the end of this book, you will have stepped through every aspect of the Alfresco platform. You will have performed the same types of customizations and extensions found in typical Alfresco implementations. You’ll have discovered the Mobile Alfresco SDK and creates your own mobile application. Finally, you’ll get a preview of the latest Alfresco Development Framework (ADF) based on Angular. Most importantly, when someone comes to you and asks, How would you do this in Alfresco?
, you'll have at least one answer and maybe even some source code to go with it.
What this book covers
Chapter 1, The Alfresco Platform, is for people new to the Alfresco platform. It walks you through the capabilities of Alfresco and gives some examples of the types of solutions that can be built on the platform. You'll also learn what tools and skills are required to implement Alfresco-based solutions.
Chapter 2, Getting Started with Alfresco, is about getting your development environment set up. Like preparing for a home improvement project, this is the trip to the hardware store to get the tools and supplies you'll need to get the job done. Throughout the book, you will be building and deploying changes. So just as in any software development project, it pays to get that process working up front. You'll also learn about the debugging tools that are available to you. The chapter includes a short and simple customization example to test out your setup.
Chapter 3 , Working with Content Models, starts where all Alfresco projects should begin: defining the content model. You'll learn how to define the content model as well as how to expose the model to Alfresco Share. Once you've got it in place, you'll write some Java code that utilizes the CMIS API to test out the model. This will also be your first taste of the JavaScript API. The exercises set up the initial content model for SomeCo.
Chapter 4 , Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors, begins to show you the power of the repository by exposing you to some of the mechanisms or hooks that can be used to perform hands off
operations on content. You'll learn about actions, behaviors, transformers, and metadata extractors. The exercises include implementing a rule action for SomeCo's Human Resources department to help manage HR policies, writing a custom behavior to calculate user ratings, and writing a custom metadata extractor to make Microsoft Project files indexable by SolR.
Chapter 5 , Customizing Alfresco Share, takes you through Alfresco Share customizations. First, it establishes whether or not you should be customizing the user interface at all. Once that's out of the way, you learn how to add new menu or action items, how to create your own custom metadata template, how to develop new pages and dashlets, and how to define new dialogs to gather information from a user.
Chapter 6, Creating an Angular Application, shows you how to use the new Alfresco Development Framework (ADF) released in 2016. First, you start by discovering the new JavaScript library that you could include in any of your web applications. Then, you discover the new user interface implemented in AngularJS, and test all available current components. At the time of writing, this framework is only an early release and is not suitable for production. However, we are convinced that this framework will become an important component for any Alfresco developer.
Chapter 7 , Exposing Content through a RESTful API with Web Scripts, focuses on the web script framework. Web scripts are an important part of the platform because they allow you to expose the repository through a RESTful API. The exercises in this chapter are about creating a set of URLs that can be called from the frontend web site to retrieve and persist user ratings of objects in the repository.
Chapter 8 , Advanced Workflows, is about the embedded Activiti workflow engine, how it works and how to define your own workflows, including how to implement your own business logic. The chapter includes a comparison between the capabilities of Alfresco's simple workflow and advanced workflow so that you can decide which one is appropriate for your needs. By the end of the chapter, you will have built a workflow that SomeCo will use to review and approve Whitepapers for external publication.
Chapter 9 , Amazing Extensions, shows you one of the most amazing extensions including the use of facets configured with the search manager. Then, you discover what are smart folders and how to use them. After, you create your own template for SomeCo Whitepapers. Finally, you even create your own mobile application connected to your Alfresco instance.
Chapter 10 , Security, covers a variety of security-related topics. You'll learn how to define your own custom roles, and how to create users and groups with the API. Although not strictly developer-centric, you'll also learn how to configure Alfresco to authenticate and synchronize with an LDAP directory and how to implement Single Sign-On (SSO) between Alfresco and other web resources.
What you need for this book
To work through the examples in this book, you will need:
Alfresco. Preferably Enterprise, but Community should work, except for some advanced chapters. The examples have been tested on Alfresco from 5.1
Spring Tool Suite (STS)
Apache Maven
Vagrant (to create your virtual machines)
Appcelerator (to create your mobile application)
There are other tools or libraries that you will need for certain exercises, which will be mentioned as necessary.
Who this book is for
This book will be most useful to developers who are writing code to customize Alfresco for their organization or who are creating custom applications that sit on top of Alfresco.
This book is for Java developers, and you will get most from the book if you already work with Java, but you need not have prior experience on Alfresco. Although Alfresco makes heavy use of open source frameworks such as Spring, Hibernate, no prior experience using these is assumed or necessary.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: Let's clarify what's an AMP file or package. An AMP file is a .zip file with the .amp extension.
A block of code will be set as follows:
{
rating
: {
average
: 1.923,
count
: 13
}
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:
enableLookups=false
disableUploadTimeout=true
acceptCount=100
scheme=https
secure=true
clientAuth=false
sslProtocol=TLS
keystoreFile=/root/.keystore
keystorePass=changeit
Any command-line input and output is written as follows:
service alfresco start
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: When users log in to Alfresco, the first thing that is usually displayed is the My Dashboard section.
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
You can download the code files by following these steps:
Log in or register to our website using your e-mail address and password.
Hover the mouse pointer on the SUPPORT tab at the top.
Click on Code Downloads & Errata.
Enter the name of the book in the Search box.
Select the book for which you're looking to download the code files.
Choose from the drop-down menu where you purchased this book from.
Click on Code Download.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Alfresco-One-5x-Developers-GuideAlfresco-One-5x-Developers-Guide. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Downloading the color images of this book
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/AlfrescoOne5xDevelopersGuide_ColorImages.pdf.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at copyright@packtpub.com with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.
Chapter 1. The Alfresco Platform
This chapter introduces the Alfresco platform and answers the question, "What can I do with this thing?" A few examples will be provided to help answer this question from the solving business problems perspective. The chapter then skims over basic configuration and customization before introducing the advanced customization concepts covered throughout the book. The chapter concludes with a brief discussion on the different Alfresco editions that are available.
In this chapter, we will go through the following points:
Examples of practical solutions built on Alfresco
High-level components of the Alfresco platform
Examples of the types of customizations that you will likely perform as a part of your implementation
Technologies you will use to extend the platform
Alfresco in the real world
Alfresco will tell you that the product is a platform for enterprise content management (ECM). But ECM is a somewhat nebulous and nefarious term. What does it really mean? It depends on who is saying it. ECM vendors usually use it as an umbrella term to describe a collection of content-centric technologies as follows:
Document management (DM): This is used for capturing, organizing, and sharing binary files. These files are typically produced from office-productivity software, but the scope of the files being managed is unlimited.
Web content management (WCM): This is used for managing files and content specifically intended to be delivered to the Web. The key theme of WCM is to reduce the web developer
bottleneck and empower non-technical content owners to publish their own content.
Digital asset management (DAM): This is used for managing graphics, video, and audio. You can think of this as DM with added functionality specific to the needs of working with rich media such as thumbnailing, transcoding, and editing. Like WCM, the intent is to streamline the production process.
Records management(RM): This is used for managing content as a legal record. Like DAM, RM starts with DM and adds functionality specific to the world of RM such as retention policies, records plans, and audit trails.
Knowledge management(KM): This is used for capturing knowledge from employees or customers and providing it in a form that others can use.
Case management(CM): This is used managing information related to a case, such as an insurance claim, an investigation, or personnel processing.
Imaging : This includes capturing, tagging, and routing images of documents from scanners.
Most people will also include collaboration, search, and occasionally, portals as well.
Practitioners have a different perspective. They will say that ECM is less about the technology and more about how you capture, organize, and share information across the entire enterprise. For them, the how is more important than the what.
What's important to know from an Alfresco perspective is that Alfresco is a platform for doing all these things.
So rather than worrying about a concise definition of ECM, let's look at a few examples to illustrate how clients are using Alfresco today, particularly in Alfresco's sweet spots such as DM and WCM.
Basic document management
Alfresco started its life as a document management repository with some basic services for document management. Alfresco focused on this smart area initially for two reasons. First, it allowed Alfresco to establish a strong foundation and then build upon that foundation by expanding into other areas of ECM. Second, there is a huge market for systems that can manage unstructured content (aka documents
).
The market is so big because document management is a problem for everyone. All companies generate files that benefit from the kind of features document management provides such as check-in/check-out, versioning, metadata, security, full-text search, and workflow.
Examples of classic document management are often found in insurance, manufacturing, packaged goods, or other companies with large research and development divisions. As you can imagine, companies such as these deal with thousands of documents every day. The documents are in a variety of formats and languages, and are created and leveraged by many different types of stakeholders from various parts of the company.
The critical functionality required for basic document management includes things such as:
Easy integration with authoring tools: If users can't get documents into and out of the repository easily, user adoption will suffer. This means users must be able to open and save documents to the repository from applications such as Microsoft Office, Microsoft Windows Explorer, and e-mail.
Security: Many documents, particularly legal documents and anything around new product development, are very sensitive. Employees must be able to log in with their normal username and password, and see only the documents they have access to.
Library services: This is a grouping of foundational document management functionality that includes check-in/check-out, versioning, metadata, and search. The ability to offer these library services is one of the things that sets a document repository apart from a plain filesystem.
Workflow: Quite literally, workflow describes the flow of work
or business process related to a document. Requirements vary widely in this area and not everyone will leverage workflows right away. Workflows can be used to streamline and automate manual business processes by letting the document management system keep track of who needs to do what to a document at any particular time.
Scalability/Reliability: The system needs to scale in order to support several hundred or more users and hundreds of thousands or even millions of documents with some percentage of growth each year. Because the repository holds content that's critical to the business, it needs to be highly available.
Customizable user interface: Alfresco is split into two web applications. The first one contains only the core engine capabilities that are required for all Alfresco installation. The second one is the out-of-the-box Alfresco Share client made for generic document management, which may be appropriate in many cases. Most clients will want to make at least some customizations to the web client to help increase productivity and improve user adoption. It's possible as well to develop your own frontend from scratch.
The following diagram shows an example of high-level architecture to understand how basic document management might be implemented:
The diagram shows a single instance of Alfresco authenticating against a Directory Server (such as LDAP). Some content managers are using Alfresco Share via HTTP/S, while others are using Windows Explorer, Microsoft Office, and other thick clients to work with content via one or more protocols such as CIFS, WebDAV, FTP, or SMTP. As noted in the diagram, Alfresco stores metadata in a relational database and the actual content files on the filesystem.
Most of the techniques for customizing Alfresco for DM solutions apply to other ECM solutions such as WCM, RM, Imaging, and DAM. Of course, there are business concepts and technical implementation details specific to each that make them unique, but the details provided in this book apply to all because the specialized solutions are built as extensions to the core Alfresco repository. This books dedicates an entire chapter, Chapter 9, Amazing Extensions, to some very famous extensions as Alfresco Mobile and Alfresco Analytics.
Web content management
On the surface, WCM is very similar to document management. In both cases, content owners store files in a repository. Often, the content is assigned metadata, secured, indexed for search, and routed through a workflow. The most obvious difference between DM and WCM is that the content being managed is meant specifically to be published on a website or as part of a web application. Beyond that high-level distinction, there are several other differences that make WCM worthy of separate discussion. These include:
Content authoring tools used to create content
Separation of presentation from content
Systematic publication or deployment of content
Let's briefly look at each of these.
Content authoring tools
The majority of document management solutions deal with files generated by an office suite. Of