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

Ruby Ireland - Titanium

Ruby Ireland - Titanium

Overview of Titanium for Ruby Ireland

Simon Rand

June 18, 2013
Tweet

More Decks by Simon Rand

Other Decks in Programming

Transcript

  1. Me Principal @iorum Web & mobile developers ❤ Ruby &

    JavaScript I’m a designer & developer @simonrand / iorum.ie
  2. @simonrand / iorum.ie Titanium Allows you to write mobile apps

    in JavaScript, for iOS, Android, Blackberry, Tizen & mobile web Windows Phone coming soon
  3. @simonrand / iorum.ie Why We Use It Originally used it

    for prototyping Found it has value I’m not a total Titanium advocate
  4. @simonrand / iorum.ie What Is Titanium? Titanium SDK provides a

    native bridge/proxy to interpret your JS code, evaluated at runtime Compiles to bytecode so it lets you build native apps, using native APIs Full toolchain (nodejs based CLI or Ti Studio) Over 55,000 Titanium apps available in app stores
  5. @simonrand / iorum.ie Licensing Open Source - on Github Free

    to use Commercial cloud service and support Community (modules/tools)
  6. @simonrand / iorum.ie Objective-C (iOS) Java (Android) .NET (Windows Phone)

    C++ (Blackberry) Rubymotion Titanium (JavaScript) PhoneGap/Mobile Web (HTML/CSS/JavaScript) Harder Easier Perception of difficulty for a web developer (totally unverified) Note: I have omitted a large amount of possible alternatives
  7. @simonrand / iorum.ie Objective-C (iOS) Java (Android) .NET (Windows Phone)

    C++ (Blackberry) Rubymotion Titanium (JavaScript) PhoneGap/Mobile Web (HTML/CSS/JavaScript) Harder Easier Perception of difficulty for a web developer (totally unverified) Note: I have omitted a large amount of possible alternatives Native Cross Platform
  8. @simonrand / iorum.ie Model exports.definition = { config: { "URL":

    "http://offset.app.s3-website-eu-west-1.amazonaws.com/data/speakers.json", "adapter": { "type": "restapi", // defines the Backbone sync method, can be sql, properties, etc. "collection_name": "speaker" } }, extendModel: function(Model) { _.extend(Model.prototype, {}); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, {}); return Collection; } }
  9. @simonrand / iorum.ie Main Window <!-- views/index.xml --> <Alloy> <TabGroup>

    <Tab title="Tab 1" icon="KS_nav_ui.png"> <Require src="speakers/index"/> <!-- pulls in external file --> </Tab> <Tab title="Tab 2" icon="KS_nav_views.png"> <Window title="Tab 2"> <!-- inline window definition --> <Label>I am Window 2</Label> </Window> </Tab> </TabGroup> </Alloy> // controllers/index.js $.index.open();
  10. @simonrand / iorum.ie Speaker List Window <!-- views/speakers/index.xml --> <Alloy>

    <Collection src="speaker"/> <!-- makes speaker collection available to the view --> <Window title="Tab 1"> <TableView id="tableview" dataCollection="speaker"> <Require src="speakers/row"/> </TableView> </Window> </Alloy> <!-- views/speakers/row.xml --> <Alloy> <TableViewRow title="{name}"> </Alloy> // controllers/speakers/index.js Alloy.Collections.speaker.fetch() $.tableview.addEventListener('click', function(row) { alert(row.rowData.title); });
  11. @simonrand / iorum.ie Our experiences.. ..have been good Shared core

    codebases Shared components (HTML based, can do native though)
  12. @simonrand / iorum.ie Cross Platform-ness Climote 99% core code the

    same ~ 75% UI code iOS in 3 months Android port in 3 weeks
  13. @simonrand / iorum.ie My Thoughts Cross platform capabilities has huge

    advantages Great for prototyping Open Source (we’ve forked) It’s native Don’t write it off, even on one platform