devcon-alfresco i os mobile application details and design

36
Alfresco iOS Mobile Application Details and Design Ryan McVeigh, Director of Enterprise Integration - Zia Consulting Gi Lee, Principal Consultant – Zia Consulting

Upload: zia-consulting

Post on 08-May-2015

862 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: DEVCON-Alfresco i os mobile application details and design

Alfresco iOS Mobile Application Details and Design

Ryan McVeigh, Director of Enterprise Integration - Zia Consulting

Gi Lee, Principal Consultant – Zia Consulting

Page 2: DEVCON-Alfresco i os mobile application details and design

Who are we?

Ryan McVeigh• Director @ Zia

• Responsible for Zia’s ECM Practice

• CMIS Secretary and Technical Editor

• Represented BEA Systems and Oracle

• Zia’s lead CMIS representative

Gi Lee• Principal Consultant @ Zia

• Architect of Alfresco Mobile and Zia’s Fresh Docs products

• CMIS Committee Member

Page 3: DEVCON-Alfresco i os mobile application details and design

Who is Zia?A firm with deep technical expertise & strategic insight, coupled with our Agile software methodology, provides numerous benefits to our customers:

Benefits• Achieve ROI by delivering improved operational efficiencies

• Boost productivity by creating collaborative work environments

• Maintain access and control of information through the enterprise

• Allow employees to find the information they need, when they need it

• Increase end-user adoption

• Agile training by using Zia methodology and Rally tools

• Raving fan customers

Professional Qualifications• Highly-experienced, accredited senior staff consisting of Business

Analysts, Enterprise Architects, Software Engineers and Data Architects

• Platinum Alfresco Professional Services & OEM Partner

• Platinum Ephesoft Partner

• Alfresco 2010 Implementation of the Year with Denver

• MuleSoft Partner

Our Partners

Page 4: DEVCON-Alfresco i os mobile application details and design

Agenda

• Alfresco Mobile History • Architecture Overview• CMIS Refresher• Demo• Technical Walkthrough

• CMIS Features

• Alfresco RESTful API• Open Source Project• Roadmap & What’s Next?• Questions?

Page 5: DEVCON-Alfresco i os mobile application details and design

Alfresco Mobile History

• Zia released Fresh Docs for iOS in December 2009• Android application also available• Alfresco and Zia partnership entered this year for

Alfresco Mobile

Page 6: DEVCON-Alfresco i os mobile application details and design

Architecture Overview

Mostly a CMIS application talking to AlfrescoSeveral features specific to Alfresco

AlfrescoAlfresco

CMISCMIS

RESTREST

Page 7: DEVCON-Alfresco i os mobile application details and design

CMIS Refresher

CMIS TC Goals & Scope• Enable applications to target different ECM repositories uniformly

• Provide a set of basic services enabling richer ECM applications and use cases

• All for loose coupling of an ECM application on the underlying repository

• Use popular protocol bindings

• REST / AtomPub

• Web Services / SOAP

Page 8: DEVCON-Alfresco i os mobile application details and design

Demo

Alfresco Mobile in Action – A Few Features• CMIS:

• Login to Alfresco over HTTP or HTTPS

• Browse, Search, Display Content and Edit Metadata, Upload Media

• Create Folders

• Alfresco

• Alfresco Activities

• Like & Unlike, Comment on Documents

• iOS

• Local Downloads

• Multi Tasking

Page 9: DEVCON-Alfresco i os mobile application details and design

Design

• Navigation based app for browsing CMIS repositories• Layered on Alfresco specific functionality• Hierarchy of Table Views • Universal binary

Page 10: DEVCON-Alfresco i os mobile application details and design

Designed for the iPad

• Still a navigation based app but with iPad-specific controllers • Split View Controller• Still a universal binary

Page 11: DEVCON-Alfresco i os mobile application details and design

Features using CMIS

Page 12: DEVCON-Alfresco i os mobile application details and design

Features using the Alfresco RESTful API

Page 13: DEVCON-Alfresco i os mobile application details and design

App Launch / Sites / Browse

• CMIS: Retrieve AtomPub Service Document• Alfresco: Request Sites List• CMIS: Request folder children for the Root Collection• CMIS: Navigate into a folder or site

Page 14: DEVCON-Alfresco i os mobile application details and design

Activities

• Alfresco: Retrieve user’s activity feed

• User Clicks on a document cell• CMIS: Retrieve Document via getObjectByID service

• User clicks on the “info icon”• CMIS: Retrieve Document Metadata using getTypeDefinition service

Page 15: DEVCON-Alfresco i os mobile application details and design

Search

• Execute a CMIS Query• Full-text search:

• SELECT * FROM cmis:document WHERE CONTAINS(‘keywords’)

• Search by cmis:name:• SELECT * FROM cmis:document WHERE CONTAINS(‘~cmis:name:’*keywords*’)

Page 16: DEVCON-Alfresco i os mobile application details and design

Calling an AtomPub Service

CMIS RESTful RequestCMIS RESTful Request

AtomPub XMLAtomPub XMLAlfrescoAlfresco

Page 17: DEVCON-Alfresco i os mobile application details and design

Creating an HTTP Request

• Using ASIHTTPRequest build your request

