cross platform mobile developmemnt

50
Cross-Platform Mobile Development Write Once.. Run Everywhere.. Any device..

Upload: soutom-dhara

Post on 15-Jan-2015

740 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Cross Platform Mobile Developmemnt

Cross-Platform Mobile Development

Write Once..

Run Everywhere..

Any device..

Page 2: Cross Platform Mobile Developmemnt

[email protected]

@soutom

Soutom.dhara

Soutom.wordpress.com

Soutom Dhara

Page 3: Cross Platform Mobile Developmemnt

Cell phone usages is ubiquitous

Page 4: Cross Platform Mobile Developmemnt

2008-122009-04

2009-082009-12

2010-042010-08

2010-122011-04

2011-082011-12

2012-042012-08

0

20

40

60

80

100

120

"Desktop""Mobile"

3%12%

52%

32%

Growth of the mobile web

Source : http://gs.statcounter.com/#mobile_vs_desktop-IN-monthly-200812-201208

Page 5: Cross Platform Mobile Developmemnt

I want a Mobile App

Page 6: Cross Platform Mobile Developmemnt

2008-12 2009-04 2009-08 2009-12 2010-04 2010-08 2010-12 2011-04 2011-08 2011-12 2012-04 2012-060

5

10

15

20

25

30

35

40

45

"SymbianOS""iOS""Android""BlackBerry OS""Samsung"

Growth of Top 5 mobile operating system

http://gs.statcounter.com/#mobile_os-ww-monthly-200812-201206

Page 7: Cross Platform Mobile Developmemnt

Mobile Platforms

Page 8: Cross Platform Mobile Developmemnt

iOSAndroidBlackBerryWPOther

2015

Operating System

2011 Market Share

2015 Market Share

Android 38.9% 43.8%BlackBerry 14.2% 13.4%iOS 18.2% 16.9%

WP7 / WM 3.8% 20.3%Other 24.9% 5.6%Total 100% 100%

2011

2011

2015

Mobile Platforms

Page 9: Cross Platform Mobile Developmemnt

The Native Experience

IDE

IDE

IDE

Emulator Store Consumer

Emulator

Simulator

Store

Store

Consumer

Consumer

Page 10: Cross Platform Mobile Developmemnt

The Native Experience

Page 11: Cross Platform Mobile Developmemnt

NativeApp

NativeApp

Device

Web Server

Ruby/java

FilesImages and

otherDatabase

Http RequestExternal

WebService

Execute UI & some application logic

Execute central Application logic

Backend 3rd Party

Native App

Page 12: Cross Platform Mobile Developmemnt

Demo

Page 13: Cross Platform Mobile Developmemnt

ProductionLearning Curve : Easy, Great Number of Tutorials + Libraries Tools : Great IDE with good debugging supportsMonetization : Direct access to market place / app store

Usage ScenarioData Driven AppRich Media

User ExperienceHardware : Direct Access to all Sensor / APIsUser InterfaceOffline Capability : Available( SQL database / Flat File)

Cost for cross – platform : Vendor Lock-in, device specific optimization

PlatformIOSAndroid

Windows Phone 7.xOthers...

Native App : Advantages & disadvantages

Page 14: Cross Platform Mobile Developmemnt

The Native Experience

Page 15: Cross Platform Mobile Developmemnt

Multi-plarform Apps

● Is this only for rich guys

● Time to complete a app

Page 16: Cross Platform Mobile Developmemnt

5 Approaches● Mobile Web● Client Side Web● Hybrid App● Interpreted App● Cross Compiling

Page 17: Cross Platform Mobile Developmemnt

The Mobile Web

Page 18: Cross Platform Mobile Developmemnt

Web Browser

Web Browser

Device

Web Server

Ruby/java

Database

Http RequestExternal

WebService

Executes UI & some Client side logic

Executes UI & central Application logic

Backend 3rd Party

FilesImages and

other

Server-Side Web

Page 19: Cross Platform Mobile Developmemnt

Frameworks / Toolkits

Zurb Foundation

