Making Sense of Mobile Development Options Luis Sala Director, Technology Alliances @LuisSala
Disclaimers Mobile = Smartphone & Tablet Native discussions have an ios bias But the concepts all apply to Android and other platforms
A brief survey...
ios? Android? Other?
ios 5 or 6? iphone Model? ipad Model?
Android ICS or Jellybean? Google Chrome?
Have you developed a mobile app?
Native? Hybrid? HTML5?
What s your poison? Java, JavaScript, Objective-C, others?
What are your mobile development concerns?
Let s begin...
Alfresco as a Platform for Content Apps
Content-centric Apps
Alfresco: The Content Platform CMIS API: Now available on-premises and in the cloud Device Native SDK Native Mobile SDK: Highly optimized for your devices. Learn more: https://developer.alfresco.com CMIS Alfresco
Frameworks vs. Platforms
Frameworks Apply primarily to client-side development Cocoa Sencha Touch Appcelerator Titanium Phonegap Ember.js, Backbone.js & others. General-purpose HTML5 frameworks often used for mobile web apps. Often provide the following: Model-View-Controller Architecture (or similar) Helpers of all types UI, interaction (touch), networking, social, camera, GPS/location, etc. Build, Testing & Packaging Tools
Platforms Apply primarily to server-side development Parse Stackmob Alfresco Often provide the following: Data Persistence Usually RESTful and JSON-based. Sometimes NOSQL-based Server-Side Logic Deployment & Hosting
Three Paths
The Mobile Development Continuum... Native Hybrid
Going Native
Once you ve set about a task, it is better to do it than to live in fear of it... Logen Ninefingers The Blade Itself by Joe Abercrombie
Why Native? Performance & User Experience Targeting only one platform Full device access
Caveats Single-platform Learning curve Both: New programming models. Android: Large class library ios: Large class library & Cocoa framework Some apprehension about Objective-C Device fragmentation Particularly bad for Android Slightly mitigated by hybrid and HTML5
Objective-C & Xcode Features Automatic Reference Counting (ARC) Almost as easy as garbage collection, but far more powerful. Message-oriented [myarray insertobject:anobject atindex:0]; Key-Value Observing (KVO) Keep models and views in sync Asynchronous Blocks Encapsulate and execute anonymous functions Threading & Grand Central Dispatch (GCD) Optimized parallelism managed by the framework
ios is not that hard... Learning native development takes about the same amount of time as learning any new framework. Objective-C 3-4 days Xcode 1-2 Weeks Cocoa 2-3 Weeks
Case Study: WWDC 12 Native App
Why HTML5? Mostly cross-platform Most mobile devices feature Webkit-based browsers Leverage existing development skills HTML, CSS, JavaScript Easy distribution through URL Well-suited for: Text-heavy, content-oriented sites Relatively simple and limited interactions / screens
Caveats No distribution through app marketplaces Limited data persistence with localstorage and indexeddb Limited touch capabilities No gesture recognizers. Performance: CPU & memory constraints Inconsistent use of hardware acceleration eg. box-shadow can kill performance on certain devices. Not always write once, run anywhere Inconsistent support of HTML5 features. Supporting different form-factors takes a lot of work.
Making HTML5 Work Pick your target platform & devices Keep the list short. Avoid making compromises that affect experience. Develop single-page apps to avoid page refreshes Use adaptive & responsive designs Be aware of screen orientation and use simple layouts eg. Master-detail views are best on tablets, not smartphones. Emphasize touch: Big buttons Limit pinch-zoom Limit use of hyperlinks
Case Study: Dreamforce Mobile Web App
Hybrid TRIGGER.IO
Why Hybrid? Leverage existing skills JavaScript & HTML App marketplace distribution Native UI control access Access to device features Camera, storage, database, etc.
Two Primary Hybrid Models JavaScript Core Web Core Native View HTML5 JavaScript Controller JavaScript Native Model Native Appcelerator Titanium Phonegap / Cordova Rho Mobile Trigger.io
Caveats Non-trivial apps are still hard to develop Class libraries, UI & best practices all take time to master Jack-of-all-trades, master-of-none... Consistent cross-platform UI requires compromises Limited access to native animations for fluid UI Embedded web views can be janky It s still a DOM! Limited JavaScript acceleration in ios Nitro not included in UIWebView
Case Study: Dreamforce Hybrid Web App
Case Study: CodeStrong Hybrid Web App
Summary
Summary Technology Pros Cons Native High-Performance Device access Complete flexibility HTML5 Fast development of simple apps Cross-browser support Learning curve Not cross-platform Limited device access Framework learning curve Limited gesture support Hybrid Near-native performance with some frameworks JavaScript & HTML-based development App marketplace distribution Improved device access Learning curve Not always truly crossplatform Limited gesture support
Tool Round-up
HTML5 & Hybrid JavaScript Frameworks Hybrid Frameworks Appcelerator Titanium Apache Cordova aka Phonegap Rho Mobile Trigger.io & Toolkits Ember.js Enyo.JS jquery & jquery Mobile Sencha Touch
Alfresco Technology Partner Program Become a registered developer https://developer.alfresco.com Build an app Apply to become a Technology Partner http://alfresco.com/partners/program/technology
Parting Thoughts
UX Matters
Native is not as complex as it seems...
Despite any opinions expressed here...
Make the choice that s right for you.
After all, you ve got to be realistic about these things... Logen Ninefingers The Blade Itself by Joe Abercrombie
Recommended Sessions TODAY Session Title Content Solutions From Paper to Mobile The Alfresco ios SDK The Alfresco Android SDK Room Ballroom B & C Ballroom B & C Ballroom B & C TOMORROW Session Title HTML5 for Multi-Device, Content Rich Apps Room Corinth