SlideShare a Scribd company logo
Titanium
Ghosts
Steve Brownlee
      &
 Alan Schultz
Shrieks
November 9th
Discuss Inversion of Control and Dependency Injection with Brian
Cavalier

Future Talk
Val Head will talk about Designing Motion (valhead.com)

Future
JavaScript Gaming Competition
    • impactJS.com
    • craftyJS.com
    • flashJS.com
What is Titanium?
Cross-Platform Application Development
   var cross-platform !== write-once-run-anywhere;



Current Platforms

            Windows
                                                       iOS




           Desktop                                   Mobile
   Linux              OSX               Blackberry
                                                              Android
                                          (soon)
What is Titanium?
• Open source under Apache 2.0
• Appcelerator provides training and support services
• Titanium Analytics – How is my app performing?
• Titanium AppCentral – Enterprise App Store
Desktop
                   The red-headed stepchild of Titanium


• Uses webkit (but it’s behind)

• Browser + standard technologies = consistent experience across OS

• Feature-rich
     • File System Access
     • Taskbar Notifications
     • System Tray
     • Transparent Windows
     • Databases
Desktop
Creating a desktop application container is easy

  Titanium.UI.createWindow({
      id:         "propertyWindow",
      url:        "app://second_page.html",
      title:      "My New Window",
      contents:   "<html>foo!</html>",
      baseURL:    "app://page_url",
      x:          300,
      y:          400,
      width:      500,
      height:     500,
      fullscreen: false,
      topMost:    false,
      transparentBackground: false,
  });
Desktop
From now, you’re on your own




                jQueryUI
   Backbone



              Less




 JavaScript Desktop App
Mobile
  Yay!
Mobile
Mobile
• Play video and sounds
• Interact with the camera
• Geolocation
• Use the accelerometer
• Database and file system access
• Use the mobile network
•Best of all, you get native controls!
Mobile
                      Start with a view
      (Image, Scrollable, Table, Web, DashBoard, CoverFlow)


var view = Titanium.UI.createView({
      top : 0,
      left : 0,
      bottom : 0,
      width : screenWidth,
      layout : ‘vertical’
   }),
   field = Titanium.UI.createTextField(),
   btn = Titanium.UI.createButton({title : ‘Submit Name’}),
   greeting = Titanium.UI.createLabel();

view.add(field);
view.add(btn);
view.add(greeting);

btn.addEventListener(‘click’, function () {
   greeting.text = ‘Greetings, ’ + field.value + ‘!’;
});
Mobile
                          Application Menus


// Create a menu array
var menus = [];
menus.push({title:'Basic Menu', hasChild:true });
menus.push({title:'Menu Handlers (Window Options)', hasChild:true});
menus.push({title:'Menu Handlers (Activity Property)', hasChild:true});

// Create a table view with the menu as its data
var view = Titanium.UI.createTableView({
   data : menus
});

// Add the menu to the window
Titanium.UI.currentWindow.add(view);
Mobile
                       Integrate with Facebook

// Show login button
Titanium.Facebook.createLoginButton({style:'wide'});

// Request user feeds
Titanium.Facebook.requestWithGraphPath('me/feed', {
    message: statusText.value
  }, "POST", showRequestResult);

// Show Facebook data dialogs
Titanium.Facebook.dialog("feed", data, showRequestResult);

// Query Facebook data via REST API
var query = "SELECT uid, name, pic_square, status FROM user ";
    query += "where uid = " + Titanium.Facebook.uid + ")";
    query += "order by last_name limit 20";

Ti.API.info('user id ' + Titanium.Facebook.uid);
Titanium.Facebook.request('fql.query', {query: query}, function (r) {});
Mobile
                    Work with contacts


// Retrieve all people in contact list
var people = Titanium.Contacts.getAllPeople();

// Add each person as a table view row
for (var i = 0; i < people.length; i++) {
  var title = people[i].fullName,
      rows = [];

    rows[i] = Ti.UI.createTableViewRow({
      title: title,
      person:people[i],
      hasChild:true
    });
}

