Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Titanium Workshop - [Sainté Mobile Days]

1,144 views

Published on

Introduction workshop on Titanium and Alloy where attendees make a basic app in just a few hours.

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Titanium Workshop - [Sainté Mobile Days]

  1. 1. Building mobile apps with Titanium and Alloy Boydlee Pollentine & Christian Brousseau
  2. 2. @TheBrousse @Boydleep
  3. 3. What is Titanium
  4. 4. How does it work? Native Application Native components Native Code Titanium Code (JavaScript) Objective-C Java Other Titanium Compiler JavaScript Runtime Native Compiler JavaScript Code
  5. 5. Under the hood Your Application UI API Phone API JavaScript - Native Bridge Operating System Modules
  6. 6. Hello World Resources/app.js var window = Ti.UI.createWindow({ backgroundColor: „white‟ }); var label = Ti.UI.createLabel({ color: „black‟, text: „Hello World‟ }); label.addEventListener(„click‟, function() { require(„windowTwo‟); } ); window.add(label); window.open();
  7. 7. Alloy
  8. 8. How does “that” work Alloy Code Titanium Code JavaScript XML TSS Alloy Pre-compiler Native Code Titanium Compiler Native Compiler
  9. 9. Same Hello World views/index.xml <Alloy> <Window> <Label onClick=”open”>Hello World</Label> </Window> </Alloy> “Window”: { backgroundColor: “white” } controllers/index.js function open() { require(“windowTwo”); } $.index.open(); “Label”: { color: “black” } styles/index.tss
  10. 10. This is our App
  11. 11. We need data URL: http://developer.rottentomatoes.com API Key: fuvfpegjuuqtrdj5wm6sg2x5
  12. 12. What does it return? { } "total": 37, "movies": [ { "id": "769959054", "title": "The Dark Knight", "year": 2008, "release_dates": { "theater": "2008-07-18", "dvd": "2008-12-09" }, "ratings": { "critics_rating": "Certified Fresh", "critics_score": 94 } }, { "id": "10483", "title": "Batman", "year": 1989, "release_dates": { "theater": "1989-06-23", "dvd": "1997-03-25" }, "ratings": { "critics_rating": "Fresh", "critics_score": 71 } } ]
  13. 13. Let’s get to work
  14. 14. There are books for that

×