940 likes | 1.05k Views
Cross Platform Mobile Applications. By Rohit Ghatol Contact me – rohitsghatol@gmail.com. Introduction. Rohit Ghatol Project Manager @ Synerzip Associate Architect @ QuickOffice Inc GTUG Manager & Tech Next Founder Certified Scrum Master Corporate Trainer (Agile and Technical)
E N D
Cross Platform Mobile Applications By Rohit Ghatol Contact me – rohitsghatol@gmail.com
Introduction Rohit Ghatol • Project Manager @ Synerzip • Associate Architect @ QuickOffice Inc • GTUG Manager & Tech Next Founder • Certified Scrum Master • Corporate Trainer (Agile and Technical) • Was part of OpenSocial at Google
Topics • Overview • Understanding Mobile Apps • Cross Platform Mobile App Development • Pure HTML/JavaScript – PhoneGap • Interpreted JavaScript – Titanium Mobile • Native Mobile App Development • Hybrid Mobile App Development • Comparison between PhoneGapVs Titanium • Conclusion • Q & A
Overview The process of developing Applications for various mobile platform using common source code with little or no change to the common source. This presentation focuses on Comparing two frameworks each taking a different approach to solve the above problem. We will Compare PhoneGapVsTitanium .
1. Mobile Features Mostly Feature Sub Set Complete Feature Set
2. Tablet Features Almost Complete Feature Set Complete Feature Set
3. User Interaction Touch based Accelerometer Traditional Compass
4. Location aware Can be Location Aware but approximate Location Aware and highly accurate
5. Sensors Handy Camera and Voice Recording Upcoming NFC (Near Field Communication) turning phone into Credit Card, Access Card, Business Card Exchanger
e.g Shopping Applications Scan a product’s barcode to know if it has the lowest price. If not, then navigate to a store which has the lowest price
6. Push Notifications Push Notification Notifying the User proactively
1. OS Fragmentation Windows 7 Fragmentation
2. Multiple Teams/Product Windows 7 Multiple Teams/Products
3. Uniform User Experience Windows 7 Uniform User Experience
4. Feature Fragmentation Feature Fragmentation
Types of Mobile App Dev • Native Mobile Apps • Cross Platform Mobile Apps • Hybrid partly Native partly Cross Platform
Native Mobile Apps When To When Not To Performance is not the main criteria More or less Replicates Web Apps with few device feature Standard Restful Widget based apps Many Platforms • High Performance Apps • Heavy on OS and Device Features • Complex N/W comm. • Canvas based Apps • Only Few Platforms
Cross Platform Mobile Apps When To When Not To High Performance Apps Heavy on OS and Device Features Complex N/W comm. Canvas based Apps Only Few Platforms • Performance is not the main criteria • More or less Replicates Web Apps with few device feature • Standard Restful • Widget based apps • Many Platforms
Cross Platform Mobile Apps When To When Not To • Time to market is critical • Saving Cost is critical
Hybrid Mobile Apps When To Why To • Fairly Simple UI • Complex Backend • Quite few platforms • E.gShareFile • Recommended way - PhoneGap Plugin • Some parts of app are common • Rest parts are different • Use Cross Platform to develop common part • Use Native to develop the weight lifting parts
WEB APPLICATION Bridge - JavaScript – Java – Objective C UI Platform APIs OS – Android / iPhone JavaScript – Java Bridge Mapping to Native OS – Android / iPhone Cross Platform Strategies Common Source Cross Platform Source Code Common Platform Mapping to Native Titanium Mobile PhoneGap
Modern Browsers All new Smart Phones come with modern browsers, which have better support for HTML5/CSS3 specs
WebViews All of these smart phones supports using these modern browsers as embedded views (aka WebViews)
JavaScript to native and back All these browser engine (most common being webkit) support Javascript to talk to native code and back Native Code (Java/C++/ObjC) HTML/Javascript JSON packets
Hybrid Applications HTML/Javascript application loads Google Maps and talks to the native code to gain access to GPS location Native Code (Java/C++/ObjC) HTML/Javascript GPS Location
Over all Architecture HTML5/CSS3 Application UI Framework e.g jQueryMobile PhoneGap API Phone Gap Bridge Camera GPS SQLite SQLite Compass etc File System Accelerometer
Possibilities • Limitless Possibilities • Expose Camera, Accelerometer, GPS, any of the phones sensors to javascript • Instead of just building Browsed Based applications augment with more phone features
Development • HTML/CSS Application uses Common API exposing device features
Development • Sample code
Over all Architecture Javascript Based Application Titanium UI API Titanium Phone API Titanium Framework Window Dialog SQLite SQLite Compass etc File System Accelerometer
Development • Two API Sets • One for UI * (Specific to Titanium Mobile) • Create Windows • Create Dialogs • ……. • One for Phone Features • Same as PhoneGap • Access Camera • Access GPS • ……
Development UI API Set
Development UI API Set
Issues • Common API set across platforms is always minimum • E.g IPhone as a widget, which Android not have • Fragmentation of the API itself. • What is platform specific and not part of Common API comes in Platform specific api?
Mobile App Dev Frameworks Common Platform Mapping to Native Titanium Mobile • PhoneGap * Rhodes Mobile is another promising framework, but out of scope for today’s discussion
Compare Screens (IPhone) PhoneGap Titanium Mobile
Compare Screens (Android) PhoneGap Titanium Mobile
Open Source BSD License MIT License
PhoneGap • Only platform to support 6 Platforms
PhoneGap • Standards based and extended
PhoneGapPrerequistes • Need to be acquainted with Android, IOS, BlackBerry, WebOS • Need to be expert at HTML/Javascript or framework like GWT • Need to be acquainted with JavaScript libraries like • Jquery • script.aculo.us • Prototype • Etc • Or Ajax framework like GWT • Need different project for each platform, inject PhoneGap code in each project • PhoneGap has no IDE, use Eclipse for Android and Xcode for IPhone