Titanium Kickstart
     Alessio Ricco
       @alessioricco



             1
About Appcelerator


• Open Source Software Company
• Developing Titanium since 2008
• Offices in Mountain View, San Francisco,
  Beijing, Tokio

                     2
About Titanium


•   Open source Framework

•   Build native mobile or desktop applications

•   Use open web technologies: Javascript, HTML, CSS



                          3
About Titanium Mobile

•   Cross Platform mobile development solution

•   Support for iPhone, iPad, Android, Blackberry

•   Aptana Studio based IDE (Titanium Studio)

•   Titanium API, Javascript Syntax



                           4
Cross Platform Challenge
          Write Once, Run Everywhere




• Non visual code reuse
• Visual code reuse
• Get the best from each platform

                      5
Ti Cross Platform
         Write Once, Adapt Everywhere




• Visual and not visual code reuse
• One language, One SDK
• Ability to manage platform specifics

                      6
Cross Platform Approaches



• Platform Identity
• Brand Identity


              7
Platform Identity


•   Immediately familiar to platform users

•   Well known interaction models

•   the app “looks like” it belongs to the platform




                           8
Platform Identity




        9
Platform Identity Approach

•   design and interaction models are different for
    each platform

•   UI components could be reused

•   UI conventions and components

•   Non-UI code reuse

•   Delegation (UI controls are platform specific)



                          10
Brand Identity


•   Evocative

•   New user experience

•   Non-standard User Interface




                          11
Brand Identity




      12
Brand Identity Approach

•   identical UI across the platforms

•   new UI must be learned

•   UI conventions and components

•   Non-UI code reuse, UI code reuse

•   No Delegation



                          13
The Best approach


• Depends on your needs
• emotional connection ?
• speed? interaction? utility?

                    14
Build Native
•   Choose one platform

•   What if you choose the wrong platform ?

•   How many languages you need to learn ?

•   How many codebase you will support?

•   How long will it take to build native on N platforms ?

•   Who will write your code?

•   Who will manage the versioning for each platform ?

•   How much effort will be duplicated ?



                                      15
HTML ?

•   Mobile Browsers are progressing fast

•   Mobile Browsers are converging around WebKit

•   HTML/CSS/Javascript are standard

•   Cross Platform

•   It’s easy to find a developer with some experience in these tools




                                     16
Native ?

•   Native apps are more capable (db, camera, accellerometer, etc) and faster

•   Native apps are smoother on resource constrained devices

•   Are “always ON”

•   Are able to work offline




                                     17
Titanium Appcelerator
•   Single codebase to multiple platforms

•   Platform specific “look and feel”

•   Open Source and extensible (via Modules)

•   Javascript: you can reuse your skills

•   Quick development

•   Integrated IDE

•   Increasing speed

•   Native code (You need the specific platform SDK)



                                       18
Titanium Architecture




          19
Mobile Architecture




         20
Platform Features
•   Native UI components

•   Location API

•   SQLite

•   Value persistence API

•   XHR

•   Facebook, Twitter,YQL

•   audio video streaming, media recording

•   CommonJS, Native code modules

•   Analytics

•   Cloud services

•   Integrated IDE
                                    21
Typical App

    Windows vs Views

Windows are like pages and
   Views are like DIVs




                             22
Typical App: Code
     %          code

                  UI
     60
             construction
                event
     20
               handling
               business
     20
                logic


UI Widgets are constructed
    via JavaScript code

                             23
Titanium Mobile App

• Is a Javascript program interpreted at
  runtime on the device
• App.js is the main file who defines the App
  root execution context
• The javascript engine are WebKit KJS
  (iOS), Rhino (Android/BB),V8 (Android)


                      24
Resources: web

•   Learning Titanium

•   http://www.slideshare.net/alessioricco

•   http://docs.appcelerator.com/titanium/2.0/index.html#!/guide

•   http://titaniumninja.com/

•   http://www.slideshare.net/kwhinnery (thank you)




                                      25
Resources: twitter

  @appcelerator, @jhaynie, @donthorp,
 @marshall_law, @billdawson, @fusion94,