• Delegate handles events from the request

Page 18: DEVCON-Alfresco i os mobile application details and design

Parsing AtomPub XML

Event-Driven XML Parsing (SAX)• Parser sends messages (parsing events) to it’s delegates (callbacks)

Use NSXMLParser & NSXMLParserDelegate• Recommended by Apple• Native API• Objective-C based implementation

Why not use the Tree-based API (DOM)?• Apple does not provide the API for iOS

Page 19: DEVCON-Alfresco i os mobile application details and design

NSXMLParser & NSXMLParserDelegate

Setting up NSXMLParser

NSXMLParserDelegate methods

– parser:didStartElement:namespaceURI:qualifiedName:attributes:– parser:didEndElement:namespaceURI:qualifiedName:– parser:foundCharacters:

Page 20: DEVCON-Alfresco i os mobile application details and design

Calling Alfresco APIs

RESTful HTTP RequestRESTful HTTP Request

JSONJSON

AlfrescoAlfresco

Page 21: DEVCON-Alfresco i os mobile application details and design

We Like JSON!

• Simple to consume!

• Use SBJson

• Parses into NSDictionary and NSArray objects

• CMIS 1.1 will contain a Browser Binding!

Page 22: DEVCON-Alfresco i os mobile application details and design

Open Source Availability

Hosted on Bitbucket

http://bit.ly/rrNdTc

Search for “alfresco-mobile” at bitbucket.org

Released under the Mozilla Public License Version 1.1

Page 23: DEVCON-Alfresco i os mobile application details and design

API’s and Libraries Used

• Cocoa Touch Frameworks• The API’s Apple provides to build an iOS application

• ASIHTTPRequest• Communication with the server• Wrapper around Apple’s CFNetwork API

• SBJson• Fast, simple & clean JSON parser and generator

• GHUnit• Objective-C Test framework

Page 24: DEVCON-Alfresco i os mobile application details and design

What do I need to know?

• Git

• Objective-C

• iOS App Programming

• Alfresco RESTful API

• CMIS AtomPub Binding

Page 25: DEVCON-Alfresco i os mobile application details and design

Resources

Apple’s iOS Developer Library & Development videos•View & View Controller Programming Guide•Table View Programming Guide•Key-Value Programming Guide•Memory Management Programming Guide•iOS Human Interface Guidelines

Beginning iPhone 4 Development: Exploring the iOS SDK, Apress Publishing

Programming in Objective-C, Sam’s Publishing

Page 26: DEVCON-Alfresco i os mobile application details and design

Common Design Patterns

• Model-View-Controller• A pattern to relate the user interface to an underlying data model.

• Delegation• A patten where an object, the delegator, delegates tasks to an associated

helper object, the delegate.• The delegate is responsible for executing the task for the delegator.

• Target-Action• Target-action is a design pattern in which an object holds the information

necessary to send a message to another object when an event occurs.

Page 27: DEVCON-Alfresco i os mobile application details and design

Tools for iOS Development

• Mac with OS X Snow Leopard or Lion

• XCode 4•Integrated Development Environment•Integrated Build System•Debugger•Interface Builder•iOS Simulator

• Instruments•Performance and behavior analysis

Page 28: DEVCON-Alfresco i os mobile application details and design

Getting Started

• Create an iOS developer account

• Install the latest version of XCode 4

• Clone the repository• git clone https://[email protected]/ziadev/alfresco-mobile.git

• Open the Project

Page 29: DEVCON-Alfresco i os mobile application details and design

Two Targets?

Two Targets: Alfresco & Fresh Docs

Page 30: DEVCON-Alfresco i os mobile application details and design

Getting Started

• Select a target and the

iOS Simulator to Use

• Build and Run

Page 31: DEVCON-Alfresco i os mobile application details and design

How do I install it on my device?

See iOS Provisioning Portal Resources & How-To Guides

Page 32: DEVCON-Alfresco i os mobile application details and design

How Do I Contribute?

Step-by-step example for forking and sending a pull request:

http://bit.ly/pbIDRk

Page 33: DEVCON-Alfresco i os mobile application details and design

Roadmap

Features under future consideration• Browse Site Members

• Search and Browse for People

• Version History and Upload New Versions

• Browse Recent Docs

• More…

Alfresco Mobile Product Manager• Marc Dubresson

[email protected]

Disclaimer: Neither Alfresco nor Zia are making any claims or commitments to deliver these features.

Page 34: DEVCON-Alfresco i os mobile application details and design

What’s Next?

Zia is hosting a deep dive Webinar with Alfresco• November 1 @ 1pm ET

• http://bit.ly/tztqRL

Code is Open Source• Happy to have contributors

• Alfresco will coordinate releases of Alfresco Mobile

• Zia will coordinate releases of Fresh Docs

• If you want to release to the Apple App Store, contact us

Come see us at our booth!

Page 35: DEVCON-Alfresco i os mobile application details and design

Contact Us

Ryan McVeigh – ECM Business Owner:• [email protected]

Gi Lee – Fresh Docs Architect• [email protected]

Michael Muller – Fresh Docs PM• [email protected]

Page 36: DEVCON-Alfresco i os mobile application details and design

Q & A