SlideShare a Scribd company logo
Titanium Kickstart
     My First App
     Alessio Ricco
        @alessioricco


              1
Creating an app
       2
Choosing a template
         3
Application files structure
            4
tiapp.xml
    5
tiapp.xml

is an XML configuration file that
Titanium uses to generate native
      resources and code.

Many of the configurations that
 lives in tiapp.xml are CROSS-
   PLATFORM, but some are
    platform specific as well




                                   6
Manifest
   7
Running on iPhone simulator
             8
Running on Android simulator
             9
Running on Mobile web simulator
               10
Running on Chrome
        11
Check version



                    Check
                   Platform



             Cross Platform
             Code Branching

                      Main call




App.js
   12
Each tab own a
                      Window




                      Tab creation



              Adding Tab to
               TabGroup

                   CommonJS



ApplicationWindow.js
         13
Create a Window


                 Create a Widget

                      Event Listener




        is a Window reference

                    commonJS



ApplicationWindow.js
           14
Factory Pattern
     var tab = Ti.UI.CreateTab({
         title: L(‘home’),
         icon:’/images/KS_nav_ui.png’,
         window: win1
     })
When creating your own functions, you might want to take this convention one step further by
adding the Titanium 'base' class to the end of your component type. So you might have function
names that follow the convention "create"+business view type+Titanium base
component:

              var o = CreateMainApplicationWindow(properties);


                                                 15
CommonJS
Titanium Mobile is moving toward the adoption of the CommonJS
module specification as the way in which end users of the platform
structure their JavaScript code

exports - a free variable within a module, to which multiple
properties may be added to create a public interface

module.exports - an object within a module, which may be
replaced by an object representing the public interface to the
module

Variable declared within the module file are private. Anything that
needs to be made public should be added to the exports object
                                 16
Javascript Modules: exports
testModule.js
exports.sayHello = function(name) {
    Ti.API.info('Hello '+name+'!');
};

exports.version = 1.4;
exports.author = 'Don Thorp';

Usage:
var module = require(‘testModule’);
module.sayHello(‘Alex’);

                    17
Javascript Modules: module.exports
personModule.js
function Person(firstName,lastName) {
    this.firstName = firstName;                 constructor
    this.lastName = lastName;
}
Person.prototype.fullName = function() {
    return this.firstName+' '+this.lastName;
};
module.exports = Person;


Usage:
var Person = require('Person');
var don = new Person('Don','Thorp');
var donsName = don.fullName(); // "Don Thorp"

                               18
Localization
   Localized strings are replaced at runtime with values appropriate to the user's language.
   Titanium relies on resources files and string placeholders to accomplish this task.




                                              Testo

At the top level of your Titanium project (the same level as tiapp.xml and the Resources
directory), you will create a folder called i18n. Inside this folder, you will have folders for each of
the supported languages in your application, named according to the ISO 639-1 standard.




                                                  19
Localization: xml
   <?xml version="1.0" encoding="UTF-8"?>
   <resources>
       <string name="user_agent_message">user agent set to</string>
       <string name="format_test">Your name is %s</string>
       <string name="base_ui_title">Base UI</string>
       <string name="controls_win_title">Controls</string>
       <string name="phone_win_title">Phone</string>
       <string name="platform_win_title">Platform</string>
       <string name="mashups_win_title">Mashups</string>
       <string name="ordered">Hi %1$s, my name is %2$s</string>
   </resources>


String resource names (the "keys") must begin with a letter, and can contain digits, English characters,
and the underscore.


                                                    20
Localization: usage

var str1 = L('welcome_message');
var str2 = Ti.Locale.getString('welcome_message');
// str1 === str2




                                 21
Localization: usage

 var label = Ti.UI.createLabel({
 ! titleid: 'welcome_message'
 });
 /*
 * is equivalent to
 *   var label = Ti.UI.createLabel({
 *   text: L('welcome_message')
 * });
 */




                   22
Localization: usage
var formatted = String.format(L('format_test'),'Kevin');
// contains 'Your name is Kevin'




var formatted = String.format(L('ordered'), 'Jeff', 'Kevin');
// contains 'Hi Jeff, my name is Kevin'




                                 23
