building apps with phonegap

30
Building Apps with PhoneGap Andrew Lunny Nitobi Software @alunny Sunday, August 22, 2010

Upload: alunny

Post on 14-Jul-2015

4.076 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Building Apps with PhoneGap

Building Apps with PhoneGap

Andrew LunnyNitobi Software

@alunny

Sunday, August 22, 2010

Page 2: Building Apps with PhoneGap

• Vancouver BC

• Web and Mobile development/consulting

• small-ish: ~18 employees

Nitobi Software

Sunday, August 22, 2010

Page 3: Building Apps with PhoneGap

Sunday, August 22, 2010

Page 4: Building Apps with PhoneGap

One Good Bit

http://www.webmonkey.com/2010/08/how-do-native-apps-and-web-apps-compare/

Sunday, August 22, 2010

Page 5: Building Apps with PhoneGap

There are some things the web does very well.

There are also some things native apps do very well.

PhoneGap aims for the union of these.

Sunday, August 22, 2010

Page 6: Building Apps with PhoneGap

What is PhoneGap?

Sunday, August 22, 2010

Page 7: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 8: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 9: Building Apps with PhoneGap

Cross-PlatformWrite once, test/debug/rewrite everywhere

Sunday, August 22, 2010

Page 10: Building Apps with PhoneGap

• Today

• iOS, Android, BlackBerry 4.6+ (forwards compatible), Palm WebOS, Symbian WRT

• Soon

• Windows Phone 7, BlackBerry widgets (5.0+, not backwards compatible)

Sunday, August 22, 2010

Page 11: Building Apps with PhoneGap

Cross-Platform != One Codebase

back button? menu?

Sunday, August 22, 2010

Page 12: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 13: Building Apps with PhoneGap

MIT Licensednow and forever

“The MIT License states explicitly the rights given to the end-user, including the right to use, copy, modify, merge, publish, distribute, sublicense, and/or se" the so#ware.”

Just include the copyright notice in your source code, and you’re done

Sunday, August 22, 2010

Page 14: Building Apps with PhoneGap

github.com/phonegap

The license grants the right to:

• Build apps• Sell apps• Build and sell services using PhoneGap• Customize PhoneGap

• Contribute back• Not contribute back

Sunday, August 22, 2010

Page 15: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 16: Building Apps with PhoneGap

It is a requirement of the project that PhoneGap will not get your app rejected by Apple.

Sunday, August 22, 2010

Page 17: Building Apps with PhoneGap

PhoneGap plays by the rules

• for iOS, PhoneGap is an Objective-C static library, built with XCode, using techniques Apple devs have recommended

• jailbreaking is not required

• additional software on the device is not required

• same for all other platforms

Sunday, August 22, 2010

Page 18: Building Apps with PhoneGap

Your app can still be rejected• It probably will if

• your app is just a wrapper around a mobile web site

• you load all application code from a remote server

• it violates the TOS

• It probably won’t if

• you take advantage of native functionality

• you offer unique content

• you offer a great user experience

Sunday, August 22, 2010

Page 19: Building Apps with PhoneGap

It can also be featured on the app store

Sunday, August 22, 2010

Page 20: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 21: Building Apps with PhoneGap

Remember Wired?Sunday, August 22, 2010

Page 22: Building Apps with PhoneGap

What PhoneGap gives you

• Offline by default

• Access to hardware sensors (device-dependent)

• Accelerometer, GPS, Orientation, Compass

• Media integration

• OS integration

• Camera, Contacts, File System, etc

Sunday, August 22, 2010

Page 23: Building Apps with PhoneGap

And anything else you wantPhoneGap is a native

project, and it’s all open source. If you need any

native code, dive right in.

Sunday, August 22, 2010

Page 24: Building Apps with PhoneGap

PhoneGap is a cross-platform, open source mobile development framework for using front-end web technologies to build (and sell!) native mobile apps.

Sunday, August 22, 2010

Page 25: Building Apps with PhoneGap

• HTML(5), CSS as usual

• JavaScript handles all of the application logic

• persistent storage (SQLite db, localStorage)

• network requests (cross-domain XHR, since we’re running from file://)

• view templating

Sunday, August 22, 2010

Page 26: Building Apps with PhoneGap

We use what’s there

• Browser/web view on the device

• (A) WebKit: iOS, Android, Palm, Symbian

• BlackBerry: pretty bad - will be WebKit in OS 6.0

• Windows Phone 7: “evolved” IE7 (between IE7 and IE8)

Sunday, August 22, 2010

Page 27: Building Apps with PhoneGap

What isn’t PhoneGap?

Sunday, August 22, 2010

Page 28: Building Apps with PhoneGap

UI Framework - a bit of a mixed bag

• jqTouch, Sproutcore Touch, Cappuccino

• Sencha Touch (licensing permitting)

• jQuery Mobile (when it ships)

DOM framework

• your favourite one will work (jQuery, Prototype, Dojo)

• we develop and recommend XUI - github.com/xui

Sunday, August 22, 2010

Page 29: Building Apps with PhoneGap

Solution for all problems

• Don’t write games, video editing, VNC apps - the performance won’t be there

• Similar when dealing with large datasets and files

• Not a replacement for a mobile web app

Sunday, August 22, 2010

Page 30: Building Apps with PhoneGap

@[email protected]

nitobi.com / phonegap.com

Thanks!

Sunday, August 22, 2010