mobiletitanium

advertisement

CS569 Selected Topics in Software Engineering

Spring 2012

Mobile overview +

Introduction to Titanium

Start installation in parallel with this presentation

• Windows + Linux users

– Install Oracle JDK, set PATH and JAVA_HOME

– Install Firefox

– Install Appcelerator’s Titanium Studio

– Install Android SDK

• Mac users

– Install Xcode

– Install Appcelerator’s Titanium Studio

– Optional: Install Android SDK

Differences between one platform and another and another and another and another and another and…

• Physical differences

– Screen size

– Textual input

– Scrolling

• Stylistic differences

– “Back” and “Cancel” buttons

– Placement of navigation bar

– Colors

Survey of over 2000 developers

(2010 Q4 Mobile Developer Report )

Android rising

Android jobs rising

Lessons from the market

• Platforms come and go from fashion

– iOS -> Android right now

– What is next?

• Gotta keep your code from going stale

• Gotta keep your skills from going stale

Option 1: Write platform-independent code, interpose libraries

Your code

Platform-specific binary libraries

Some random platform

This is basically how JavaScript works in web browsers

(each browser implements the ECMA specification for JavaScript and implements specified objects with binary libraries)

Option 2: Write platform-independent code, compile to platform

Your code

Compiler

Platform-specific binary

This is basically how C++ works

(a compiler for each platform compiles the source code into an .exe or whatever binary format is accepted by the target operating system and hardware)

Small runtime library

Some random platform

Platform-independent frameworks

• Option 1: just libraries, no compiler

– jQTouch – pure

HTML+CSS+JS

– PhoneGap –

HTML+CSS+JS + binary libraries

Platform-independent frameworks

• Option 2: compiler

– Appcelerator – write JS, compile to binary

– Adobe Air – write ActionScript, compile to Flash

• In practice, both of these require platform-specific runtime libraries, even though they theoretically could compile code to pure binaries that would not require any runtime library.

Platform-specific frameworks

• (Mostly) platform-specific frameworks

– XCode – compiles Objective C to iOS binaries

– Android SDK – compiles Java to Android binaries

Pros and cons

Option Pros Cons

Platform-indep.: libraries -Use existing JS skills

-Very easy to get started

-Nearly 100% portable

Platform-indep.: compiler

-Lowest performance

-Limited API access

-Probably use your JS skills

-Better performance

-Some access to binary API

-Moderately easy to learn

-Nearly 100% portable

Platform dependent code -Best performance

-Access to full binary API

-Maybe new language

-Relatively hard to learn

-Nearly 0% portable

Titanium Appcelerator

“Hello World” Walkthrough

Images used in this presentation

• http://www.flickr.com/photos/samchurchill/53876132

47/sizes/l/in/photostream/

• http://www.flickr.com/photos/incredibleguy/59801295

38/sizes/s/in/photostream/

• http://www.digitaltonto.com/wpcontent/uploads/2012/01/android-share-ofsmartphone-operating-system-market-nov-14-2011e1328056252645.jpg

• http://www.indeed.com/trendgraph/jobgraph.png?q=i phone%20developer%2C+android%20developer%2C+ mobile%20web%20developer%2C+blackberry%20deve loper

• http://www.flickr.com/photos/eklem/6727262207/size s/z/in/photostream/

Download