Cross platform Mobile development on Titanium

733 views
613 views

Published on

This present talks about using Titanium to develop cross platform mobile applications. Compare native development, phonegap, html5,javascript with titanium.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
733
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Use ccim/appsfromtitanium/prayscripture/PersistStatistic.groovy as example code
  • 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
  • Cross platform Mobile development on Titanium

    1. 1. Mobile App Development with Titanium Yiguang Hu yighu@yahoo, twitter, facebook, link edIn
    2. 2. Mobile Development tools HTML5+JavaScript PhoneGap (HTML5+JavaScript) Titanium (JavaScript) Native(ObjectiveC, Java)
    3. 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
    4. 4. Titanium Developers stats
    5. 5. One Code Base->Native, Hybrid, and Mobile Web
    6. 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. 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. 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. 9. Sqlite Database• Use groovy to setup preloaded sqlite databaseString dbLocation = "jdbc:sqlite:db/mytable.db"String dbDriver = "org.sqlite.JDBC"def getDb(){return groovy.sql.Sql.newInstance(dbLocation, dbDriver)}
    10. 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. 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. 12. Write/Test code• Simulator• Real devices – Android devices – iOS devices
    13. 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. 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

    ×