Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Alfresco One 5.x Developer???s Guide
Alfresco One 5.x Developer???s Guide

Alfresco One 5.x Developer???s Guide: Discover what it means to be an expert developer by exploring the latest features available to you in Alfresco One 5.x , Second Edition

eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Alfresco One 5.x Developer???s Guide

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:

Basic document management

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 course, there are exceptions such as various types of graphics files, CAD/CAM drawing formats, and other specialized tools. But mostly, the files are generated by a small number of different tools and an even smaller number of different software vendors.

In the case of WCM, there is a wide variety of tools involved from text editors to integrated development environments (IDEs) to graphics programs with multiple vendors in each category. This means the WCM solution needs to be very flexible in the way it integrates with authoring tools. The alternative, which is forcing authors to give up their favorite tools in favor of a standard, can be a management nightmare.

Separation of presentation from content

WCM does not require the separation between content's appearance on the web site and its storage. But many implementations take advantage of this principle because it makes redesigning the site easier, facilitates multichannel publishing, and enables people to author content without web skills.

To understand why this is so, think about a website that has its content and presentation of that content merged together. When it is time to redesign the site, you have to touch every single web page because every page contains presentation markup. Similarly, content authoring is limited to people with technical skills. Otherwise, there is a risk that the content owner (for example, the person writing a press release or a job posting) will inadvertently clobber the page design.

One way to address this is to separate the content (the press release copy) from the presentation of that content. A common way to do that is to store the content as presentation-independent XML. The XML can then be transformed into any presentation that's needed. A redesign is as simple as changing the presentation in a single place, and then regenerating all of the pages.

The impact of separating content from presentation is three-fold. First, assuming the content consumers aren't interested in reading raw XML, something has to be responsible for transforming the content. Depending on the implementation, it may be up to the WCM system or a frontend web application.

Second, in the case of static content, any change in the underlying content has to trigger a transformation so that the presentation will be up-to-date, keeping in mind that there may be more than one file affected by the change. For example, data from a job posting appears in the job posting detail as well as the list of job postings. If the posting and the job posting index are both static, the list has to be regenerated whenever the job posting changes.

Third, content authors lose the benefit of WYSIWYG (What You See Is What You Get) content authoring because the content doesn't immediately look the way it will as soon as it is published to the web site. The WCM system, then, has to be able to let content authors preview the content as they author it, preferably in the context of the entire site.

Systematic publication or deployment

A document management system is a lot like a relational database in the sense that it is typically an authoritative, centralized repository. There are exceptions, but for the most part, content resides in the repository and is retrieved by the systems and applications that need it. On the other hand, a WCM system often faces a publication or deployment challenge. Files go into the repository, but must be delivered somewhere to be consumed. This might happen on a schedule, at the request of a user, as part of a workflow, or all of the above. Granted, some websites retrieve their content dynamically; but most sites have at least a subset of content that should be statically delivered to a web server.

Alfresco WCM example

Let's look at an example of a basic corporate website. Most companies have a mix of About Us content that probably doesn't change very often, Press releases or News sections that might get updated daily, and maybe some document-based content such as marketing slicks, product information sheets, technical specifications, and so on. There's also some content that is used to build the site such as HTML, XML, JavaScript, Flash, CSS, and image files.

It is likely that there are several different teams with several different skill sets, all collaborating to produce the site. In this example, suppose the About Us and News pages come from the marketing team, the site is built by the web team and the document-based content can come from many organizations within the company.

Alfresco WCM sits on top of the core Alfresco product to provide additional WCM-specific functionality. An important distinction between Alfresco WCM and other open source content management systems (CMS) is that Alfresco is a decoupled CMS while something such as Drupal is a coupled CMS. This means that Alfresco manages the website but does not concern itself with presentation unlike Drupal, which is both a repository and a presentation framework. This doesn't mean that Alfresco can only manage static sites. You can easily query the repository in any number of ways. It just means it is up to you to provide the frontend from the ground up.

Custom content-centric applications

