Slide 1

Slide 1 text

MOBILE APP DEVELOPMENT WITH Ti Accelerated WYNNNETHERLAND

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

D'oh! Sorry, will have to blind you with science.

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Isn’t she Sassy, folks? GET THE BOOK.

Slide 6

Slide 6 text

sass40 Save 40% and get early access! Sadly, sass100 is not a valid code.

Slide 7

Slide 7 text

And you are?

Slide 8

Slide 8 text

So you wanna build a mobile app?

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Native vs. Web

Slide 11

Slide 11 text

Why native?

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Obj C Java

Slide 20

Slide 20 text

Titanium

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

SINGLE JAVASCRIPT API

Slide 23

Slide 23 text

COMPILES TO NATIVE CODE

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

OPEN SOURCE! http://github.com/appcelerator/titanium_mobile

Slide 26

Slide 26 text

Development options

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

I’d rather not use your IDE. After fleeing .NET for the joys of Ruby

Slide 29

Slide 29 text

Fortunately, there’s a CLI.

Slide 30

Slide 30 text

DEMO A quick

Slide 31

Slide 31 text

Fortunately, there’s a CLI. Unfortunately, it’s written in Python.

Slide 32

Slide 32 text

Why should I care? I’m a Rubyist

Slide 33

Slide 33 text

You'll still need a server API Rails, Sinatra, etc.

Slide 34

Slide 34 text

Embrace your inner polyglot.

Slide 35

Slide 35 text

COFFEESCRIPT

Slide 36

Slide 36 text

var foo = function () { } foo = () -> I’d rather write this.

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

JavaScript Frameworks

Slide 40

Slide 40 text

Underscore.js https://github.com/documentcloud/underscore

Slide 41

Slide 41 text

STYLESHEETS

Slide 42

Slide 42 text

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 });

Slide 43

Slide 43 text

// 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; }

Slide 44

Slide 44 text

JSS work like CSS.

Slide 45

Slide 45 text

But I don't even like CSS.

Slide 46

Slide 46 text

SASS & COMPASS Fortunately, there's

Slide 47

Slide 47 text

#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; }

Slide 48

Slide 48 text

#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

Slide 49

Slide 49 text

=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

Slide 50

Slide 50 text

Ruby Oh yeah, and there's

Slide 51

Slide 51 text

CODE DEEP DIVE

Slide 52

Slide 52 text

Ti GEM

Slide 53

Slide 53 text

gem install ti

Slide 54

Slide 54 text

Generate.

Slide 55

Slide 55 text

ti new

Slide 56

Slide 56 text

ti new lsrc com.lonestarrubyconf.v iphone

Slide 57

Slide 57 text

├── 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

Slide 58

Slide 58 text

ti generate

Slide 59

Slide 59 text

Golf.Views.GamePlay.createScoreCardView = (options) -> view = Ti.UI.createView (options) view

Slide 60

Slide 60 text

ti scaffold

Slide 61

Slide 61 text

Compile.

Slide 62

Slide 62 text

ti compile

Slide 63

Slide 63 text

Build.

Slide 64

Slide 64 text

ti build

Slide 65

Slide 65 text

Ti GEM @revans @baldrailers @rupakg

Slide 66

Slide 66 text

Get involved!

Slide 67

Slide 67 text

Testing.

Slide 68

Slide 68 text

Jasmine

Slide 69

Slide 69 text

Jasmine https://github.com/akahigeg/jasmine-titanium

Slide 70

Slide 70 text

XIB

Slide 71

Slide 71 text

xib2js https://github.com/daoki2/xib2js

Slide 72

Slide 72 text

js2coffee http://ricostacruz.com/js2coffee/

Slide 73

Slide 73 text

QUESTIONS?

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

@pengwynn