SlideShare a Scribd company logo
Mobile App Development with
         Titanium
           Yiguang Hu
 yighu@yahoo, twitter, facebook, link
               edIn
Mobile Development tools

   HTML5+JavaScript

   PhoneGap (HTML5+JavaScript)

   Titanium (JavaScript)

   Native(ObjectiveC, Java)
Factors to Consider
• Native (iOS, Android, Windows etc)
• Web (html5+javascript, phoneGap)
• Database
  support(preloaded?, Native, Titanium)
• UI look and feel (Native?)
• Developer skills
Titanium Developers stats
One Code Base->Native, Hybrid, and
          Mobile Web
Titanium SDK
•   Features
•   Supports 5,000+ native APIs
•   JavaScript-based platform
•   Support for iOS, Android, and HTML5
•   Benefits
•   70% faster than developing in Objective-C or Java
•   Single platform
•   Unlimited extensibility
Demonstration
• Download/Install Titanium SDK Studio
  – http://www.appcelerator.com/platform/titanium-
    studio
  – Create a project
  – File-> New Titanium Project
  – Input Project information
  – Select template
  – Write the Code
Demonstration
• tiapp.xml file under root
• Under Resources
  – Images here and under
     •   android
     •   iphone
     •   mobileweb
     •   to be replaced by your app images/icons etc.
  – app.js
Sqlite Database
• Use groovy to setup preloaded sqlite database
String dbLocation = "jdbc:sqlite:db/mytable.db"
String dbDriver = "org.sqlite.JDBC"
def getDb(){
return groovy.sql.Sql.newInstance(dbLocation,
  dbDriver)
}
Create Sqlite Table
• def sql = getDb()
• try{
• sql.execute("create table if not exists mytable(id
  Integer, sayittxt BLOB, sayitref BLOB, sayitcmt
  BLOB, conittxt BLOB, conitref BLOB, conitcmt
  BLOB, renittxt BLOB, renitref BLOB, renitcmt
  BLOB, ptittxt BLOB, ptitref BLOB, ptitcmt
  BLOB, itittxt BLOB, ititref BLOB, ititcmt
  BLOB, afittxt BLOB, afitref BLOB, afitcmt
  BLOB, tkittxt BLOB, tkitref BLOB, tkitcmt
  BLOB, csittxt BLOB, csitref BLOB, bvky BLOB, bvnm
  BLOB)")
• }catch (Exception e){ e.printStackTrace()}
Insert Sqlite Data
• sql.execute("insert into
  mytable(id,sayittxt,sayitref,sayitcmt,conittxt,c
  onitref,conitcmt,renittxt,renitref,renitcmt,ptitt
  xt,ptitref,ptitcmt,itittxt,ititref,ititcmt,afittxt,afit
  ref,afitcmt,tkittxt,tkitref,tkitcmt,csittxt,csitref,b
  vky,bvnm)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
  ,?,?,?,?,?,?,?,?,?)",data)
• }
Write/Test code
• Simulator
• Real devices
  – Android devices
  – iOS devices
Deployment
• Titanium Studio Workspace/{project}/build
• Open developer account at Android market
  and appStore
• Setup profiles, certificate at appStore
• Prepare images for different devices
  – Use the sample images as template to create
    images for the application for all platforms
Deployto Market
• Sign the apk file and upload to Android
  Market
• Many other places without sign
• Follow procedures to put to appStore
  – Titanium has simplified this process very much

More Related Content

KEY
コードで学ぶドメイン駆動設計入門
PPTX
PPTX
PDF
Webinar: What's new in Neo4j 2.0
PDF
HTML+JQuery by Rio
PDF
EPAM :: LightingTalks :: Oct 2013
PDF
Cross Platform Mobile App Development
PDF
Mobile App Development
コードで学ぶドメイン駆動設計入門
Webinar: What's new in Neo4j 2.0
HTML+JQuery by Rio
EPAM :: LightingTalks :: Oct 2013
Cross Platform Mobile App Development
Mobile App Development

Similar to Cross platform Mobile development on Titanium (20)

PDF
node-crate: node.js and big data
PPTX
¡El mejor lenguaje para automatizar pruebas!
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PDF
Python - A Comprehensive Programming Language
ZIP
Javascript Everywhere
PDF
スマートフォンサイトの作成術 - 大川洋一
PPTX
Getting started with titanium
PPTX
Getting started with Appcelerator Titanium
PDF
Gaej For Beginners
PDF
Declarative UI on iOS without SwiftUI (中文)
KEY
iPhone Development Intro
PDF
初心者向けGAE/Java説明資料
PPTX
Mobile Developers Talks: Delve Mobile
PPTX
Intro to appcelerator
PPTX
System insight without Interference
PPTX
Crafting Evolvable Api Responses
PDF
Painless Persistence in a Disconnected World
PDF
PDF.JS at SwissJeese 2012
PDF
CBDW2014 - MockBox, get ready to mock your socks off!
PPT
JQuery introduction
node-crate: node.js and big data
¡El mejor lenguaje para automatizar pruebas!
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Python - A Comprehensive Programming Language
Javascript Everywhere
スマートフォンサイトの作成術 - 大川洋一
Getting started with titanium
Getting started with Appcelerator Titanium
Gaej For Beginners
Declarative UI on iOS without SwiftUI (中文)
iPhone Development Intro
初心者向けGAE/Java説明資料
Mobile Developers Talks: Delve Mobile
Intro to appcelerator
System insight without Interference
Crafting Evolvable Api Responses
Painless Persistence in a Disconnected World
PDF.JS at SwissJeese 2012
CBDW2014 - MockBox, get ready to mock your socks off!
JQuery introduction
Ad

More from Yiguang Hu (10)

PPTX
Data analysis scala_spark
PPTX
Java8 and Functional Programming
PPTX
Introduction to Vert.x
PPTX
Phone Gap
PPT
Google Web Toolkits
PPT
Clojure
PDF
Why Grails
PDF
Why Grails?
PPT
Gsword
PPT
Google Web Toolkits
Data analysis scala_spark
Java8 and Functional Programming
Introduction to Vert.x
Phone Gap
Google Web Toolkits
Clojure
Why Grails
Why Grails?
Gsword
Google Web Toolkits
Ad

Cross platform Mobile development on Titanium

  • 1. Mobile App Development with Titanium Yiguang Hu yighu@yahoo, twitter, facebook, link edIn
  • 2. Mobile Development tools HTML5+JavaScript PhoneGap (HTML5+JavaScript) Titanium (JavaScript) Native(ObjectiveC, Java)
  • 3. Factors to Consider • Native (iOS, Android, Windows etc) • Web (html5+javascript, phoneGap) • Database support(preloaded?, Native, Titanium) • UI look and feel (Native?) • Developer skills
  • 5. One Code Base->Native, Hybrid, and Mobile Web
  • 6. Titanium SDK • Features • Supports 5,000+ native APIs • JavaScript-based platform • Support for iOS, Android, and HTML5 • Benefits • 70% faster than developing in Objective-C or Java • Single platform • Unlimited extensibility
  • 7. Demonstration • Download/Install Titanium SDK Studio – http://www.appcelerator.com/platform/titanium- studio – Create a project – File-> New Titanium Project – Input Project information – Select template – Write the Code
  • 8. Demonstration • tiapp.xml file under root • Under Resources – Images here and under • android • iphone • mobileweb • to be replaced by your app images/icons etc. – app.js
  • 9. Sqlite Database • Use groovy to setup preloaded sqlite database String dbLocation = "jdbc:sqlite:db/mytable.db" String dbDriver = "org.sqlite.JDBC" def getDb(){ return groovy.sql.Sql.newInstance(dbLocation, dbDriver) }
  • 10. Create Sqlite Table • def sql = getDb() • try{ • sql.execute("create table if not exists mytable(id Integer, sayittxt BLOB, sayitref BLOB, sayitcmt BLOB, conittxt BLOB, conitref BLOB, conitcmt BLOB, renittxt BLOB, renitref BLOB, renitcmt BLOB, ptittxt BLOB, ptitref BLOB, ptitcmt BLOB, itittxt BLOB, ititref BLOB, ititcmt BLOB, afittxt BLOB, afitref BLOB, afitcmt BLOB, tkittxt BLOB, tkitref BLOB, tkitcmt BLOB, csittxt BLOB, csitref BLOB, bvky BLOB, bvnm BLOB)") • }catch (Exception e){ e.printStackTrace()}
  • 11. Insert Sqlite Data • sql.execute("insert into mytable(id,sayittxt,sayitref,sayitcmt,conittxt,c onitref,conitcmt,renittxt,renitref,renitcmt,ptitt xt,ptitref,ptitcmt,itittxt,ititref,ititcmt,afittxt,afit ref,afitcmt,tkittxt,tkitref,tkitcmt,csittxt,csitref,b vky,bvnm)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?)",data) • }
  • 12. Write/Test code • Simulator • Real devices – Android devices – iOS devices
  • 13. Deployment • Titanium Studio Workspace/{project}/build • Open developer account at Android market and appStore • Setup profiles, certificate at appStore • Prepare images for different devices – Use the sample images as template to create images for the application for all platforms
  • 14. Deployto Market • Sign the apk file and upload to Android Market • Many other places without sign • Follow procedures to put to appStore – Titanium has simplified this process very much

Editor's Notes

  • #10: Use ccim/appsfromtitanium/prayscripture/PersistStatistic.groovy as example code
  • #15: Sample Package files:/Users/yiguanghu/Documents/Titanium Studio Workspace/facetoface/build/android/bin/facetoface.apk/Users/yiguanghu/Documents/Titanium Studio Workspace/renewmind/build/iphone/build/Release-iphoneos