Content-centric applications are those in which the primary purpose of the application is to process, produce, archive, collaborate on, or manage unstructured or semi-structured content.

The Alfresco Share client is an example of a content-centric application, although it is meant for a very general, all-purpose use case. When solutions are very close to basic document management, Alfresco Share can be customized as previously discussed. At some point, it makes more sense to build a separate custom application with Alfresco as the backend repository for that application.

Consider the sales process within a company, for example. Sales people create proposals. Those proposals are usually routed internally for review and approval, and then are delivered to the client. If the client accepts the proposal, a contract is drawn up and the product is delivered. The out-of-the-box Alfresco Share could be used to manage these documents, assign metadata, manage the review process through workflows, and make it all searchable. But the sales team might be even more productive if it used a purpose-built user interface. For this solution, a frontend built on top of NodeJS and Angular, a custom Spring web application, or even a custom mobile application might be a good option. Alfresco would provide the document management services. The frontend would talk to Alfresco via CMIS or RESTful services.

Another example is using Alfresco in a digitization project. More and more companies are trying to reduce the use of paper-based process for many different reasons. Alfresco can be integrated with various scanning solutions as Ephesoft via CMIS, or Kofax via the connector supported by Alfresco. Documents can be ingested and processed by the scanning solution and exported to Alfresco. Alfresco will be responsible to store, index and secure the scanned documents. Using the integrated Activiti framework, Alfresco can automatically start a process depending of the document type. If an invoice has been scanned, Alfresco will start a review process for the financial team. If it's a job application, Alfresco will start a new process for the HR team to track the different stages of this application.

As discussed previously, Alfresco provides two out-of-the-box web applications. The first one is the Alfresco repository engine. The first one provides only administration capabilities from a user interface point of view. The second one is the default web interface Alfresco Share. Many clients appreciate this separation because it gives them complete freedom with regard to how they build the frontend. Depending of your use case, you may want to use the standard Alfresco Share user interface; or including some customizations; or even build the frontend from scratch.

Alfresco Share provides many different options if you need customizations. The basic level is to configure some forms and pages to display your custom metadata. If you need further customization, you may want to customize an existing Dashlet or to develop a new one to add on the user or site dashboard. You may need to create custom actions in the use interface. If it's not enough, it's even possible to create new pages within Alfresco Share reusing the entire UI framework. Finally, if it's not sufficient, Alfresco can be integrated to any frontend using CMIS or REST API.

We'll see in one of the following chapters how Alfresco created tools to generate Angular applications from scratch:

Custom content-centric applications

The openness of the Alfresco repository, particularly its ability to be easily exposed as a set of services, makes Alfresco an ideal platform for content-centric applications. As the examples have shown, custom content-centric web applications use Alfresco as the backend. As a result, they have complete flexibility in frontend technology choices from portals to lower-level frameworks to no framework at all.

Example used throughout this book

In this book, we'll assume we are rolling out Alfresco throughout a consulting firm. Professional services firms make great examples because they tend to generate a variety of different documents. The other reason is that document and content management is usually a big challenge, which is the core to the business. But the examples should be applicable to any business that generates a significant amount of documents.

The example firm, SomeCo, wants to leverage document and content management throughout the organization to make it easier to find important information, streamline certain business processes, and secure sensitive documents.

SomeCo's company organization is pretty standard. It consists of operations, sales, human resources, marketing, and finance/legal. Examples of the different types of content each department is concerned with are shown in the following table:

Department

Example document types

Format and process notes

Finance/legal

Client proposals for project work

Statements of work

Master services agreements

Non-disclosure agreements

  • Microsoft Word and Adobe PDF.
  • Several iterations between the firm and the client before a final version is completed.
  • Some documents may require internal review and approval.

Marketing

Case studies

Whitepapers

Marketing plans

Marketing slicks/promotional material

  • Microsoft Word, Microsoft PowerPoint, Adobe PDF, and Adobe Flash.
  • Mostly single-author content.
  • Some content may come from third parties.
  • Some content may need to be published on the website.

Human resources

Job postings

Resumes

