Bridging the gap
-
Upload
anoop-sankar -
Category
Technology
-
view
843 -
download
0
Transcript of Bridging the gap
Bridging the Gap
Cross Platform Mobile Application Development
Me
The Late 90’s
Desktop Apps
• A predominant O/S – Windows• Minimal design constraints• Few well developed patterns• Few established tools– Visual Studio– Delphi
• Web was for documents
The App Economy – Early Days
• ‘Freeware’ and ‘Shareware’• Limited channels for delivery• Tough on the consumer too
• Rags to Riches – near to impossible
Today
• 7 Billion People• 0.7 Billion Personal Computers• 5 Billion Mobile Phones• 1 Billion Mobile ‘Smart’ Phones
• Shift from the PC to the Smart Phone
Today
• Single channel delivery and acquisition for smart phone apps
• The advent of the App Stores• Why?– Micropayments– Reach– Free marketing– Easy for consumers
A Fragmented Market
A Fragmented Market
Platform Toolkit
Android Java (Dalvik)
Symbian C++, Java ME
Windows Mobile .NET
iPhone Objective C
Blackberry OS Proprietary Java Libraries/API
Cross Platform Development
• Java• PhoneGap• RhoMobile• Appcelerator Titanium• MoSync
PhoneGap
• HTML / JavaScript / CSS
• If you know how to develop a webpage, you are in the party.
• Supports – – iPhone, Android, Symbian, – Blackberry, Windows
PhoneGap
Native Methods
• Accelerometer• Camera• GPS• Contacts• Network• Messaging
Example<html> <head> <title>Device Properties Example</title>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script> <script type="text/javascript" charset="utf-8">
// Wait for PhoneGap to load function onLoad() { document.addEventListener("deviceready", onDeviceReady, false); }
// PhoneGap is ready function onDeviceReady() { navigator.geolocation.getCurrentPosition(onSuccess, onError); }
// onSuccess Geolocation function onSuccess(position) { var element = document.getElementById('geolocation'); element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' + 'Longitude: ' + position.coords.longitude + '<br />' + 'Altitude: ' + position.coords.altitude + '<br />'; }
// onError Callback receives a PositionError object function onError(error) { alert('code: ' + error.code + '\n' + 'message: ' + error.message + '\n'); }
</script> </head> <body onload="onLoad()"> <p id="geolocation">Finding geolocation...</p> </body></html>
1
2
3
4
5
Deploying
• PhoneGap compiles using the original SDKs• Android ADT on Eclipse• Apple OSX, Xcode for iOS
• Minimal platform dependent code• Faster turn around times• Code re-use
Further reading
• www.phonegap.com• www.appcelerator.com• www.rhomobile.com