SlideShare a Scribd company logo
1 of 26
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 KnowMax 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 - TSSJSMax Katz
 
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 easyUlrich 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 ApplicationsMax 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 XPagesPaul Withers
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cnsonicxs
 
Unlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersUnlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersSimone Stanich
 
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 WebSocketsYakov 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 Modulesomorandi
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_programEyad 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 Shinyanamarisaguedes
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
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 PhoneGapOrisysIndia
 
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 ActionHazem 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 GuideSergii Zhuk
 
Android Development project
Android Development projectAndroid Development project
Android Development projectMinhaj Kazi
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialAbid Khan
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 DevelopmentShahed Chowdhuri
 
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 GuptaMobileNepal
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011sullis
 

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
Android Android
Android
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
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 2015Alessio Ricco
 
Mobile1st ux/ui with Titanium
Mobile1st ux/ui with TitaniumMobile1st ux/ui with Titanium
Mobile1st ux/ui with TitaniumAlessio 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 developmentAlessio 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 sviluppoAlessio Ricco
 
Ti.conf titanium on firefoxos
Ti.conf titanium on firefoxosTi.conf titanium on firefoxos
Ti.conf titanium on firefoxosAlessio Ricco
 
Titanium Mobile and Beintoo
Titanium Mobile and BeintooTitanium Mobile and Beintoo
Titanium Mobile and BeintooAlessio Ricco
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdkAlessio Ricco
 
Titanium appcelerator best practices
Titanium appcelerator best practicesTitanium appcelerator best practices
Titanium appcelerator best practicesAlessio Ricco
 
Titanium appcelerator kickstart
Titanium appcelerator kickstartTitanium appcelerator kickstart
Titanium appcelerator kickstartAlessio 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 vorreiAlessio 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 appceleratorAlessio 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

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

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