Interview feedback

Offer letters

Employee profiles

/Biographies

Project reviews

Annual reviews

  • Microsoft Word, Adobe PDF, and HTML.
  • Single-author content with consumers being spread throughout the company.
  • Some content formats are unpredictable (such as resumes). Some are very standard and could be templatized (such as offer letters).
  • With the exception of job postings, none of this content should go near the Web.
  • Some content needs strict internal permissions.

Sales

Forecast

Presentations

Proformas

  • Microsoft Excel and Microsoft PowerPoint.
  • Some business process and automated document-handling possibilities such as forecast.
  • Searchability of presentations is important.

Operations

Methodology

Utilization reports

Status reports

  • All Microsoft Office formats.
  • Some opportunity for integration into enterprise systems such as time tracking and project management.

Examples throughout the rest of the book will show how Alfresco can be implemented and customized to meet the needs of the various organizations within SomeCo. During a real implementation, time would be spent gathering requirements, selecting the appropriate components to integrate with the solution, finalizing architecture, and structuring the project. There are plenty of other books and resources that discuss how to roll out content management across an enterprise and others that cover project methodologies. So none of that will be covered here.

Alfresco architecture

Many of Alfresco's competitors (particularly in the closed-source space) have sprawling footprints composed of multiple, sometimes competing, technologies that have been acquired and integrated over time. Some have undergone massive infrastructure overhauls over the years, resulting in bizarre vestigial tails of sorts. Luckily, Alfresco doesn't suffer from these traits. On the contrary, Alfresco's architecture shows the following characteristics:

  • It is relatively straightforward
  • It is built with state-of-the-art frameworks and open source components
  • It supports several important content management and related standards

Let's look at each of these characteristics, starting with a high-level look at the Alfresco architecture.

High-level architecture

The following diagram shows Alfresco's high-level architecture. By the time you finish this book, you'll be intimately familiar with just about every box in the diagram:

High-level architecture

The important takeaways at this point are as follows:

  • There are many ways to get content into or out of the repository, whether that's via the protocols (for example CIFS on the diagram) or the APIs on the left.
  • Alfresco runs as a web application within a servlet container. From Alfresco 5.x, this web application doesn't provide anymore a user interface for end users. It includes only an administration console. If you need a user interface, you'll need to deploy the Alfresco Share web application (in the same container or not) and an extension package in the Alfresco web application to provide all web scripts required by Alfresco Share. You can as well implement your own user interface on top of your Alfresco repository.
  • Customizations and extensions run as part of the Alfresco repository or Share web application. An extension mechanism separates customizations from the core product to keep the path clear for future upgrades.
  • Metadata resides in a relational database. In a typical Alfresco installation, content files are usually stored in a different server than Alfresco itself (as compared to filesystem). Solr indexes needs to be located in the system as the Solr web application that can reside in a dedicated server too.

Add-ons

The add-ons are pieces of functionality not found in the core Alfresco distribution. If you are working with the binary distribution, it means you'll have additional files to download and install on top of the base Alfresco or Share installation.

