650 likes | 682 Views
Mobile Development: HTML5 Vs Native. By Rohit Ghatol Director of Engineering,Synerzip Author- Beginning PhoneGap. 1. About me. Director of Engineering – Synerzip Author- Beginning PhoneGap Architect of QuickOffice (now Google) Product, Connect QuickOffice Connect
E N D
Mobile Development: HTML5 Vs Native By Rohit Ghatol Director of Engineering,Synerzip Author- Beginning PhoneGap 1
About me • Director of Engineering – Synerzip • Author- Beginning PhoneGap • Architect of QuickOffice (now Google) Product, Connect • QuickOffice Connect • Document Sync and Authoring Product • Built as a Hybrid Mobile App 2
Topics • Expectations from Mobile Apps • Types of Mobile Apps • Hybrid Case Study • When to choose which route? • What tools are available? 4
Expectations from Mobile Apps Car Pooling Public Transit Driving a Car = Native App = Hybrid App = HTML5 App 5
Rich Mobile Experience • Levelsof rich mobile experience • Level 0 – No Change for Mobile, web app just accessed via mobile browser • Level 1 – Mobile-Friendly WebApp/Site • Level 2 - HTML5 Mobile App • Level 3 - Hybrid Mobile App • Level 4 - Native Mobile App Today’s Focus 6
Topics • Expectations from Mobile Apps • Types of Mobile Apps • Hybrid App UseCase • When to choose which route? • What tools are available? 7
Types of Mobile Apps • HTML5 • Native • Hybrid (HTML5 + Native) 8
HTML5 Mobile App c 9
HTML5 App Overview HTML5 Apps run inside a Browser and cannot make use of many things that Mobile OS provides, like File System, SQLLite Database, Network APIs, Camera, Contacts etc. A few APIs are exposed to browser JavaScripts like GeoLocation, very limited local storage, and more. Browser App http://m.twitter.com Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 12
HTML5 App Capabilities Browser App http://m.twitter.com Some HTML5 Capabilities include: GeoLocation Audio/Video Tag Canvas/SVG Local Storage Web Workers Web Sockets Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 14
HTML5 Pros 15
Pros • Lowest Development Cost • Maximum Reuse • Use Same team • No App Store Distribution hassles • Instant Updates, Clients on latest Version 16
HTML5 Cons 17
HTML5 App Limitations Browser App An HTML5 App runs as long as a browser is running. HTML5 Apps start only when a user starts them; no native-like background processing is available. http://m.twitter.com Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 18
Cons • User needs to open browser • Loading time is slowest • No notification available for updates • Limited access to Phone Features • App Store Marketing not available • HTML5 Fragmentation • Simulation of Native UX 19
Native App 21
Native App Overview Twitter App Full Access Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 22
Pros • Prowess of Mobile is available • Ability to build Richest & Fastest Apps • Notifications Available • Offline Storage Available • Background Processing Available • Entire Device Sensor Array Available • App Store/Market Monetization Possible 24
Cons • Highest Development Cost • Dedicated teams for different Platforms • Architecture Reuse Possible but • Design/Code Reuse not Possible • AppStore/Market approval is prerequisite for launch of new features • Fragmentation is also an issue (Android) 26
Hybrid Apps Overview HTML5 + Native 28
Hybrid App Overview - 1 Twitter App Embedded Embedded Browser file://index.html Hybrid Apps are Native Apps Full Access Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 29
Hybrid App Overview - 2 Twitter App Embedded Embedded Browser file://index.html Web App is hosted inside Native App Full Access Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 30
Hybrid App Overview - 3 Twitter App Embedded Embedded Browser file://index.html Web App's JavaScript can communicate to Native and back Full Access Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 31
Hybrid App Overview - 4 Twitter App Embedded Embedded Browser file://index.html HTML5 contains BI, Native Component are built as Lego blocks Business Intelligence Custom Components Full Access Mobile OS File System SQL-Lite Network Camera GeoLocation ..... ..... Native APIs Contacts Accelerometer 32
Hybrid Pros 33
Pros • Best of Both Worlds • Native App with Embedded Browser • HTML5 in Embedded Browser • Business Logic in HTML 5/Server • Sensor Array available via Native • Any Extensions are Native 34
Hybrid Cons 35
Cons • Development Environment is Complex • Eclipse, XCode, Visual Studio • CIT Builds and Release cycles • Limited Native Skills are required • Native Skills required for extensions across platforms • Pains from both worlds─Catching up on new OS and HTML5 Feature sets 36
Capability - Platform Graph Full Capability Native App Hybrid App Multiple Platform Single Platform HTML5 App Partial Capability 37
Topics • Expectations from Mobile Apps • Types of Mobile Apps • Hybrid App UseCase • When to choose which route? • What tools are available? 38
QuickOffice Connect • File Sync Service for Mobile/Desktop • Built as Hybrid Mobile App • User Interface in HTML5 • Sync Code is Native • Built using inhouse PhoneGap-like platform 40
QuickOffice Connect Demo Youtube Video – http://www.youtube.com/watch?v=u7Cdu-jusB8 47
Topics • Expectations from Mobile Apps • Types of Mobile Apps • Hybrid App UseCase • When to choose which route? • What tools are available? 48
When to choose which route? • Rich User Experience • Performance • Development Cost • Time to Market • App Store Distribution • Security 49