SlideShare uma empresa Scribd logo
1 de 67
Baixar para ler offline
An introduction
to Titanium
Enough to get you into trouble
Graham Weldon

  PHP developer for 11 years

  CakePHP core contributor

  Open source public speaker

  Love developing/teaching



  @predominant

  http://grahamweldon.com

  http://cakedc.com
The rise of mobile

  Making, distributing and selling mobiles apps can be
  a lucrative business

  Well designed, available apps are sought after

  Users prefer a service or product if it comes with a
  mobile counterpart

  Mobile

      Available

      Accessible

      Offline
Mobile history

  PDA’s

  Original Netbooks

  Symbian (Nokia domination)

  iMode (Success in Japan)

  WAP

  Java ME

  Android, iOS, Windows Phone, Meego, and more
Building for mobile

  Google Android

     Java

  Apple iOS

     Objective C

  Windows Phone

     .NET platform (C#, primarily)

  Blackberry

     Java
Abstraction Layers
An abstraction layer is a way of
hiding the implementation
details of a particular set of
functionality.
What is an
abstraction layer?
Why use an
abstraction layer?
  Simpler maintenance

      Only working with business logic and custom code

      One codebase, many platforms

  Quicker development

  Re-use existing knowledge

  Less re-training
I’m convinced!
What can I use?
  NimbleKit (iOS)

  Adobe PhoneGap (Web container)

  Adobe Flex / Flash

  Appcelerator Titanium (Compiled to native)

  Corona (Lua)

  Rhomobile

  Web
        jQuery Mobile

        Sencha Touch

        Custom
Appcelerator Titanium
Appcelerator Titanium
Wait... Free?

  The platform and studio environment cost nothing

  You have all the tools you need to build applications

  Its also Open Source! http://github.com/appcelerator

  Whats the catch?

      Appcelerator is a company for profit

      Support

      Premium modules / extensions

      Custom development
Take advantage of
existing skills
  Web Developers

  Use Javascript

  Learn and extend their knowledge

  Benefit their web skills



  Only the Titanium specific calls are different
Key advantages

  Write once

  Deploy everywhere

  Cut down on maintenance

  Simplify deployment to new platforms
The Titanium Platform
Titanium Studio

  Build apps

  Debug

  Profile

  Code hinting

  Easy device testing

  Easy deployment
How does it work?

  Pre-Compiler

     Optimise, Analyse code

     Find and resolve dependencies

  Front End Compiler

     Convert to native code

     Package in JS engine for other stuff

  Platform Compiler

     Compiled with native tools

     Xcode + iOS SDK, Java + Android SDK
What does that mean?

  Its optimising your code

  Converting what it can to native device code

  Anything it can’t gets run through the JS Engine

  Makes it super fast

  Makes it super portable no matter the code
Javascript!
A perfect match

  Titanium is

      View driven

      Event based

  Perfect for Javascript

  Layered view hierarchy

      Similar to iOS
Organising and
building your app
Resources

  The resources folder

  Holds all the important stuff

  Code

  Assets

  Platform specific whatsits
Platforms

  Sometimes platforms have
  differences

  You need to occasionally
  provide a different
  implementation

  Maybe some images for just that
  platform
iPhone folder

  appicon.png
      Icon for home screen

  *-Landscape.png
      Landscape splash image

  *-Portrait.png
      Portrait splash image

  Default.png
      Standard resolution

  Default@2x.png

      Double resolution (iPhone4+)
and of course... Android
app.js


          Code Context
           Separate context to keep things
           tidy and manageable

           ‘myVar’ in app.js

           Not accessible in win1.js

           Use globals sparingly


win1.js
But I want global
data, configs, etc..
  Define configuration files

  Use the Titanium Include

      Ti.include(...);

  Separate different information

  Only include what you need
UI Structure
Tabbed Layout

  Very common

      iOS Examples: Twitter app, Foursquare, Commbank,
      Phone

  One window per tab

  Tab windows can open sub-windows

      Naturally they get a “< back” option

  Easy to use and understand

  No effort required!
Doh! Platform differences

  iOS has tabs at the bottom

  Android has tabs at the top



  iOS has a title by default for tabGroups

  Android doesn’t have a title for tabGroups



  More than likely your creative director wants everything
  to look the same on all platforms

  Disregarding previous user epxerience on specific
  platforms.
There are workarounds!
Custom Interfaces
Possible.

But requires some real work.
Manage your UI
Interface stacking

Order, and backtracking
Exciting! But scary...
Titanium makes it easy
Ti.Accelerometer

  addEventListener

  removeEventListener

  fireEvent

     Simulate accelerometer events
Ti.Geolocation

  Quick and easy Geo

  Current Position

  forwardGeocoder

      Address -> Coords

  reverseGeocoder

      Coords -> Address

  Add/remove listeners
Ti.Map

  Common interface for all
  devices

  Simple map integration

  Use with information from
  Ti.Geolocation

  Add custom pins / locations

  Switch map types

      Satellite / Standard / Hybrid
Ti.Analytics

  Monitor events

  Report on them later

  Gather info about behaviour

  Improve your application

  Challenge users
Ti.Contacts

  Access the Address Book

  Works on all devices

  One interface

  Integrate contacts

  Simplify information sharing



  Read only on Android :(
Ti.Database

  A simple to use database

  SQL compliant

  Install and update DBs

  Store local data

  Great for offline storage

  Sync later
Ti.Filesystem

  Read files

  Write files

  iOS restricted to sandbox

      (everyone is...)

  Android allows access to
  external media
Ti.Facebook

  Simple Facebook integration

  REST API (Deprecated)

  Graph API

  Login

  Store authorization

  Simple configuration

  Works everywhere
Ti.Gesture

  Track gestures

  add event listeners

  customise your app UX

  Events

      shake

      orientation change
Ti.Network

  Protocols

      TCP

      HTTP

      Bonjour

  Implement any protocol you
  like on TCP

  Connect your app

  Create a server
Ti.XML

  Easy to use parser

  Produce XML too

  Makes consuming services easy

  Includes things like

      rss

      atom

      oData
Yahoo! YQL

   My personal favourite

   Grab data from anywhere on
   the internet

   Query using XPATH

   Scrape websites (responsibly)




http://developer.yahoo.com/yql/
Commercial
                                Components
                                     There are a heap on the
                                     marketplace

                                     Some are reasonably priced

                                     Great way to get things done
                                     quickly

                                     You can sell your own
                                     components on the marketplace




http://www.appcelerator.com/products/open-mobile-marketplace/
Also check
Github
  Search repos for ‘Titanium’

  Currently 706 results

  Components

  Full projects




  http://goo.gl/R69Ck
JSS
JSS: CSS style rules

  Not much information about it

  But very easy to use

      app.js

      app.jss

  Set almost any property



  Always clean before running your app!
app.js




app.jss
app.js




app.jss
Building your app
Multiple platform support
Optionally select
a template
< insert coding montage >
Thats it! Thanks!

  Graham Weldon

     http://grahamweldon.com

     @predominant



  Cake Development Corporation

     http://cakedc.com

     @cakedc

Mais conteúdo relacionado

Mais procurados

SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 MeetupGraham Weldon
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the WebCal Henderson
 
Myphp-busters: symfony framework
Myphp-busters: symfony frameworkMyphp-busters: symfony framework
Myphp-busters: symfony frameworkStefan Koopmanschap
 
Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Stefan Koopmanschap
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHPTareq Hasan
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101Greg Hurlman
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumBen Ramsey
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIsmdawaffe
 
Continuous Delivery and Zero Downtime: What your architecture needs to succeed
Continuous Delivery and Zero Downtime: What your architecture needs to succeedContinuous Delivery and Zero Downtime: What your architecture needs to succeed
Continuous Delivery and Zero Downtime: What your architecture needs to succeedAxel Fontaine
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Clark Everetts
 
Web development with Python
Web development with PythonWeb development with Python
Web development with PythonRaman Balyan
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temyJuraj Kiss
 
PHP Frameworks, or how I learnt to stop worrying and love the code
PHP Frameworks, or how I learnt to stop worrying and love the codePHP Frameworks, or how I learnt to stop worrying and love the code
PHP Frameworks, or how I learnt to stop worrying and love the codeMichal Juhas
 

Mais procurados (20)

SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 Meetup
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the Web
 
Scalable PHP
Scalable PHPScalable PHP
Scalable PHP
 
Myphp-busters: symfony framework
Myphp-busters: symfony frameworkMyphp-busters: symfony framework
Myphp-busters: symfony framework
 
Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHP
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Continuous Delivery and Zero Downtime: What your architecture needs to succeed
Continuous Delivery and Zero Downtime: What your architecture needs to succeedContinuous Delivery and Zero Downtime: What your architecture needs to succeed
Continuous Delivery and Zero Downtime: What your architecture needs to succeed
 
The Power of Refactoring
The Power of RefactoringThe Power of Refactoring
The Power of Refactoring
 
Paragraphs at drupal 8.
Paragraphs at drupal 8.Paragraphs at drupal 8.
Paragraphs at drupal 8.
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
 
Web development with Python
Web development with PythonWeb development with Python
Web development with Python
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
 
PHP Frameworks, or how I learnt to stop worrying and love the code
PHP Frameworks, or how I learnt to stop worrying and love the codePHP Frameworks, or how I learnt to stop worrying and love the code
PHP Frameworks, or how I learnt to stop worrying and love the code
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 

Destaque

Re-imagining CakePHP (OSDC 2010)
Re-imagining CakePHP (OSDC 2010)Re-imagining CakePHP (OSDC 2010)
Re-imagining CakePHP (OSDC 2010)Graham Weldon
 
The business behind open source
The business behind open sourceThe business behind open source
The business behind open sourceGraham Weldon
 
CakePHP and Open Source - Newcastle University
CakePHP and Open Source - Newcastle UniversityCakePHP and Open Source - Newcastle University
CakePHP and Open Source - Newcastle UniversityGraham Weldon
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Nicholas Jansma
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemBoydlee Pollentine
 

Destaque (7)

SydPHP April 2012
SydPHP April 2012SydPHP April 2012
SydPHP April 2012
 
Re-imagining CakePHP (OSDC 2010)
Re-imagining CakePHP (OSDC 2010)Re-imagining CakePHP (OSDC 2010)
Re-imagining CakePHP (OSDC 2010)
 
The business behind open source
The business behind open sourceThe business behind open source
The business behind open source
 
CakePHP and Open Source - Newcastle University
CakePHP and Open Source - Newcastle UniversityCakePHP and Open Source - Newcastle University
CakePHP and Open Source - Newcastle University
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
 

Semelhante a An introduction to Titanium

Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Decksschwarzhoff
 
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumit Kataria
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open SourceAxway Appcelerator
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium TutorialKevin Whinnery
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)Kevin Whinnery
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchSteve Drucker
 
Introduction to building multi platform mobile applications with javascript u...
Introduction to building multi platform mobile applications with javascript u...Introduction to building multi platform mobile applications with javascript u...
Introduction to building multi platform mobile applications with javascript u...Shoukry Kattan
 
Titanium presentation
Titanium presentationTitanium presentation
Titanium presentationaaltavas
 
Primers on mobile application development
Primers on mobile application developmentPrimers on mobile application development
Primers on mobile application developmentSatta Nathan
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile TechnologiesTalentica Software
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
 
Idea to Appstore with Titanium Mobile
Idea to Appstore with Titanium MobileIdea to Appstore with Titanium Mobile
Idea to Appstore with Titanium MobileChristian Sulllivan
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumAxway Appcelerator
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAJeff Haynie
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapAmar Mesic
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Soumow Dollon
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap InsightsMonaca
 
webOS App by Example: Sorting Thoughts
webOS App by Example: Sorting ThoughtswebOS App by Example: Sorting Thoughts
webOS App by Example: Sorting ThoughtsHendrik Ebel
 
Native Mobile Application Using Java Script
Native  Mobile  Application  Using  Java ScriptNative  Mobile  Application  Using  Java Script
Native Mobile Application Using Java ScriptBorey Lim
 

Semelhante a An introduction to Titanium (20)

Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
 
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststem
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
 
Introduction to building multi platform mobile applications with javascript u...
Introduction to building multi platform mobile applications with javascript u...Introduction to building multi platform mobile applications with javascript u...
Introduction to building multi platform mobile applications with javascript u...
 
Titanium presentation
Titanium presentationTitanium presentation
Titanium presentation
 
Primers on mobile application development
Primers on mobile application developmentPrimers on mobile application development
Primers on mobile application development
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
Idea to Appstore with Titanium Mobile
Idea to Appstore with Titanium MobileIdea to Appstore with Titanium Mobile
Idea to Appstore with Titanium Mobile
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with Titanium
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
webOS App by Example: Sorting Thoughts
webOS App by Example: Sorting ThoughtswebOS App by Example: Sorting Thoughts
webOS App by Example: Sorting Thoughts
 
Native Mobile Application Using Java Script
Native  Mobile  Application  Using  Java ScriptNative  Mobile  Application  Using  Java Script
Native Mobile Application Using Java Script
 

Mais de Graham Weldon

HackLang Introduction
HackLang IntroductionHackLang Introduction
HackLang IntroductionGraham Weldon
 
20130714 php matsuri - highly available php
20130714   php matsuri - highly available php20130714   php matsuri - highly available php
20130714 php matsuri - highly available phpGraham Weldon
 
SydPHP June 2012 - GovHack overview
SydPHP June 2012 - GovHack overviewSydPHP June 2012 - GovHack overview
SydPHP June 2012 - GovHack overviewGraham Weldon
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011Graham Weldon
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldGraham Weldon
 
CakePHP Tutorial - OSDC 2010
CakePHP Tutorial - OSDC 2010CakePHP Tutorial - OSDC 2010
CakePHP Tutorial - OSDC 2010Graham Weldon
 
Debugging and Profiling PHP
Debugging and Profiling PHPDebugging and Profiling PHP
Debugging and Profiling PHPGraham Weldon
 
OSDC LIghtning Talk - Context Free Art
OSDC LIghtning Talk - Context Free ArtOSDC LIghtning Talk - Context Free Art
OSDC LIghtning Talk - Context Free ArtGraham Weldon
 

Mais de Graham Weldon (9)

HackLang Introduction
HackLang IntroductionHackLang Introduction
HackLang Introduction
 
20130714 php matsuri - highly available php
20130714   php matsuri - highly available php20130714   php matsuri - highly available php
20130714 php matsuri - highly available php
 
SydPHP June 2012 - GovHack overview
SydPHP June 2012 - GovHack overviewSydPHP June 2012 - GovHack overview
SydPHP June 2012 - GovHack overview
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
 
Nginx in production
Nginx in productionNginx in production
Nginx in production
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your world
 
CakePHP Tutorial - OSDC 2010
CakePHP Tutorial - OSDC 2010CakePHP Tutorial - OSDC 2010
CakePHP Tutorial - OSDC 2010
 
Debugging and Profiling PHP
Debugging and Profiling PHPDebugging and Profiling PHP
Debugging and Profiling PHP
 
OSDC LIghtning Talk - Context Free Art
OSDC LIghtning Talk - Context Free ArtOSDC LIghtning Talk - Context Free Art
OSDC LIghtning Talk - Context Free Art
 

Último

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Último (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

An introduction to Titanium

  • 1. An introduction to Titanium Enough to get you into trouble
  • 2. Graham Weldon PHP developer for 11 years CakePHP core contributor Open source public speaker Love developing/teaching @predominant http://grahamweldon.com http://cakedc.com
  • 3. The rise of mobile Making, distributing and selling mobiles apps can be a lucrative business Well designed, available apps are sought after Users prefer a service or product if it comes with a mobile counterpart Mobile Available Accessible Offline
  • 4. Mobile history PDA’s Original Netbooks Symbian (Nokia domination) iMode (Success in Japan) WAP Java ME Android, iOS, Windows Phone, Meego, and more
  • 5. Building for mobile Google Android Java Apple iOS Objective C Windows Phone .NET platform (C#, primarily) Blackberry Java
  • 7. An abstraction layer is a way of hiding the implementation details of a particular set of functionality.
  • 9. Why use an abstraction layer? Simpler maintenance Only working with business logic and custom code One codebase, many platforms Quicker development Re-use existing knowledge Less re-training
  • 10. I’m convinced! What can I use? NimbleKit (iOS) Adobe PhoneGap (Web container) Adobe Flex / Flash Appcelerator Titanium (Compiled to native) Corona (Lua) Rhomobile Web jQuery Mobile Sencha Touch Custom
  • 13.
  • 14. Wait... Free? The platform and studio environment cost nothing You have all the tools you need to build applications Its also Open Source! http://github.com/appcelerator Whats the catch? Appcelerator is a company for profit Support Premium modules / extensions Custom development
  • 15. Take advantage of existing skills Web Developers Use Javascript Learn and extend their knowledge Benefit their web skills Only the Titanium specific calls are different
  • 16. Key advantages Write once Deploy everywhere Cut down on maintenance Simplify deployment to new platforms
  • 18. Titanium Studio Build apps Debug Profile Code hinting Easy device testing Easy deployment
  • 19. How does it work? Pre-Compiler Optimise, Analyse code Find and resolve dependencies Front End Compiler Convert to native code Package in JS engine for other stuff Platform Compiler Compiled with native tools Xcode + iOS SDK, Java + Android SDK
  • 20. What does that mean? Its optimising your code Converting what it can to native device code Anything it can’t gets run through the JS Engine Makes it super fast Makes it super portable no matter the code
  • 22.
  • 23. A perfect match Titanium is View driven Event based Perfect for Javascript Layered view hierarchy Similar to iOS
  • 25. Resources The resources folder Holds all the important stuff Code Assets Platform specific whatsits
  • 26. Platforms Sometimes platforms have differences You need to occasionally provide a different implementation Maybe some images for just that platform
  • 27. iPhone folder appicon.png Icon for home screen *-Landscape.png Landscape splash image *-Portrait.png Portrait splash image Default.png Standard resolution Default@2x.png Double resolution (iPhone4+)
  • 28. and of course... Android
  • 29. app.js Code Context Separate context to keep things tidy and manageable ‘myVar’ in app.js Not accessible in win1.js Use globals sparingly win1.js
  • 30. But I want global data, configs, etc.. Define configuration files Use the Titanium Include Ti.include(...); Separate different information Only include what you need
  • 32. Tabbed Layout Very common iOS Examples: Twitter app, Foursquare, Commbank, Phone One window per tab Tab windows can open sub-windows Naturally they get a “< back” option Easy to use and understand No effort required!
  • 33.
  • 34.
  • 35.
  • 36. Doh! Platform differences iOS has tabs at the bottom Android has tabs at the top iOS has a title by default for tabGroups Android doesn’t have a title for tabGroups More than likely your creative director wants everything to look the same on all platforms Disregarding previous user epxerience on specific platforms.
  • 37.
  • 39.
  • 41. Manage your UI Interface stacking Order, and backtracking
  • 42.
  • 45. Ti.Accelerometer addEventListener removeEventListener fireEvent Simulate accelerometer events
  • 46. Ti.Geolocation Quick and easy Geo Current Position forwardGeocoder Address -> Coords reverseGeocoder Coords -> Address Add/remove listeners
  • 47. Ti.Map Common interface for all devices Simple map integration Use with information from Ti.Geolocation Add custom pins / locations Switch map types Satellite / Standard / Hybrid
  • 48. Ti.Analytics Monitor events Report on them later Gather info about behaviour Improve your application Challenge users
  • 49. Ti.Contacts Access the Address Book Works on all devices One interface Integrate contacts Simplify information sharing Read only on Android :(
  • 50. Ti.Database A simple to use database SQL compliant Install and update DBs Store local data Great for offline storage Sync later
  • 51. Ti.Filesystem Read files Write files iOS restricted to sandbox (everyone is...) Android allows access to external media
  • 52. Ti.Facebook Simple Facebook integration REST API (Deprecated) Graph API Login Store authorization Simple configuration Works everywhere
  • 53. Ti.Gesture Track gestures add event listeners customise your app UX Events shake orientation change
  • 54. Ti.Network Protocols TCP HTTP Bonjour Implement any protocol you like on TCP Connect your app Create a server
  • 55. Ti.XML Easy to use parser Produce XML too Makes consuming services easy Includes things like rss atom oData
  • 56. Yahoo! YQL My personal favourite Grab data from anywhere on the internet Query using XPATH Scrape websites (responsibly) http://developer.yahoo.com/yql/
  • 57. Commercial Components There are a heap on the marketplace Some are reasonably priced Great way to get things done quickly You can sell your own components on the marketplace http://www.appcelerator.com/products/open-mobile-marketplace/
  • 58. Also check Github Search repos for ‘Titanium’ Currently 706 results Components Full projects http://goo.gl/R69Ck
  • 59. JSS
  • 60. JSS: CSS style rules Not much information about it But very easy to use app.js app.jss Set almost any property Always clean before running your app!
  • 63. Building your app Multiple platform support
  • 65.
  • 66. < insert coding montage >
  • 67. Thats it! Thanks! Graham Weldon http://grahamweldon.com @predominant Cake Development Corporation http://cakedc.com @cakedc