Add-ons are provided by Alfresco, third-party software vendors, and members of the Alfresco community such as partners and customers. Alfresco makes several add-on modules available such as Records Management, Google Docs, Office Services or Kofax integration. Members of the Alfresco community create and share add-on modules via the Alfresco add-Ons (https://addons.alfresco.com/), a website set up by Alfresco for that purpose. At the time of writing, this website contains 444 different add-ons compatible with Alfresco Enterprise and/or Community.

Open source components

One of the reasons Alfresco has been able to create a viable offering so quickly is because it didn't start from scratch. The Alfresco engineers assembled the product from many finer-grained open source components. Why does this matter? First, instead of reinventing the wheel, they used proven components. This saved them time, but it also resulted in a more robust, more standard-based product. Second, it eases the transition for people new to the platform. If a developer already knows Spring, for example, many of the customization concepts are going to be familiar. Alfresco uses Surf, a Spring framework extension for building or extending MVC applications. And besides, as a developer, wouldn't you rather invest your time and effort in learning standard development frameworks rather than proprietary development kits?

The following table lists some of the major open source components used to build Alfresco:

Open source component

Use in Alfresco

Apache Solr (http://lucene.apache.org/solr/)

Full-text and metadata search

Hibernate (http://www.hibernate.org/)

Database persistence

FreeMarker (http://freemarker.org/)

Web script framework views, custom views in the web client, web client dashlets, email templates

Mozilla Rhino JavaScript Engine (http://www.mozilla.org/rhino/)

Web script framework controllers, server-side JavaScript, actions

OpenSymphony Quartz (http://www.quartz-scheduler.org/)

Scheduling of asynchronous processes

Spring ACEGI (http://projects.spring.io/spring-security/)

Security (authorization), roles, and permissions

Apache Axis (http://ws.apache.org/axis/)

Web services

LibreOffice (http://www.libreoffice.org/)

Conversion of office documents into PDF

Apache FOP (http://xmlgraphics.apache.org/fop/)

Transformation of XSL:FO into PDF

Apache POI (http://poi.apache.org/)

Metadata extraction from Microsoft Office files

Activiti (http://www.activiti.org/)

Advanced workflow

ImageMagick (http://www.imagemagick.org/)

Image file manipulation

GhostScript (http://www.ghostscript.com/)

Image file manipulation

Does this mean you have to be an expert in all open source components used to build Alfresco to successfully implement and customize the product? Not at all! Developers looking to contribute significant product enhancements to Alfresco or those making major, deep customizations to the product may require experience with a particular component, depending on exactly what they are trying to do. Everyone else will be able to customize and extend Alfresco using basic Java and web application development skills.

Major standards and protocols supported

Software vendors love buzz words. As new acronyms climb the hype cycle, vendors scramble to figure out how they can at least appear to support the standard or protocol so that the prospective clients can check that box on the Request for proposal (RFP). Commercial open source vendors are still software vendors and thus are no less guilty of this practice. But because open source software is developed in the open by a community of developers, its compliance to standards tends to be more genuine. It makes more sense for an open source project to implement a standard than to go off in some new direction because it saves time. It promotes interoperability with other open source projects, and stays true to what open source is all about--freedom and choice.

Here, are the significant standards and protocols Alfresco supports:

Standard/protocol

Comment

HTTP

The main protocol used to access Alfresco content repository via for example the Alfresco REST APIs.

CMIS

CMIS is a standard allowing information sharing between different content management systems. Alfresco supports the version 1.0. and 1.1 of the CMIS standard.

FTP

Content can be contributed to the repository via FTP.

WebDAV

WebDAV is an HTTP-based protocol commonly supported by content management vendors. It is one way to make the repository look like a file system.

CIFS

CIFS allows the repository to be mounted as a shared drive by other machines. As opposed to WebDAV, systems (and people) can't tell the difference between an Alfresco repository mounted as a shared drive through CIFS and a traditional file server.

IMAP

IMAP protocol is used by any modern email clients. Directly from your client, you can connect to your Alfresco repository.

SMTP

It is possible to email content into the repository (InboundSMTP). A folder can be dedicated as an email target.

SPP

Enables Alfresco to act as a Microsoft SharePoint Server. Allows Microsoft Office users to access documents within the Alfresco repository.

Alfresco Office Services

Using Alfresco Office Services (AOS), you can access your documents directly via all Microsoft Office software. AOS replaces and improves the Microsoft SharePoint protocol available in the previous versions.

SOAP

The Alfresco Web Services API uses SOAP-based web services.

OpenSearch (http://www.opensearch.org)

Alfresco repositories can be configured as an OpenSearch data source, which allows Alfresco to participate in federated search queries.

XSLT, XSL:FO

Web form data can be transformed using XSL 1.0.

LDAP

Alfresco can authenticate against an LDAP directory or a Microsoft Active Directory server.

Customizing Alfresco

Alfresco offers a significant amount of functionality out of the box, but most implementers will customize it in some way. At a high level, the types of customizations typically done during an implementation can be divided into basic customizations and advanced customizations.

Basic customization

Many Alfresco customizations can be done without writing a single line of code. Some may be done even by end users through Alfresco Share. Others might require editing a properties file or an XML file. Let's look at some of them briefly here so that you can get an idea of what you don't have to code. Other customizations will be introduced in the Chapter 9, Amazing Extensions.

Dashlets

When users log in to Alfresco, the first thing that is usually displayed is the My Dashboard section. The dashboard is a user-configurable layout that contains dashlets. (If you are familiar with portals, think portal page and portlet). Users choose the layout of the dashboard (number of columns) as well as the specific dashlets they want displayed in each column.

There are a number of dashlets available out of the box, or you can develop your own and add them to the user-selectable list. Examples of out of the box dashlets include workflow-related dashlet such as My Tasks as well as content-related dashlets such as My Documents, My Sites or My Activities:

Dashlets

Currently most of these dashlets are Spring Surf Dashlets (http://docs.alfresco.com/5.1/concepts/dev-extensions-share-surf-dashlets.html), but they will eventually be converted to Aikau Dashlets (http://docs.alfresco.com/5.1/concepts/dev-extensions-share-aikau-dashlets.html). Aikau is the new UI framework developed by Alfresco, and available from Alfresco 4.2.Some of these existing dashlets allows you some configuration. Here are some examples:

Dashlets

  • Saved Search: This dashlet runs a specific search each time the dashboard is loaded:

Dashlets

  • Web View: This dashlet is used to display any website:

Dashlets

Obviously, developing custom dashlets is probably not something you'd let your business users do; but it is still considered a basic customization. It can be complex to develop new dashlet depending if you need to develop new web script for example.

Custom site configuration

The first concept that you'll discover using Alfresco Share is the concept of site. It's a secured area in the repository where a team, a project or a suborganization can share and manage any kind of contents, including documents of course. A site includes multiple pages, depending mainly of the type of content. Alfresco Share provides the following by default:

  • A document library page
  • A calendar page
  • A Wiki page
  • A forum page
  • A data-list page
  • A links page
  • A blog page

In each site, you can configure and select only what is needed by the users.

Each Alfresco Share site contains as well a dedicated dashboard that you can entirely customize with all out-of-the-box dashlets already provided.

Rules and actions

A rule is something that says, "When a piece of content is created, updated, or deleted, check these conditions. If these conditions are met, take these actions". Conditions may check whether a piece of content is a particular mime type, or a specific content type. They may also check whether a piece of content has a specific aspect applied, or whether the content's name property matches a particular pattern. Rules can be defined on any folder in the repository. Child folders can inherit rules from their parent.

Rule actions are repeatable operations that enable us to do things similar to those that can be done using JavaScript or Java. Out-of-the-box actions include things such as check-in content, check-out content, move an item to another folder, specialize the type of the content, add an aspect to the content, transform content from one format to another, and so on.

Configuring folders to run rule actions is something non-technical users can do through Alfresco Share. In Chapter 4, Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors, you'll learn how to write your own custom rule actions using the Alfresco API.

Simple workflow

Alfresco has two options for implementing workflow: simple workflow or advanced workflow. The good thing about simple workflows is that end users can configure them as needed without any technical skills or developer support.

Here's how it works. A user creates a rule to add simple workflow to a document when it is placed in the folder. When an item enters a folder with this type of rule applied, it will have additional UI action items available. The rule to specify the user actions and flow of the content between folders is configured in the repository action. When the step is invoked, the content can be copied or moved to another folder. It's also possible to add complexity to a simple workflow by creating rules for other folders and passing content around from location to location. For example, there might be folders called Draft, In Review, and Approved. The state of a document is determined by the folder in which it resides.

Simple workflows have obvious limitations:

  • Workflows are limited to serial processes. Content can only move forward or backward, one step at a time.
  • Content can only be in only one simple workflow state at a given time.
  • Content must change physical locations to reflect a change in state.
  • There is no opportunity for capturing (and acting on) process-related metadata.
  • Tasks can't be assigned to individuals or groups. (Of course, you could limit folders to specific individuals or groups through permissions, which would have a similar effect to a task assignment. But you wouldn't be able to easily pull a list of tasks for a specific user across all simple workflows).
  • Other than creating additional rules and actions for the folders used in a simple workflow, there is no way to add logic for decisions or other more complex constructs. If you need to implement specific behavior depending of the state, you have to implement additional action and rule attached to each folder.

Advanced customization

The basic configuration and customizations show that there is quite a lot of tweaking and tailoring that can happen before a developer gets involved. This is a good thing. It means a good chunk of the customization requirements can be dealt with quickly. In the case of simple workflows, they can be delegated to the end users altogether! Hopefully, this leaves more time for the more advanced (and more interesting) customizations required for a successful implementation.

Examples of advanced customizations

The advanced customizations are the customizations that are likely to require code. They are the focus of the book. To give you an idea of what's possible (and in an effort to provide an appetizer before the main meal is served), let's go over some of the areas of advanced customization.

Extend the content model

Alfresco's out-of-the-box content model can be extended to define your own content types, content aspects, content metadata (properties), and relationships (associations). The out-of-the-box model is very generic, and defines only a minimal subset of the metadata that will probably need to be captured with the content.

For example, SomeCo might want to capture different metadata for its marketing documents than for its HR documents. Or maybe there is a set of metadata that doesn't belong to any one content type in particular, but should rather be grouped together in an aspect and attached to objects as needed. These and other content modeling concepts will be covered in Chapter 3, Working with Content Models.

Perform automatic operations on content

There are several hooks or places where you can insert logic or take action to handle content automatically. These include rule actions, behaviors, content transformers, and metadata extractors. Rule actions have already been discussed. Behaviors are like actions but instead of being something that an end user can invoke on any piece of content, behaviors are tightly bound to their content type or aspect. Content transformers, as the name suggests, transform content from one format to another. Metadata extractors inspect content as it is added to the repository, and pull out data to store in the content object's properties. These tools for handling content automatically will all be covered in Chapter 4, Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors.

Customize Alfresco Share

Chapter 5, Customizing Alfresco Share, covers Share customization. Just about everything in the Share web application can be tweaked. In the document library, it's possible to configure the view of a content, or the edit form depending of the content type. It's possible as well to define a template renderer that changes the default view in the document list. Alfresco Share provides as well different views that you can customize, or even create new ones. And if you want more, you can even create your own page from scratch.

Create a RESTful API

Web scripts are one of the more exciting additions to the Alfresco architecture. The reason is that RESTful services are typically much easier to work with using scripting languages and AJAX toolkits than SOAP-based services, because they are invoked through plain old URLs.

The web script framework, based on the Model-View-Control (MVC) pattern, allows you to build your own RESTful API to the repository. It will be covered in detail in Chapter 7, Exposing Content through a RESTful API with Web Scripts, but the high-level summary is that URLs get mapped to a controller implemented as JavaScript or Java. The controller performs whatever logic is needed, then forwards the request to the view. The view is implemented as a FreeMarker template. The template could return anything from markup to XML to JSON. RESTful services via web scripts are the preferred way to integrate with the Alfresco repository.

Streamline complex business processes with advanced workflows

Advanced workflows provide a way to automate complex business processes. Alfresco's advanced workflows are executed by the embedded Activiti engine, which is a very powerful and popular open source workflow engine.

Rather than basic workflows, which are end-user configurable and limited to serial processes, advanced workflows offer the power of parallel flows, the ability to add logic to the process via JavaScript and Java, and much more.

A handful of advanced workflows are available out of the box. These are most useful as starting points for your own custom advanced workflows. Exactly how it has to be done will be covered in Chapter 8, Advanced Workflows.

Integrate with other systems

Most of the coding and configuration discussed so far can be divided into two parts:

  • Customizations made to the core Alfresco repository
  • Customizations made to Alfresco Share

There is a third bucket to be considered, which is coding and configuration related to integrating Alfresco with other solutions. Maybe Alfresco needs to authenticate against an LDAP directory. Maybe a portal will get its content from Alfresco, or perhaps some other third-party application needs to share content with Alfresco. Chapter 9, Amazing Extensions,discusses how to handle security and integration.

Dusting off your toolbox

Looking across both the basic and advanced customizations provides some idea about the extensibility of the platform. A commonly asked question at this point in the architecture discussion is, Does Alfresco have an API? Actually, it has several. Let's look at what APIs are available and where they are used. This should also give you some idea as to the tools and skills you'll need to have in your toolbox as you embark on your own projects.

The following table shows the APIs available and where they are used:

Alfresco API

Where Used

Comments

Foundation API

Rule actions, behaviors, Java-based web scripts, web client customizations, Activiti, standalone applications that embed the Alfresco repository.

As the name suggests, this is the core Alfresco API.

Alfresco One API

Web and non-web applications that need remote access to the repository.

The Alfresco One API was introduced with Alfresco 4.x, and is also present in the public cloud version of Alfresco. It provides the main remote API, and is the recommended API for developing remote client applications.

CMIS API

Web and non-web applications that need remote access to the repository.

CMIS provides a standardized set of common services for working with content repositories. Alfresco provides an implementation of CMIS Web service and RESTful bindings.

FreeMarker API

Custom views, mail templates, web script view logic.

FreeMarker is an open source templating engine.

Web script framework

Web and non-web applications that need to use REST to interact with the repository.

More of a framework than an API, web scripts implement a MVC pattern that relies on the JavaScript, FreeMarker, and Foundation APIs.

As the list of APIs shows, knowing Java will be the key to just about any successful customization effort. FreeMarker and JavaScript are important, but are easily picked up using Alfresco's code and online resources as references.

Understanding Alfresco's editions

Alfresco has three editions of its ECM products: Alfresco One, Alfresco in the Cloud, and Alfresco Community Edition. We won't describe the other BPM products offered by Alfresco, because they are not in the scope of this book.

Alfresco One is the package installable on premise supported by Alfresco. It provides hybrid capabilities with selective content-sync to the included SaaS Alfresco in the Cloud. Alfresco One provides as well different modules including content encryption, records management, analytics, and media management.

Alfresco in the cloud offers almost all out-of-the-box features provided by Alfresco Share without on-premises installation. It provides full mobile access and workflow for document review and approval. This product is well suited for smaller teams with multiple offices or branches that don't want to manage servers and don't require the full customization, extra modules or integrations offered by Alfresco One. This product can be used as well in a hybrid mode. Only documents that need to be shared with the outside world can be published into Alfresco Cloud. Content can be configured to synchronize between Alfresco Cloud and on premise Alfresco installations.

Alfresco community is intended for developers and technical enthusiasts who want the power of Alfresco in non-critical environments. However, some big organizations use Alfresco community in production. Be aware that Alfresco won't provide any support for this product. In terms of features, Alfresco community is usually the first product to receive the new features to allow the community to test. However, some features are provided only by Alfresco One including the administration console, the content encryption or the Activiti console.

Significant feature differences

At the time of this writing, the latest supported release from Alfresco is Alfresco One 5.1. The latest community release is Alfresco Community 201605 (for May 2016).

What's used in this book

The vast majority of examples used in this book will work on both the Enterprise and Community editions (5.1 and 201605, respectively). Where a specific release is required, it will be noted wherever possible.

Summary

Hopefully, this chapter has given you several ideas about how Alfresco can be used to implement DM, WCM, and custom content-centric applications by walking through examples of each. The details may still be fuzzy, but the goal was to introduce the major components and capabilities of the Alfresco platform.

In this chapter, we discovered in which kind of use case Alfresco is a good fit. The potential and flexibility of Alfresco can be used to solve a variety of different content-related business problems. Then, we introduced the different configuration points that you can use in your organization without writing one line of code. Even if Alfresco provides you a lot of capabilities, we'll discover in the rest of the book how it can be customized and extended based on the fictitious consulting firm that we created called SomeCo. Next we covered the major open source components included in Alfresco, and the different protocols and standards that can be used to integrate Alfresco in your ecosystem.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • 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

Description

Do you want to create more reliable and secure solutions for enterprise apps? Alfresco One 5.x is your gateway to developing the best industry-standard enterprise apps and this book will help you to become a pro with Alfresco One 5.x development. This book will help you create a complete fully featured app for your organization and while you create that perfect app, you will explore and implement the new and intriguing features of Alfresco. The book starts with an introduction to the Alfresco platform and you’ll see how to configure and customize it. You will learn how to work with the content in a content management system and how you can extend it to your own use case. Next, you will find out how to work with Alfresco Share, an all-purpose user interface for general document management, and customize it. Moving on, you write web scripts that create, read, and delete data in the back-end repository. Further on from that, you’ll work with a set of tools that Alfresco provides; to generate a basic AnglularJS application supporting use cases, to name a few authentication, document list, document view. Finally, you’ll learn how to develop your own Alfresco Mobile app and understand how Smart Folders and Search manager work. By the end of the book, you’ll know how to configure Alfresco to authenticate against LDAP, be able to set up Single Sign-On (SSO), and work with Alfresco’s security services.

Who is this book for?

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.

What you will learn

  • Create and manage a custom content model
  • Configure the Alfresco Share user interface
  • Build a new AngularJS 2.0 application
  • Create business process definitions using Activiti Designer
  • Discover the most common extensions provided by Alfresco
  • Configure Alfresco to authenticate against LDAP, including & chaining" LDAP with Alfresco authentication
  • Get familiar with the latest features of Alfresco Mobile SDK, Smart Search, and the new Angular framework
Estimated delivery fee Deliver to Romania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 27, 2017
Length: 528 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787128163
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Romania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Feb 27, 2017
Length: 528 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787128163
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 86.97
Alfresco One 5.x Developer???s Guide
€36.99
Learning Alfresco Web Scripts
€24.99
Alfresco for Administrators
€24.99
Total 86.97 Stars icon

Table of Contents

10 Chapters
1. The Alfresco Platform Chevron down icon Chevron up icon
2. Getting Started with Alfresco Chevron down icon Chevron up icon
3. Working with Content Models Chevron down icon Chevron up icon
4. Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors Chevron down icon Chevron up icon
5. Customizing Alfresco Share Chevron down icon Chevron up icon
6. Creating an Angular Application Chevron down icon Chevron up icon
7. Exposing Content through a RESTful API with Web Scripts Chevron down icon Chevron up icon
8. Advanced Workflow Chevron down icon Chevron up icon
9. Amazing Extensions Chevron down icon Chevron up icon
10. Security Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(2 Ratings)
5 star 0%
4 star 50%
3 star 50%
2 star 0%
1 star 0%
Sherwin John C. Tragura Mar 12, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
If you are looking for a reference that will give you updates on Alfresco 5/One, then this reference can help. Just be sure that you know Alfresco 4.x and below otherwise you will get lost along the way because some discussions are left to the reader that has some experience on the previous Alfresco versions. Great book!
Amazon Verified review Amazon
Glenn Morrill Jun 13, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Alfresco One 5.x Developers Guide is in large part a compilation of web published tutorials, blogs posts, etc.That in itself is very useful. Filtering web accessible information that is no longer relevant, putting subjects and examples in a user friendly order,calling out best practices and having one searchable document is a really good thing.A couple of things that I would like to see:.A compilation of examples arranged as a tutorial is nice but some more how and why Alfresco works would give the book's reader a huge edge over learning Alfresco development via the official documentation and what is available on the web.There appears to be some fundamental knowledge missing, especially in the early chapters. For example nodes and NodeRef's are fundamental to understanding how data is represented and accessed in Alfresco but a search on the term 'node' doesn't find anything Alfresco specific until page 70 where the Node Browser is introduced.My overall opinion is that this book is valuable as a reference and cook book. As an overview and tutorial it falls short.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela