building content-rich java apps in the cloud with the alfresco api

42
Building Content-Rich Java Apps in the Cloud with the Alfresco API Jeff Potts Chief Community Officer Apache Chemistry cmislib lead

Upload: jeff-potts

Post on 13-May-2015

6.290 views

Category:

Technology


2 download

DESCRIPTION

This presentation, originally delivered at JavaOne on October 2, 2012, talks about why you should use Alfresco instead of rolling your own content repository and discusses the new public Alfresco API for writing content apps that persist content to Alfresco in the Cloud.

TRANSCRIPT

Page 1: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Building Content-Rich Java Apps in the Cloud with the Alfresco APIJeff PottsChief Community OfficerApache Chemistry cmislib lead

Page 2: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Agenda

• What is Alfresco?• Why You Shouldn’t Roll Your Own Repo• Getting Started with the API (Demos)– Signing up for an API key– Hitting the API with a REST client– Doing something simple but useful with Java

• Brief Intro to CMIS• Guidelines/Tips• Re-cap and What You Should Do Next

Page 3: Building Content-Rich Java Apps in the Cloud with the Alfresco API

1enterprise content management platform across cloud, on-premise or both

API for content apps that can run in the cloud, on-premise or both

content hub for your enterprise tablets

cloud on-premise hybrid cloud sync

What is Alfresco?

Page 4: Building Content-Rich Java Apps in the Cloud with the Alfresco API

2,200 enterprise customers

66 countries

6.6 million users

3.3 billion documents managed

Page 5: Building Content-Rich Java Apps in the Cloud with the Alfresco API

For users: Accesscontent on any device,with any content tool, anywhere

For organizations: Manage and control company content, with whatever level of security, customization, integration or workflow is required

For developers: Target 1 standards-based API

Benefits

Page 6: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Open Sourcefree access to source code for developers

Open StandardsWebDAV, CIFS, SharePoint Protocol, CMIS

Choiceuse any tool, any device, deploy in cloud, on-premise or both

Flexibilitycustomizable, extensible, easily integrated

How do we deliver?

Page 7: Building Content-Rich Java Apps in the Cloud with the Alfresco API

A Few Random Examples

• Contract negotiation, creation, & review

• Press request/fulfillment• Board room/B2B collaboration• Field sales collateral creation &

communication• Customer file sharing• University course guide

authoring/publishing

Page 8: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Source: eqqman

Document-Related Pain

Page 9: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Not so fast, Ryan

Gosling!

Page 10: Building Content-Rich Java Apps in the Cloud with the Alfresco API

DIY: Relational May Not Cut It

• Relational is good at text and numbers. Binary data? YMMV

• Size limits• Random seek (streaming)• Search: Some relational databases

can index into blobs, but not all

Page 11: Building Content-Rich Java Apps in the Cloud with the Alfresco API

And what about…

• Security framework• Search• Business

Process/Workflow Engine

• Transforms/Extractions/Renditions

• Scheduled jobs• WebDAV, CIFS, FTP or

other authoring integrations

• Versioning• Check-in/Check-out• Remote API• Replication• Social features• Mobile access• Custom code to

integrate all of these subsystems

Page 12: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Sourc

e:

gobuck

s2

What Have We Done?

Page 13: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco API

Alfresco Content Platform

• Our Apps, Your Apps, Third-Party Apps

• Any device• One API• On-Premise, in the

Cloud, or Both• Open Source

(LGPLv3)Sync

Repository + Services

Page 14: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Repository

• Hierarchical collection of typed nodes– Folders, Documents, Contracts, Resumes

• Nodes may have content associated with them

• Metadata• Secured• Searchable

Page 15: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Services

• Embedded workflow (Activiti)• Transformations• Rules• Versioning• Many more

Page 16: Building Content-Rich Java Apps in the Cloud with the Alfresco API

API Options

• Alfresco’s “foundation” API is Java• Server-side JavaScript is also an

option• Remote APIs– CMIS - Atom REST or SOAP– HTTP REST Webscripts - Java or

JavaScript

• Alfresco Cloud API– Launched October 2!

Source: 96dpi

Alfresco API

Page 17: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco API & SDK

• What are we announcing?– New public API for Alfresco in the Cloud• Based on CMIS (AtomPub) and Alfresco REST

(JSON)

– Alfresco Mobile SDK• iOS and Android client SDKs• Wrap the new Cloud API and the existing on-

premise API• Coming soon!

Page 18: Building Content-Rich Java Apps in the Cloud with the Alfresco API
Page 19: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco API Launch Partners

