SlideShare une entreprise Scribd logo
1  sur  20
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

Contenu connexe

Similaire à Titanium Introduction

Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
Aaron Saunders
 
SharePoint Silverlight Sandboxed solutions
SharePoint Silverlight Sandboxed solutionsSharePoint Silverlight Sandboxed solutions
SharePoint Silverlight Sandboxed solutions
Phil Wicklund
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with Titanium
Axway Appcelerator
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Patrick Lauke
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
Romain Guy
 

Similaire à Titanium Introduction (20)

Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
Building Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumBuilding Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with Titanium
 
Presentation
PresentationPresentation
Presentation
 
SharePoint Silverlight Sandboxed solutions
SharePoint Silverlight Sandboxed solutionsSharePoint Silverlight Sandboxed solutions
SharePoint Silverlight Sandboxed solutions
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
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
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Jacob Waller: Webifying Titanium Development
Jacob Waller: Webifying Titanium DevelopmentJacob Waller: Webifying Titanium Development
Jacob Waller: Webifying Titanium Development
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
PaaS + Appcelerator = WIN
PaaS + Appcelerator = WINPaaS + Appcelerator = WIN
PaaS + Appcelerator = WIN
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

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