Getting Started with Alfresco Development Ray Gauss II – DAM Architect @ Alfresco (Originally Gethin James - Senior Software Engineer @ Alfresco)
Agenda Architecture Overview Alfresco One Extensions Alfresco One RESTful API Using it Adding to it (Yes, YOU can) Ask about capabilities of devs in the room
What’s Covered Elsewhere Sessions Share Widget Library Share Page Creation Live
Alfresco Architecture Need to understand at a high level Don’t re-invent wheels Check docs for latest recommended extension points Use consulting or partner services if you can
Alfresco Basic Concepts Nodes NodeRefs Properties ContentStore
Before Development… Config alfresco-global.properties Database Credentials Ports Limits (Timeouts, Size) Executable Paths JMX These are consolidated from several places, i.e. modules
New in 4.2 – Admin console http://blogs.alfresco.com/wp/kevinr/2013/09/30/alfresco-repository-admin-console/ Some of the same things Enterprise-only feature
Your Architecture Extending Alfresco? Talking to Alfresco? AMPs REST API
Extending Alfresco Alfresco Module Package (AMP) Way to Package JARs, config, web resources Module Versioned Specify Alfresco Version Requirements Module Dependencies Installed by Module Management Tool (MMT) Repository or Share Enables just about any customization: data model, services, UI Encourages a repeatable build More likely upgrade safe Admin console shows modules installed
Getting Started With AMPs Alfresco Maven SDK Maven Archetypes to Generate AMP Structure Maven Plugin to Package, Deploy Official Documentation Session: Enabling … Dev … of Alfresco Apps (Gabriele Columbro) Who’s familiar with Maven?
Alfresco Maven Artifacts artifacts.alfresco.com Use the ____, Luke Source Javadoc Tests Config No need to check out full source Story of unzipping SDK pieces © Lucasfilm
Who Likes Choices? Webscripts Server-side JavaScript IMAP, FTP, SharePoint protocol, CIFS
New in 4.2 for Devs Hybrid Workflow Easy Clustering Java @AlfrescoPublicApi Transformer Configs Transactional Queries
New in 4.2 – Database Queries In-transaction metadata query “A subset of CMIS queries may be automatically executed against the database if they do not contain OR, CONTAINS(), SCORE() or IN_TREE(); nor refer to decimal, boolean or URI CMIS data types.” ALF-19126 Summit: Querying for Metadata, Andy Hind Eventually Consistent
Your Architecture Extending Alfresco? Talking to Alfresco? AMPs REST API
Photo Slide Folder, file, content and metadata manipulation and search sites, people, comments, tags, favorites, workflow JSON Who’s familiar with CMIS? API was Cloud first – now in 4.2 Image title
CMIS Sessions Getting Started with CMIS, Jeff Potts What's Coming in CMIS 1.1, Greg Melahn Book: CMIS & Apache Chemistry in Action by Florian Müller, Jay Brown, and Jeff Potts Apache Chemistry Project
Public API - Consistency Structure: URLs, HTTP Methods, Response Format – List, Pagination, Entry Common Error Handling & Responses Querying: Paging, Filtering, Where, orderBy Cloud and Enterprise 4.2
API URLs http://localhost:8080/alfresco/api/-default-/cmis/versions/1.1/browser https://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/{entityResource}
API URLs https://api.alfresco.com/-default-/public/alfresco/versions/1/sites https://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/sites Network Id API Namespace Entity mycompany.com alfresco or workflow people tags networks
API URLs https://api.alfresco.com/-default-/public/alfresco/versions/1/sites /public/alfresco/versions/1/sites Scope Version UniqueId UniqueId public/alfresco/versions/1/sites /{siteId}/members/{memberid} API Namespace Entity Relationship
Public API – Using it /nodes/{entityId}/tags /nodes/{entityId}/ratings /nodes/{entityId}/comments /sites /sites/{entityId} /sites/{entityId}/containers /sites/{entityId}/members /people/{entityId}/favorites /people/{entityId}/networks /people/{entityId}/sites /people/{entityId}/sites/<siteId> /people/{entityId}/preferences /people/{entityId}/activities /people/{entityId}/site-membership-requests /tags /networks/{entityId}
Public API Documentation Getting Started API Reference
Public API – Demo Summary Consistent API Across Cloud & On-Prem JSON-Based RESTful, Versioned Easy to Use
Public API Framework Built on Webscripts Consistent No XML Required No FreeMarker, Uses POJOs & Jackson Uses Annotations (nouns) and Interfaces (verbs) Write the Java, we'll handle the REST - Gethin James
Public API – Source code Public SVN
Public API – Adding to it Maven SDK https://github.com/AlfrescoLabs/quickrest
Summary Know the High Level Architecture Don’t Reinvent Wheels Use AMPs for On-Prem Extension Alfresco Maven SDK API for Talking to Alfresco One CMIS, REST Obviously, attend other Summit talks Expert Bar