Page 20: Building Content-Rich Java Apps in the Cloud with the Alfresco API
Page 21: Building Content-Rich Java Apps in the Cloud with the Alfresco API

LET’S SEE HOW THIS WORKS!

Page 22: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco Cloud UI

Page 23: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco Mobile

Page 24: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Developer Portalhttp://developer.alfresco.com

http://youtu.be/TdAFYy0QttU

Page 25: Building Content-Rich Java Apps in the Cloud with the Alfresco API

User grants access

Sign up for an API key

How OAuth2 Authentication Works

Assigns you a consumer key

and secret

Application Alfresco End-User

Invokes the Authorize URL Asks the user

for permission

Redirects to your app’s

callback URLGrabs the

returned code

Exchanges the code for an

access token Returns an access token

and expirationAdds the token to Authorization

header

Not shown: Refresh after access token expiration

Page 26: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Example: Hitting the REST API

http://youtu.be/5QS0CNsPJEY

Page 27: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco REST API

• Sites– Members– Favorites

• Networks• People• Containers• Activities• Ratings• Comments• Tags

List will expand over time

Page 28: Building Content-Rich Java Apps in the Cloud with the Alfresco API

So what is CMIS, anyway?

Page 29: Building Content-Rich Java Apps in the Cloud with the Alfresco API

What is CMIS?

• Content Management Interoperability Services

• Language-independent, vendor-neutral API for content management– CRUD functions for nodes– Check-in/check-out– Associations– Permissions (Access Control Lists)– Policies– Queries– Repository traversal

Page 30: Building Content-Rich Java Apps in the Cloud with the Alfresco API

The Beauty of CMIS

?

Presentation Tier

Content Services Tier

?Enterprise Apps Tier

REST SOAP

Page 31: Building Content-Rich Java Apps in the Cloud with the Alfresco API

• Open Source implementations of CMIS

• Apache Chemistry is the umbrella project for all CMIS related projects within the ASF– OpenCMIS (Java, client and server)– cmislib (Python, client)– phpclient (PHP, client)– DotCMIS (.NET, client)

Page 32: Building Content-Rich Java Apps in the Cloud with the Alfresco API

CMIS & Apache Chemistry in Action

• Everything you need to know about CMIS 1.0 & 1.1

• Lots of Groovy and Java examples

• Also covers Python, Android, & iOS

• Now on MEAP!• 37%-off: 12cmisal

Page 33: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Example: Create, Find and Comment on a Document with Java

Screenshot, TBD

http://youtu.be/1ZtmoPdCKJI

Page 34: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Things to Consider

• Rate limits– 5 requests/second, 10,000 requests/day

(Dev)– 50 requests/second, 100,000 requests/day

(Prod)

• No limit on # of applications• Alfresco Cloud users own their

content• OpenCMIS 0.8.0-SNAPSHOT• cmislib 0.5.1dev

Page 35: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Where to Get Help

• Alfresco API forum• #alfresco on freenode IRC• Alfresco Technical Discussion Google

Group• http://code.google.com/p/alfresco-api-j

ava-examples

• http://code.google.com/p/alfresco-api-python-examples

• Come by the booth!

Page 36: Building Content-Rich Java Apps in the Cloud with the Alfresco API

RECAP

Page 37: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Alfresco as a Content Platform• Alfresco is an open source ECM

platform– Repository + Services + API

• Choice throughout the stack• Flexibility in deployment options• Standards-based API– CMIS AtomPub + Alfresco REST

• Register your application at developer.alfresco.com

Page 38: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Register AppCloud Account

Sign up for afree 10GB Alfresconetwork in the cloud.

Your Next Steps

Participate

Join our community of developers at forums.alfresco.com, in IRC, and on Twitter

Become a Registered Developer at developer.alfresco.com

Grab your app key and secret

Page 39: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Berlin, GermanyNovember 6 &

7

San Jose, CaliforniaNovember 14 & 15

http://www.alfresco.com/devcon

Page 40: Building Content-Rich Java Apps in the Cloud with the Alfresco API

Join Our Communityhttp://wiki.alfresco.com/wiki/Local_Communities

Page 41: Building Content-Rich Java Apps in the Cloud with the Alfresco API

For More Information…

• Alfresco Developer Portal– http://developer.alfresco.com

• Alfresco Forums– http://forums.alfresco.com

• Alfresco Wiki– http://wiki.alfresco.com

• Alfresco Blogroll– http://blogs.alfresco.com

• ECM Architect Blog– http://ecmarchitect.com

My Contact Info…Jeff Potts

Email:[email protected]

Twitter/Skype:jeffpotts01

Page 42: Building Content-Rich Java Apps in the Cloud with the Alfresco API