Titanium Mobile WEB
•   NATIVE - access to the hardware features of the
    device. Apps can be run without a live network
    connection

•   WEBAPP - mobile ready web pages. No
    download, great platform reach, constant network
    connection

•   HYBRID - some of all UI and business logic is
    written in HTML/CSS/JS within a wrapper. Limited
    access to device hardware, app store. Apps can be
    run without a live network connection

                         24
Titanium Mobile WEB
•   Titanium Mobile SDK version 2.0 or newer

•   Emulator Preview supported (Android)

•   Common UI elements

•   NO Native UI controls

•   CommonJS support

•   No platform specific components or features (notifications, iAd, some
    namespaces)

•   No Universal access to hardware sensors (e.g. camera)

•   No Contacts or Calendar and other O.S. specific components



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

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

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

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

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




                                      26

More Related Content

What's hot

RichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowRichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To Know
Max Katz
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Max Katz
 
Extending Studio
Extending StudioExtending Studio
Extending Studio
Piotr Nalepa
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
Ulrich Krause
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
Max Katz
 
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPagesBP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
Paul Withers
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cn
sonicxs
 
Unlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersUnlocking Data for Analysts & Developers
Unlocking Data for Analysts & Developers
Simone Stanich
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
Antonio Peric-Mazar
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...
Antonio Peric-Mazar
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
Yakov Fain
 

What's hot (11)

RichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowRichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To Know
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
 
Extending Studio
Extending StudioExtending Studio
Extending Studio
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPagesBP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cn
 
Unlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersUnlocking Data for Analysts & Developers
Unlocking Data for Analysts & Developers
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
 

Similar to Titanium appcelerator my first app

Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modules
omorandi
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
Eyad Almasri
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
anamarisaguedes
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
Peter van der Linden
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
gillygize
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Introduction to Android using PhoneGap
Introduction to Android using PhoneGapIntroduction to Android using PhoneGap
Introduction to Android using PhoneGap
OrisysIndia
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
Hazem Saleh
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
Sergii Zhuk
 
Android Development project
Android Development projectAndroid Development project
Android Development projectMinhaj Kazi
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Abid Khan
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
Shahed Chowdhuri
 
Android Basic
Android BasicAndroid Basic
Android Basic
Nirav Ranpara
 
Presentation - Windows App Development - II - Mr. Chandan Gupta
Presentation - Windows App Development - II - Mr. Chandan GuptaPresentation - Windows App Development - II - Mr. Chandan Gupta
Presentation - Windows App Development - II - Mr. Chandan Gupta
MobileNepal
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
Michael Berkovich
 
Android studio
Android studioAndroid studio
Android studio
Andri Yabu
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
sullis
 

Similar to Titanium appcelerator my first app (20)

Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modules
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Introduction to Android using PhoneGap
Introduction to Android using PhoneGapIntroduction to Android using PhoneGap
Introduction to Android using PhoneGap
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
 
Android Development project
Android Development projectAndroid Development project
Android Development project
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
Android
Android Android
Android
 
Presentation - Windows App Development - II - Mr. Chandan Gupta
Presentation - Windows App Development - II - Mr. Chandan GuptaPresentation - Windows App Development - II - Mr. Chandan Gupta
Presentation - Windows App Development - II - Mr. Chandan Gupta
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
 
Android studio
Android studioAndroid studio
Android studio
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 

More from Alessio Ricco

Co-design tools and techniques - world usability day rome 2015
Co-design tools and techniques - world usability day rome 2015Co-design tools and techniques - world usability day rome 2015
Co-design tools and techniques - world usability day rome 2015
Alessio Ricco
 
Mobile1st ux/ui with Titanium
Mobile1st ux/ui with TitaniumMobile1st ux/ui with Titanium
Mobile1st ux/ui with Titanium
Alessio Ricco
 
Fifty shades of Alloy - tips and tools for a great Titanium Mobile development
Fifty shades of Alloy - tips and tools for a great Titanium Mobile developmentFifty shades of Alloy - tips and tools for a great Titanium Mobile development
Fifty shades of Alloy - tips and tools for a great Titanium Mobile development
Alessio Ricco
 
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppoIl lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
Alessio Ricco
 
