Slide 1

Slide 1 text

What Every New Developer Should Know About Alfresco Richard Esplin Community Technology

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Where will document management fit? Storage Container (Public Domain CC0 Pixabay) Platform (CC BY 2.0 didactylos47@Flickr)

Slide 4

Slide 4 text

Content Models The rough equivalent to Data Definition Language in Alfresco

Slide 5

Slide 5 text

Everything is a node, nodes are typed Content Model is expressed in XML • Defines types, aspects, properties, associations, constraints • Cold-deploy most common, hot deploy possible Hierarchical • Types inherit from super types Extend the out-of-the-box model with your own

Slide 6

Slide 6 text

Forms Forms are modeled in XML • Explorer: web-client-config-custom.xml • Share: share-config-custom.xml Form Service • Processes and persists form data • Filters for intercepting form data before and after form submit • RESTful API for retrieving form model as JSON

Slide 7

Slide 7 text

Rules You can automate a lot of content processing using rules that trigger rule actions

Slide 8

Slide 8 text

Rules save time Defined in the UI by end-users If this (criteria) then that (action) Associated with a folder • Can optionally be applied to sub-folders Can easily add your own custom actions to the list

Slide 9

Slide 9 text

Web Scripts Roll your own REST API using this MVC framework or leverage the out- of-the-box URLs

Slide 10

Slide 10 text

Roll your own REST API Web Script Framework used to declare a URL, bind it to logic, provide views • Model-View-Controller pattern • Controller implemented in server-side JavaScript or Java • Views implemented in FreeMarker Deployed to the repository or the classpath Can also have web scripts on the Share tier

Slide 11

Slide 11 text

Out-of-the-box URLs Web script console lists all web scripts • http://localhost:8080/alfresco/service/index • http://localhost:8080/share/service/index Pay attention to the lifecycle • Lifecycle “internal” may change without warning Use CMIS or public API whenever possible

Slide 12

Slide 12 text

CMIS CMIS is the preferred API for integrating with Alfresco

Slide 13

Slide 13 text

Use CMIS for CRUD functions Important ECM industry specification managed by OASIS Alfresco uses OpenCMIS, the de facto standard implementation of the spec • Available at http://chemistry.apache.org All you need is a service URL • http://localhost:8080/alfresco/cmisatom (4.x) For Java, Python, .NET, PHP, Objective-C, Android libraries see Apache Chemistry

Slide 14

Slide 14 text

Extensions Avoid changing files included with the Alfresco distribution

Slide 15

Slide 15 text

Use AMPs to package extensions An AMP is a ZIP with a special folder structure, a manifest, and a funny name The MMT is used to deploy (merge) your AMPs with alfresco.war and share.war Use AMPs even when you do not intend to publicly distribute your customizations https://wiki.alfresco.com/wiki/ Packaging_And_Deploying_Extensions

Slide 16

Slide 16 text

Debugging Use the source, turn up logging verbosity, leverage one of many consoles

Slide 17

Slide 17 text

Developer, Heal Thyself Configure Eclipse for remote debugging Turn up logging in log4j.properties Turn on the server-side JavaScript debugger Use a client-side JavaScript debugger Use Florian Maul’s JavaScript Console Use the Node Browser Use the OpenCMIS Workbench Use SurfBug

Slide 18

Slide 18 text

Asking for Help Help the Alfresco community help you

Slide 19

Slide 19 text

Help Us Help You The community welcomes everyone Invest some sweat equity • Read the docs • Search the web • Try a few things before asking for help Be specific Be polite Pay it forward

Slide 20

Slide 20 text

Resources http://www.alfresco.com/resources/ documentation/getting-started

Slide 21

Slide 21 text

Resources Alfresco Forums http://forums.alfresco.com Alfresco Wiki http://wiki.alfresco.com Alfresco Blogs http://blogs.alfresco.com CMIS Resources http://cmis.alfresco.com ECM Architect Blog http://ecmarchitect.com Documentation http://docs.alfresco.com Freenode IRC #alfresco Twitter @alfresco Code Examples http://code.google.com/p/share -extras https://github.com/jpotts/alfresc o-developer-series

Slide 22

Slide 22 text

Thank You! Richard Esplin @esplinr http://richard.esplins.org