http://foundation.zurb.com/

Twitter Bootstrap

http://twitter.github.com/bootstrap/

Page 20: Cross Platform Mobile Developmemnt

Demo

Page 21: Cross Platform Mobile Developmemnt

ProductionLearning Curve : Easy, Great Number of Tutorials + Libraries .Tools : Use any editor of your choice.Monetization : No App Store destribution.

Usage Scenario

Data Driven AppRich Media : Inferior Performance

User ExperienceHardware : Limited access of H/W features & APIsUser Interface : Fancy UI possible, but platform specific style required Offline Capability : Available( SQL database / Flat File)

Cost for cross – platform : Low, plain HTML run on any type of browser

PlatformiOSAndroid

Windows Phone 7.x (Mango)Others (Responsive Design)

Mobile Web : Advantages & disadvantages

Page 22: Cross Platform Mobile Developmemnt

Client-Side Web

Page 23: Cross Platform Mobile Developmemnt

Device

Web Server

Ruby/java

Database

Http Request External

WebService

Executes UI & some Application logic

Only central Application logic

Backend 3rd Party

FilesImages and

other

Client-Side Web

JavaScriptJavaScript

FilesImages and

other

FilesImages and

other DatabaseDatabase

Web Browser

Page 24: Cross Platform Mobile Developmemnt

Framework / toolkits

Page 25: Cross Platform Mobile Developmemnt

Demo

Page 26: Cross Platform Mobile Developmemnt

ProductionLearning Curve : Easy, Great Number of Tutorials + Libraries .Tools : Use any editor of your choice.Monetization : No App Store distribution

Usage ScenarioData Driven AppRich Media : Inferior Performance

User ExperienceHardware : Limited access of H/W features & APIsUser Interface : Mostly iOS like UI libraryOffline Capability : HTML 5, Otherwise Limited

Cost for cross – platform : Low, plain HTML run on any type of browser

Platform

iOSAndroid

Windows Phone 7.x (Mango)Others (Responsive Design)

Client-Side Web : Advantages & disadvantages

Page 27: Cross Platform Mobile Developmemnt

Hybrid Apps

Page 28: Cross Platform Mobile Developmemnt

Device

Web Server

Ruby/java

Database

ExternalWeb

Service

Executes UI & some Application logic

Only central Application logic

Backend 3rd Party

FilesImages and

other

Native Code

Interpreter

JavaScriptJavaScriptBridge

Native App

http://

http://

http://

Hybrid Apps

Page 29: Cross Platform Mobile Developmemnt

Framework / toolkits

Page 30: Cross Platform Mobile Developmemnt

Demo

Page 31: Cross Platform Mobile Developmemnt

ProductionLearning Curve : Easy, Great Number of Tutorials + Libraries .Tools : Use any editor of your choice / commercial tools.Monetization : App Store distribution

Usage ScenarioData Driven AppRich Media : Inferior Performance

User ExperienceHardware : Access to most H/W features & many API availableUser Interface : Huge effort required to match native UI Offline Capability :

Cost for cross – platform

Platform

iOSAndroid

Windows Phone 7.x (Mango)Others (Responsive Design)

Hybrid Apps : Advantages & disadvantages

Page 32: Cross Platform Mobile Developmemnt

Interpreted Apps

Page 33: Cross Platform Mobile Developmemnt

Device

Web Server

Ruby/java

Database

Backend

FilesImages and

other

DatabaseDatabase

http://

FilesFiles

ApplicationScript

ApplicationScript

Interpreter

APIAPI APIAPI APIAPI APIAPI

Abstraction LayerAbstraction Layer

Native APIs

Native App

http://

Only central Application logicExecutes UI & some Client side logic

Interpreted Apps

Page 34: Cross Platform Mobile Developmemnt

Framework / toolkits

Page 35: Cross Platform Mobile Developmemnt

Demo

Page 36: Cross Platform Mobile Developmemnt

ProductionLearning Curve : Specific API, Great Number of Tutorials + Libraries .Tools : IDEs, including debugger Monetization : App Store distribution

