SlideShare a Scribd company logo
1 of 14
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

Similar to Cross platform Mobile development on Titanium

node-crate: node.js and big data
 node-crate: node.js and big data node-crate: node.js and big data
node-crate: node.js and big dataStefan Thies
 
¡El mejor lenguaje para automatizar pruebas!
¡El mejor lenguaje para automatizar pruebas!¡El mejor lenguaje para automatizar pruebas!
¡El mejor lenguaje para automatizar pruebas!Antonio Robres Turon
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguageTsungWei Hu
 
Javascript Everywhere
Javascript EverywhereJavascript Everywhere
Javascript EverywherePascal Rettig
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一okyawa
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Shih-Ting Huang
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development IntroLuis Azevedo
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料Shinichi Ogawa
 
Mobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileMobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileKonstantin Loginov
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without InterferenceTony Tam
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 
PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012Julian Viereck
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!Ortus Solutions, Corp
 

Similar to Cross platform Mobile development on Titanium (20)

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

More from Yiguang Hu

Data analysis scala_spark
Data analysis scala_sparkData analysis scala_spark
Data analysis scala_sparkYiguang Hu
 
Java8 and Functional Programming
Java8 and Functional ProgrammingJava8 and Functional Programming
Java8 and Functional ProgrammingYiguang Hu
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.xYiguang Hu
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 

More from Yiguang Hu (10)

Data analysis scala_spark
Data analysis scala_sparkData analysis scala_spark
Data analysis scala_spark
 
Java8 and Functional Programming
Java8 and Functional ProgrammingJava8 and Functional Programming
Java8 and Functional Programming
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 
Clojure
ClojureClojure
Clojure
 
Why Grails
Why GrailsWhy Grails
Why Grails
 
Why Grails?
Why Grails?Why Grails?
Why Grails?
 
Gsword
GswordGsword
Gsword
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 

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

  1. Use ccim/appsfromtitanium/prayscripture/PersistStatistic.groovy as example code
  2. 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