Ti.conf titanium on firefoxos
Ti.conf titanium on firefoxosTi.conf titanium on firefoxos
Ti.conf titanium on firefoxos
Alessio Ricco
 
Titanium Mobile and Beintoo
Titanium Mobile and BeintooTitanium Mobile and Beintoo
Titanium Mobile and Beintoo
Alessio Ricco
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
Alessio Ricco
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practices
Alessio Ricco
 
Titanium appcelerator kickstart
Titanium appcelerator kickstartTitanium appcelerator kickstart
Titanium appcelerator kickstart
Alessio Ricco
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Alessio Ricco
 
Un'ora sola ti vorrei
Un'ora sola ti vorreiUn'ora sola ti vorrei
Un'ora sola ti vorrei
Alessio Ricco
 
tempi e scaletta presentazione
tempi e scaletta presentazionetempi e scaletta presentazione
tempi e scaletta presentazioneAlessio Ricco
 
Interim presentation GSJ11
Interim presentation GSJ11Interim presentation GSJ11
Interim presentation GSJ11Alessio Ricco
 
documentazione e presentazione GSJ11 1/4
documentazione e presentazione GSJ11 1/4documentazione e presentazione GSJ11 1/4
documentazione e presentazione GSJ11 1/4Alessio Ricco
 
Writing videogames with titanium appcelerator
Writing videogames with titanium appceleratorWriting videogames with titanium appcelerator
Writing videogames with titanium appcelerator
Alessio Ricco
 
My personal hero
My personal heroMy personal hero
My personal hero
Alessio Ricco
 

More from Alessio Ricco (16)

Co-design tools and techniques - world usability day rome 2015
Co-design tools and techniques - world usability day rome 2015Co-design tools and techniques - world usability day rome 2015
Co-design tools and techniques - world usability day rome 2015
 
Mobile1st ux/ui with Titanium
Mobile1st ux/ui with TitaniumMobile1st ux/ui with Titanium
Mobile1st ux/ui with Titanium
 
Fifty shades of Alloy - tips and tools for a great Titanium Mobile development
Fifty shades of Alloy - tips and tools for a great Titanium Mobile developmentFifty shades of Alloy - tips and tools for a great Titanium Mobile development
Fifty shades of Alloy - tips and tools for a great Titanium Mobile development
 
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppoIl lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
Il lato oscuro della forza - L'eterna lotta tra progettisti e team di sviluppo
 
Ti.conf titanium on firefoxos
Ti.conf titanium on firefoxosTi.conf titanium on firefoxos
Ti.conf titanium on firefoxos
 
Titanium Mobile and Beintoo
Titanium Mobile and BeintooTitanium Mobile and Beintoo
Titanium Mobile and Beintoo
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practices
 
Titanium appcelerator kickstart
Titanium appcelerator kickstartTitanium appcelerator kickstart
Titanium appcelerator kickstart
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
 
Un'ora sola ti vorrei
Un'ora sola ti vorreiUn'ora sola ti vorrei
Un'ora sola ti vorrei
 
tempi e scaletta presentazione
tempi e scaletta presentazionetempi e scaletta presentazione
tempi e scaletta presentazione
 
Interim presentation GSJ11
Interim presentation GSJ11Interim presentation GSJ11
Interim presentation GSJ11
 
documentazione e presentazione GSJ11 1/4
documentazione e presentazione GSJ11 1/4documentazione e presentazione GSJ11 1/4
documentazione e presentazione GSJ11 1/4
 
Writing videogames with titanium appcelerator
Writing videogames with titanium appceleratorWriting videogames with titanium appcelerator
Writing videogames with titanium appcelerator
 