return rows;
Mobile
                      Start with a view
      (Image, Scrollable, Table, Web, DashBoard, CoverFlow)

var view = Titanium.UI.createView({
      top : 0,
      left : 0,
      bottom : 0,
      width : screenWidth,
      layout : ‘vertical’
   }),
   field = Titanium.UI.createTextField(),
   btn = Titanium.UI.createButton({title : ‘Submit Name’}),
   greeting = Titanium.UI.createLabel();

view.add(field);
view.add(btn);
view.add(greeting);

btn.addEventListener(‘click’, function () {
   greeting.text = ‘Greetings, ’ + field.value + ‘!’;
});
Titanium
                                 It doesn’t do everything




                       Extending Titanium
                           • Do you know Java and/or Objective-C?
                           • Do you know JavaScript?
                           • Don’t fork, extend.




More reading: http://wiki.appcelerator.org/display/guides/Extending+Titanium
Titanium Code
Tweetanium
https://github.com/appcelerator-titans/Tweetanium


Kitchen Sink
https://github.com/appcelerator/KitchenSink
Dart
Titanium Introduction

More Related Content

PDF
Making your site mobile-friendly - DevCSI Reading 21.07.2010
PDF
Making your site mobile-friendly - Ignite Manchester 01.03.2010
PDF
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
PDF
Adaptive Layouts - standards>next London 28.05.2011
PDF
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
PDF
Accessibility - A feature you can build
PPTX
AppForum 2014 Boost Hybrid App Performance
PPTX
Kids pics
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - Ignite Manchester 01.03.2010
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Adaptive Layouts - standards>next London 28.05.2011
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
Accessibility - A feature you can build
AppForum 2014 Boost Hybrid App Performance
Kids pics

Similar to Titanium Introduction (20)

PPTX
Titanium Appcelerator - Beginners
PDF
An introduction to Titanium
PPT
OSCON Titanium Tutorial
PPT
Native Mobile Application Using Open Source
PPT
Titanium Meetup Deck
PPTX
Presentation
KEY
Appcelerator Titanium at Mobile 2.0
ZIP
Mobile for the rest of us
KEY
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
KEY
Using Titanium Mobile
PPTX
Welcome to Titanium
KEY
Idea to Appstore with Titanium Mobile
PDF
What's great in Appcelerator Titanium 0.8
KEY
Titanium appcelerator sdk
PPTX
Modeveast Appcelerator Presentation
PDF
Developing native mobile applications using titanium
KEY
Mountain View July JavaScript Meetup at Google
KEY
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
ZIP
iPhone/iPad Development with Titanium
PPTX
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Titanium Appcelerator - Beginners
An introduction to Titanium
OSCON Titanium Tutorial
Native Mobile Application Using Open Source
Titanium Meetup Deck
Presentation
Appcelerator Titanium at Mobile 2.0
Mobile for the rest of us
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Using Titanium Mobile
Welcome to Titanium
Idea to Appstore with Titanium Mobile
What's great in Appcelerator Titanium 0.8
Titanium appcelerator sdk
Modeveast Appcelerator Presentation
Developing native mobile applications using titanium
Mountain View July JavaScript Meetup at Google
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
iPhone/iPad Development with Titanium
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Ad

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Electronic commerce courselecture one. Pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Electronic commerce courselecture one. Pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation_ Review paper, used for researhc scholars
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Ad

