Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Accelerated Native Mobile Development with the ...
Search
Wynn Netherland
September 17, 2011
Programming
530
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Accelerated Native Mobile Development with the Ti gem
Wynn Netherland
September 17, 2011
More Decks by Wynn Netherland
See All by Wynn Netherland
Building a Resilient API with open source
pengwynn
10
820
Refactoring with Science
pengwynn
11
2k
> hubot deploy GitHub
pengwynn
26
3k
API Realtalk
pengwynn
6
640
Hypermedia APIs - less hype more media, please
pengwynn
18
2k
User Experience Patterns for APIs
pengwynn
24
930
A Spree Themer's Toolkit
pengwynn
7
1.6k
Accelerating Titanium Development with CoffeeScript, Compass, and Sass
pengwynn
13
2.8k
Ten Things We Learned Building TweetCongress
pengwynn
2
390
Other Decks in Programming
See All in Programming
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
180
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.1k
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
270
Android CLI
fornewid
0
120
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
GitHubCopilotCLIのスラッシュコマンドを自作してみる
htkym
0
100
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
What's New in Android 2026
veronikapj
0
150
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
120
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.7k
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.6k
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
52k
Between Models and Reality
mayunak
4
380
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Crafting Experiences
bethany
1
230
The Language of Interfaces
destraynor
162
27k
Color Theory Basics | Prateek | Gurzu
gurzu
0
400
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
550
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
200
GitHub's CSS Performance
jonrohan
1033
470k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
Transcript
MOBILE APP DEVELOPMENT WITH Ti Accelerated WYNNNETHERLAND
None
D'oh! Sorry, will have to blind you with science.
None
Isn’t she Sassy, folks? GET THE BOOK.
sass40 Save 40% and get early access! Sadly, sass100 is
not a valid code.
And you are?
So you wanna build a mobile app?
None
Native vs. Web
Why native?
None
None
None
None
None
None
None
Obj C Java
Titanium
None
SINGLE JAVASCRIPT API
COMPILES TO NATIVE CODE
None
OPEN SOURCE! http://github.com/appcelerator/titanium_mobile
Development options
None
I’d rather not use your IDE. After fleeing .NET for
the joys of Ruby
Fortunately, there’s a CLI.
DEMO A quick
Fortunately, there’s a CLI. Unfortunately, it’s written in Python.
Why should I care? I’m a Rubyist
You'll still need a server API Rails, Sinatra, etc.
Embrace your inner polyglot.
COFFEESCRIPT
var foo = function () { } foo = ()
-> I’d rather write this.
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
button = Titanium.UI.createButton title: 'I am a Button' height: 40
width: 200 top: 10 button.addEventListener 'click', (e) -> alert "Oooh, that tickles!" CoffeeScript
JavaScript Frameworks
Underscore.js https://github.com/documentcloud/underscore
STYLESHEETS
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 });
// 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; }
JSS work like CSS.
But I don't even like CSS.
SASS & COMPASS Fortunately, there's
#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; }
#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
=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
Ruby Oh yeah, and there's
CODE DEEP DIVE
Ti GEM
gem install ti
Generate.
ti new <name> <id> <platform>
ti new lsrc com.lonestarrubyconf.v iphone
├── 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
ti generate <model/controller/view> <name>
Golf.Views.GamePlay.createScoreCardView = (options) -> view = Ti.UI.createView (options) view
ti scaffold <window/tabgroup/view> <domain> <name>
Compile.
ti compile <all/coffee/sass>
Build.
ti build <all/iphone/android/ipad/desktop/>
Ti GEM @revans @baldrailers @rupakg
Get involved!
Testing.
Jasmine
Jasmine https://github.com/akahigeg/jasmine-titanium
XIB
xib2js https://github.com/daoki2/xib2js
js2coffee http://ricostacruz.com/js2coffee/
QUESTIONS?
None
@pengwynn