Usage Scenario

Data Driven App

User ExperienceHardware : Access to H/W & API available, wrapped with specific APIUser Interface : truly native widgetsOffline Capability

Cost for cross – platform

PlatformIOSAndroid

Windows Phone 7.x Others

Interpreted Apps : Advantages & disadvantages

Page 37: Cross Platform Mobile Developmemnt

Image found at : http://www.flickr.com/photos/danholton/2853935782/sizes/m/in/photostream/

Cross Compiling

Page 38: Cross Platform Mobile Developmemnt

UI(iOS)UI

(iOS)

UI(Android)

UI(Android)

UI(wp7)UI

(wp7)

Core(shared)Core

(shared)

C#

MonoTouch(iOS)

MonoDroid(Android)

Mono compiler

MSIL compiler

.NET RT(WP7)

NativeApp

NativeApp

NativeApp

WP7

Android

iOS

Backend

Cross Compiling (Mono)

Page 39: Cross Platform Mobile Developmemnt

Framework / toolkits

Page 40: Cross Platform Mobile Developmemnt

ProductionLearning Curve : New tool chain (take getting used to)Tools : IDEs, but debugging in target environment. Monetization : App Store distribution

Usage ScenarioData Driven AppRich Media : No partial supports

User ExperienceHardware : Access to H/W & API available, wrapped with specific APIUser Interface : Truly native widgets. Offline Capability :

Cost for cross – platform

Platform

iOSAndroid

Windows Phone 7.x (Mango)Others (Responsive Design)

Cross Compiled Apps : Advantages & disadvantages

Page 41: Cross Platform Mobile Developmemnt

Production Native Web Client-Side web

Hybrid Interpreted Cross Compiled

Learning Curve

Tools Monetization

Usages Scenario Data-driven App

Rich Media

User Experience

Hardware

User Interface

Offline capability

Platforms iOS Android W P 7 Others

Cost for cross platform

Page 42: Cross Platform Mobile Developmemnt

Questions

Page 43: Cross Platform Mobile Developmemnt
Page 44: Cross Platform Mobile Developmemnt

Advantages...

Open Source

Supported OS for Mobile Apps

Supported OS for Desktop Apps

Native UI

Full Access : camera, gps, local file system, phone book, more ….

Need to Know: Javascript , HTML, CSS, Ruby/ Python / PHP

Page 45: Cross Platform Mobile Developmemnt

Your Application

UI API Phone API

Javascript – Objective C Bridge

iPhone OS

OptionalModule

Your Application

UI API Phone API

Javascript – Java Bridge

Android OS

OptionalModule

Native iPhone APP Native Android APP

Your Application

UI API Phone API

Javascript – Ruby - Python Bridge to OS

Windows OS – Mac OS – Linux OS

OptionalModule

Desktop supports Ruby , php, Python and Javascript

Page 46: Cross Platform Mobile Developmemnt

var root = Titanium.Filesystem.resourcesDirectory;

var win = Titanium.UI.createWindow({orientationModes : [Ti.UI.PORTRAIT],backgroundImage : root + 'images/background.png'});var loginBtn = Ti.UI.createButton();

loginBtn.addEventListener('click',function() {var homeWin = require('../pages/home').getHomeWin;var homePage = new homeWin();homePage.open();win.close();

});

win.add(loginBtn);

Page 47: Cross Platform Mobile Developmemnt

var xhr = Titanium.Network.createHTTPClient();xhr.onerror = function(e) {

// Do some thing to notify the user};

xhr.open("POST", "http://abcd.com/users/login");xhr.setRequestHeader("content-type","application/json");var param = {

"user_name" : "soutom","password" : "mindfire",};

xhr.send(JSON.stringify(param));xhr.onload = function() {

if (this.status == '200') {// Success Block

}else{// Error Block

}};

Page 48: Cross Platform Mobile Developmemnt

Questions

Page 49: Cross Platform Mobile Developmemnt

Thank You

Page 50: Cross Platform Mobile Developmemnt