My personal hero
My personal heroMy personal hero
My personal hero
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Titanium appcelerator my first app

  • 1. Titanium Kickstart My First App Alessio Ricco @alessioricco 1
  • 6. tiapp.xml is an XML configuration file that Titanium uses to generate native resources and code. Many of the configurations that lives in tiapp.xml are CROSS- PLATFORM, but some are platform specific as well 6
  • 8. Running on iPhone simulator 8
  • 9. Running on Android simulator 9
  • 10. Running on Mobile web simulator 10
  • 12. Check version Check Platform Cross Platform Code Branching Main call App.js 12
  • 13. Each tab own a Window Tab creation Adding Tab to TabGroup CommonJS ApplicationWindow.js 13
  • 14. Create a Window Create a Widget Event Listener is a Window reference commonJS ApplicationWindow.js 14
  • 15. Factory Pattern var tab = Ti.UI.CreateTab({ title: L(‘home’), icon:’/images/KS_nav_ui.png’, window: win1 }) When creating your own functions, you might want to take this convention one step further by adding the Titanium 'base' class to the end of your component type. So you might have function names that follow the convention "create"+business view type+Titanium base component: var o = CreateMainApplicationWindow(properties); 15
  • 16. CommonJS Titanium Mobile is moving toward the adoption of the CommonJS module specification as the way in which end users of the platform structure their JavaScript code exports - a free variable within a module, to which multiple properties may be added to create a public interface module.exports - an object within a module, which may be replaced by an object representing the public interface to the module Variable declared within the module file are private. Anything that needs to be made public should be added to the exports object 16
  • 17. Javascript Modules: exports testModule.js exports.sayHello = function(name) { Ti.API.info('Hello '+name+'!'); }; exports.version = 1.4; exports.author = 'Don Thorp'; Usage: var module = require(‘testModule’); module.sayHello(‘Alex’); 17
  • 18. Javascript Modules: module.exports personModule.js function Person(firstName,lastName) { this.firstName = firstName; constructor this.lastName = lastName; } Person.prototype.fullName = function() { return this.firstName+' '+this.lastName; }; module.exports = Person; Usage: var Person = require('Person'); var don = new Person('Don','Thorp'); var donsName = don.fullName(); // "Don Thorp" 18
  • 19. Localization Localized strings are replaced at runtime with values appropriate to the user's language. Titanium relies on resources files and string placeholders to accomplish this task. Testo At the top level of your Titanium project (the same level as tiapp.xml and the Resources directory), you will create a folder called i18n. Inside this folder, you will have folders for each of the supported languages in your application, named according to the ISO 639-1 standard. 19
  • 20. Localization: xml <?xml version="1.0" encoding="UTF-8"?> <resources> <string name="user_agent_message">user agent set to</string> <string name="format_test">Your name is %s</string> <string name="base_ui_title">Base UI</string> <string name="controls_win_title">Controls</string> <string name="phone_win_title">Phone</string> <string name="platform_win_title">Platform</string> <string name="mashups_win_title">Mashups</string> <string name="ordered">Hi %1$s, my name is %2$s</string> </resources> String resource names (the "keys") must begin with a letter, and can contain digits, English characters, and the underscore. 20
  • 21. Localization: usage var str1 = L('welcome_message'); var str2 = Ti.Locale.getString('welcome_message'); // str1 === str2 21
  • 22. Localization: usage var label = Ti.UI.createLabel({ ! titleid: 'welcome_message' }); /* * is equivalent to * var label = Ti.UI.createLabel({ * text: L('welcome_message') * }); */ 22
  • 23. Localization: usage var formatted = String.format(L('format_test'),'Kevin'); // contains 'Your name is Kevin' var formatted = String.format(L('ordered'), 'Jeff', 'Kevin'); // contains 'Hi Jeff, my name is Kevin' 23
  • 24. Titanium Mobile WEB • NATIVE - access to the hardware features of the device. Apps can be run without a live network connection • WEBAPP - mobile ready web pages. No download, great platform reach, constant network connection • HYBRID - some of all UI and business logic is written in HTML/CSS/JS within a wrapper. Limited access to device hardware, app store. Apps can be run without a live network connection 24
  • 25. Titanium Mobile WEB • Titanium Mobile SDK version 2.0 or newer • Emulator Preview supported (Android) • Common UI elements • NO Native UI controls • CommonJS support • No platform specific components or features (notifications, iAd, some namespaces) • No Universal access to hardware sensors (e.g. camera) • No Contacts or Calendar and other O.S. specific components 25
  • 26. References • http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Hello_World • http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/ CommonJS_Modules_in_Titanium • http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/ Internationalization • http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/ Mobile_Web_Platform_Overview • http://www.slideshare.net/alessioricco 26

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n