@alessioricco, @kevinwhinnery, @chadauld,
       @clinttredway, @tyrusaurus




                   26

Titanium appcelerator kickstart

  • 1.
    Titanium Kickstart Alessio Ricco @alessioricco 1
  • 2.
    About Appcelerator • OpenSource Software Company • Developing Titanium since 2008 • Offices in Mountain View, San Francisco, Beijing, Tokio 2
  • 3.
    About Titanium • Open source Framework • Build native mobile or desktop applications • Use open web technologies: Javascript, HTML, CSS 3
  • 4.
    About Titanium Mobile • Cross Platform mobile development solution • Support for iPhone, iPad, Android, Blackberry • Aptana Studio based IDE (Titanium Studio) • Titanium API, Javascript Syntax 4
  • 5.
    Cross Platform Challenge Write Once, Run Everywhere • Non visual code reuse • Visual code reuse • Get the best from each platform 5
  • 6.
    Ti Cross Platform Write Once, Adapt Everywhere • Visual and not visual code reuse • One language, One SDK • Ability to manage platform specifics 6
  • 7.
    Cross Platform Approaches •Platform Identity • Brand Identity 7
  • 8.
    Platform Identity • Immediately familiar to platform users • Well known interaction models • the app “looks like” it belongs to the platform 8
  • 9.
  • 10.
    Platform Identity Approach • design and interaction models are different for each platform • UI components could be reused • UI conventions and components • Non-UI code reuse • Delegation (UI controls are platform specific) 10
  • 11.
    Brand Identity • Evocative • New user experience • Non-standard User Interface 11
  • 12.
  • 13.
    Brand Identity Approach • identical UI across the platforms • new UI must be learned • UI conventions and components • Non-UI code reuse, UI code reuse • No Delegation 13
  • 14.
    The Best approach •Depends on your needs • emotional connection ? • speed? interaction? utility? 14
  • 15.
    Build Native • Choose one platform • What if you choose the wrong platform ? • How many languages you need to learn ? • How many codebase you will support? • How long will it take to build native on N platforms ? • Who will write your code? • Who will manage the versioning for each platform ? • How much effort will be duplicated ? 15
  • 16.
    HTML ? • Mobile Browsers are progressing fast • Mobile Browsers are converging around WebKit • HTML/CSS/Javascript are standard • Cross Platform • It’s easy to find a developer with some experience in these tools 16
  • 17.
    Native ? • Native apps are more capable (db, camera, accellerometer, etc) and faster • Native apps are smoother on resource constrained devices • Are “always ON” • Are able to work offline 17
  • 18.
    Titanium Appcelerator • Single codebase to multiple platforms • Platform specific “look and feel” • Open Source and extensible (via Modules) • Javascript: you can reuse your skills • Quick development • Integrated IDE • Increasing speed • Native code (You need the specific platform SDK) 18
  • 19.
  • 20.
  • 21.
    Platform Features • Native UI components • Location API • SQLite • Value persistence API • XHR • Facebook, Twitter,YQL • audio video streaming, media recording • CommonJS, Native code modules • Analytics • Cloud services • Integrated IDE 21
  • 22.
    Typical App Windows vs Views Windows are like pages and Views are like DIVs 22
  • 23.
    Typical App: Code % code UI 60 construction event 20 handling business 20 logic UI Widgets are constructed via JavaScript code 23
  • 24.
    Titanium Mobile App •Is a Javascript program interpreted at runtime on the device • App.js is the main file who defines the App root execution context • The javascript engine are WebKit KJS (iOS), Rhino (Android/BB),V8 (Android) 24
  • 25.
    Resources: web • Learning Titanium • http://www.slideshare.net/alessioricco • http://docs.appcelerator.com/titanium/2.0/index.html#!/guide • http://titaniumninja.com/ • http://www.slideshare.net/kwhinnery (thank you) 25
  • 26.
    Resources: twitter @appcelerator, @jhaynie, @donthorp, @marshall_law, @billdawson, @fusion94, @alessioricco, @kevinwhinnery, @chadauld, @clinttredway, @tyrusaurus 26