Titanium Introduction

  • 2. Ghosts Steve Brownlee & Alan Schultz
  • 3. Shrieks November 9th Discuss Inversion of Control and Dependency Injection with Brian Cavalier Future Talk Val Head will talk about Designing Motion (valhead.com) Future JavaScript Gaming Competition • impactJS.com • craftyJS.com • flashJS.com
  • 4. What is Titanium? Cross-Platform Application Development var cross-platform !== write-once-run-anywhere; Current Platforms Windows iOS Desktop Mobile Linux OSX Blackberry Android (soon)
  • 5. What is Titanium? • Open source under Apache 2.0 • Appcelerator provides training and support services • Titanium Analytics – How is my app performing? • Titanium AppCentral – Enterprise App Store
  • 6. Desktop The red-headed stepchild of Titanium • Uses webkit (but it’s behind) • Browser + standard technologies = consistent experience across OS • Feature-rich • File System Access • Taskbar Notifications • System Tray • Transparent Windows • Databases
  • 7. Desktop Creating a desktop application container is easy Titanium.UI.createWindow({ id: "propertyWindow", url: "app://second_page.html", title: "My New Window", contents: "<html>foo!</html>", baseURL: "app://page_url", x: 300, y: 400, width: 500, height: 500, fullscreen: false, topMost: false, transparentBackground: false, });
  • 8. Desktop From now, you’re on your own jQueryUI Backbone Less JavaScript Desktop App
  • 11. Mobile • Play video and sounds • Interact with the camera • Geolocation • Use the accelerometer • Database and file system access • Use the mobile network •Best of all, you get native controls!
  • 12. Mobile Start with a view (Image, Scrollable, Table, Web, DashBoard, CoverFlow) var view = Titanium.UI.createView({ top : 0, left : 0, bottom : 0, width : screenWidth, layout : ‘vertical’ }), field = Titanium.UI.createTextField(), btn = Titanium.UI.createButton({title : ‘Submit Name’}), greeting = Titanium.UI.createLabel(); view.add(field); view.add(btn); view.add(greeting); btn.addEventListener(‘click’, function () { greeting.text = ‘Greetings, ’ + field.value + ‘!’; });
  • 13. Mobile Application Menus // Create a menu array var menus = []; menus.push({title:'Basic Menu', hasChild:true }); menus.push({title:'Menu Handlers (Window Options)', hasChild:true}); menus.push({title:'Menu Handlers (Activity Property)', hasChild:true}); // Create a table view with the menu as its data var view = Titanium.UI.createTableView({ data : menus }); // Add the menu to the window Titanium.UI.currentWindow.add(view);
  • 14. Mobile Integrate with Facebook // Show login button Titanium.Facebook.createLoginButton({style:'wide'}); // Request user feeds Titanium.Facebook.requestWithGraphPath('me/feed', { message: statusText.value }, "POST", showRequestResult); // Show Facebook data dialogs Titanium.Facebook.dialog("feed", data, showRequestResult); // Query Facebook data via REST API var query = "SELECT uid, name, pic_square, status FROM user "; query += "where uid = " + Titanium.Facebook.uid + ")"; query += "order by last_name limit 20"; Ti.API.info('user id ' + Titanium.Facebook.uid); Titanium.Facebook.request('fql.query', {query: query}, function (r) {});
  • 15. Mobile Work with contacts // Retrieve all people in contact list var people = Titanium.Contacts.getAllPeople(); // Add each person as a table view row for (var i = 0; i < people.length; i++) { var title = people[i].fullName, rows = []; rows[i] = Ti.UI.createTableViewRow({ title: title, person:people[i], hasChild:true }); } return rows;
  • 16. Mobile Start with a view (Image, Scrollable, Table, Web, DashBoard, CoverFlow) var view = Titanium.UI.createView({ top : 0, left : 0, bottom : 0, width : screenWidth, layout : ‘vertical’ }), field = Titanium.UI.createTextField(), btn = Titanium.UI.createButton({title : ‘Submit Name’}), greeting = Titanium.UI.createLabel(); view.add(field); view.add(btn); view.add(greeting); btn.addEventListener(‘click’, function () { greeting.text = ‘Greetings, ’ + field.value + ‘!’; });
  • 17. Titanium It doesn’t do everything Extending Titanium • Do you know Java and/or Objective-C? • Do you know JavaScript? • Don’t fork, extend. More reading: http://wiki.appcelerator.org/display/guides/Extending+Titanium
  • 19. Dart