Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Accelerated Native Mobile Development with the Ti gem

Accelerated Native Mobile Development with the Ti gem

Wynn Netherland

September 17, 2011
Tweet

More Decks by Wynn Netherland

Other Decks in Programming

Transcript

  1. var foo = function () { } foo = ()

    -> I’d rather write this.
  2. var button = Titanium.UI.createButton({ title: 'I am a Button', height:

    40, width: 200, top: 10 }); button.addEventListener('click', function(e) { alert("Oooh, that tickles!"); }); JavaScript
  3. button = Titanium.UI.createButton title: 'I am a Button' height: 40

    width: 200 top: 10 button.addEventListener 'click', (e) -> alert "Oooh, that tickles!" CoffeeScript
  4. var buttonOne = Titanium.UI.createButton({ title:'I am a Button', height:40, width:200,

    top:10 }); var buttonTwo = Titanium.UI.createButton({ title:'I am also a Button', image:'../images/chat.png', width:200, height:40, top:60 });
  5. // js var buttonOne = Titanium.UI.createButton({ id: "buttonOne", className: "button"

    }); var buttonTwo = Titanium.UI.createButton({ id: "buttonTwo", className: "button" }); // jss #buttonOne { title:'I am a Button'; width:200; height:40; top:10 } #buttonTwo { title:'I am also a Button'; image:'../images/chat.png'; width:200; height:40; top:60 } .button { height: 40; width: 200; }
  6. #buttonOne { title: 'I am a Button'; width: 200; height:

    40; top: 10 } #buttonTwo { title: 'I am also a Button'; image: '../images/chat.png'; width: 200; height: 40; top: 60 } .button { height: 40; width: 200; }
  7. #buttonOne title: 'I am a Button' width: 200 height: 40

    top: 10 #buttonTwo title: 'I am also a Button' image: '../images/chat.png' width: 200 height: 40 top: 60 .button height: 40 width: 200
  8. =button height: 40 width: 200 #buttonOne +button title: 'I am

    a Button' top: 10 #buttonTwo +button title: 'I am also a Button' image: '../images/chat.png' top: 60
  9. ├── Coffeefile ├── Guardfile ├── LICENSE ├── Rakefile ├── Readme.mkd

    ├── Resources │ ├── app.js │ ├── app.jss │ ├── images │ │ ├── KS_nav_ui.png │ │ └── KS_nav_views.png │ ├── lsrc.js │ └── vendor ├── app │ ├── app.coffee │ └── lsrc │ ├── api.coffee │ ├── app.coffee │ ├── helpers │ │ └── application.coffee │ ├── models │ ├── stylesheets │ │ ├── app.sass │ │ └── partials │ └── views ├── build ├── config │ └── config.rb ├── docs ├── spec │ ├── app_spec.coffee │ ├── helpers │ ├── models
  10. XIB