development mobile app cross device

37
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Development Mobile App PhoneGap Nguyen Thai Hoang Phuong – Dai-ichi Life

Upload: nguyen-phuong

Post on 08-May-2015

981 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Development Mobile App PhoneGap

Nguyen Thai Hoang Phuong – Dai-ichi Life

Page 2: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Agenda• Smartphone Market Share • PhoneGap• Setup and Configuration Tool • PhoneGap Build• Debugging PhoneGap Apps

Page 3: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Page 4: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Marketshare In 2012 With 40 Million Units Sold

Page 5: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

What is PhoneGap?

Page 6: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

• Traditional mobile development looks like this:

Platform

Tools Language

Objective-C

Platform

Tools Language

Java

Page 7: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

PhoneGap - Cordova• Is an open source platform for building native

mobile applications using standard web technologies (HTML/CSS/JavaScript)

• Apache Cordova is the name of the open source project

• PhoneGap is the name of the Adobe’s Cordova distrbution

Page 8: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Why would you use PhoneGap?

Page 9: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Why would you use PhoneGap?• PhoneGap allows you to use “write once, run

everywhere” paradigm• Web standards based & Open Source• You get native installers for each platform

ready to be distributed through application stores (App Store, Android Market, …)

Page 10: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

PhoneGap could be your best friend if

• You want to target multiple mobile platforms• You know HTML/JavaScript/CSS• You already have a web site/web application.

Thus you can reuse parts of this (see Wikipedia)

Page 11: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Setup and Configuration Tool

Page 12: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Setup Tool - Android• Eclipse Classichttp://www.eclipse.org/downloads/• Android SDKhttp://developer.android.com/sdk/index.html• PhoneGaphttp://phonegap.com/download

Page 13: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Configure the ADT Plugin for Eclipse• ADT plugin must be installed through the

Eclipse Install New Software wizard.Start Eclipse.These steps will guide you through the installation

of the ADT plugin. http://developer.android.com/sdk/installing/installing-adt.html

Restart Eclipse.

Page 14: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Using platform native tool chain• Use the OS and tools each platform

recommends:– iOS - http://phonegap.com/start#ios-x4– Android - http://phonegap.com/start#android– BlackBerry - http://phonegap.com/start#

blackberry– Windows Phone - http://phonegap.com/start#wp– WebOS: http://phonegap.com/start#webos – Symbian: http://phonegap.com/start#symbian

Page 15: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Demo - Example

Page 16: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Add new contact

Page 17: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Add new contact

Page 18: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

index.html

Page 19: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

index.html

Page 20: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

contact.js

Page 21: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

How does PhoneGap work?PhoneGap App Mobile Device

PhoneGap NativeEngine

PhoneGap JavaScriptEngine

Web ViewRenders the app UI

Access to nativemobilefeaturesYour Code

HTML/JavaScript/CSS/Images/Frameworks/Libraries

Page 22: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Built-in device APIs

Page 23: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

PhoneGap Plug-ins• Examples of plugins: https://

github.com/purplecabbage/phonegap-plugins

Page 24: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Demo - Example

Page 25: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Use Google Chart API

Page 26: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

index.html

Page 27: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

index.html

Page 28: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

index.html

Page 29: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Building PhoneGap Apps

Page 30: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Build your PhoneGap app as you’d build a regular web app

• Using your favorite editors (Eclipse, vim, Dreamweaver)

• Test and debug the app using your desktop browser

• Test and debug the app using mobile simulators/emulators and the physical devices

Page 31: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

What can you use to build your application?• Remember your application will run on the

device’s browser• You can use whatever JavaScript frameworks

or libraries you like. Eg. jQuery, jQuery Mobile, Sencha, Backbone, Liquid, Mustache, Bootrstrap, and so on

Page 32: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Creating the native installersThere are 2 different methods to build the native installers for your PhoneGap app:• Using the target platform tool chain• Using PhoneGap Build – a cloud service

Page 33: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Using PhoneGap Build• http://build.phonegap.com - a cloud service• Supports: iOS, Android, BlackBerry, WebOS, Windows

Phone 7, and Symbian • Supports one plugin (ChildBrowser); but you can hack

in support for other plugins• It is in beta and it is free; it will always be free for Open

Source projects• You upload your files (index.html, CSS, JS, images)• Or you provide a Git / SVN link• Support for debugging

Page 34: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Resources• Source: github.com/callback• Docs: docs.phonegap.com• Wiki: wiki.phonegap.com• PhoneGap Build: build.phonegap.com• Plugins: github.com/purplecabbage/phonegap-plugins• Support: groups.google.com/group/phonegap• IRC: irc.freenode.net #phonegap• Apps: phonegap.com/apps• Bugs: issues.apache.org/jira/browse/CB

Page 35: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Resources(cont)• Getting started with PhoneGap

in Eclipse for Android • Getting started with PhoneGap in Xcode for iOS • Develop Mobile Applications Using PhoneGap

and Kendo UI• Creating Cross-Device Compatible Mobile Applicatio

ns that Integrate with SharePoint

Page 36: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Resource(cont)

Wrox.Beginning.PhoneGaphttps://skydrive.live.com/redir?resid=86951F18C2B21FFB!196&authkey=!AACYDJFxtXRv4Kc

PhoneGap Mobile Application Development Cookbookhttps://skydrive.live.com/redir?resid=86951F18C2B21FFB!190&authkey=!AMoFJrzjyP8JfZo

Page 37: Development mobile app cross device

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Thank You!Question & Answers Time!