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
Adventures in Cross Platform
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jason Kneen
May 11, 2014
Technology
470
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Adventures in Cross Platform
My Talk from Day 2 of TiConf US 2014 on cross-platform lessons learnt.
Jason Kneen
May 11, 2014
More Decks by Jason Kneen
See All by Jason Kneen
Adventures in Cross Platform TiConf EU 2014
jasonkneen
3
1.1k
Dynamic Styles with Widgets and Alloy 1.2
jasonkneen
0
710
URL Schemes and Titanium - Redux
jasonkneen
1
430
Introduction to Titanium from DMC13
jasonkneen
1
200
Titanium and URL Schemes
jasonkneen
14
6.6k
Other Decks in Technology
See All in Technology
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.1k
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
200
新しい SLO が良い感じにハマっている話
z63d
4
2k
論語・武士道・産業革命から見る かわるもの、かわらないもの
ichimichi
8
2.1k
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
1.2k
Retriever と Reranker、結局どうする?
kazuaki
1
590
システム監視を 「システムを監視するだけ」で 終わらせないために
seiud
0
160
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
8
2k
AWS環境のセキュリティ不安を解消した企業事例 ~よくある課題と対策を一挙公開~
asanoharuki
1
280
ウォーターフォール開発案件のPMとしてAI活用を模索している話
hatahata021
3
260
NYC Summit 2026 におけるAmazon Bedrock AgentCore のアップデート
ren8k
3
310
実践が先生だった— 新卒サーバーエンジニア1年目のリアル
mixi_engineers
PRO
0
230
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
52k
Why Our Code Smells
bkeepers
PRO
340
58k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
RailsConf 2023
tenderlove
30
1.5k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
New Earth Scene 8
popppiees
3
2.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Writing Fast Ruby
sferik
630
63k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
310
Are puppies a ranking factor?
jonoalderson
1
3.7k
Transcript
Adventures in cross platform Jason Kneen
+BTPO,OFFO http://twitter/jasonkneen http://github.com/jasonkneen http://jasonified.com http://bouncingfish.com App Developer, TCE Certified Titanium
“Titan”
• Breakdown pricing; Core, iOS, Android • Factor in platform,
form factors • Include costs for AppStore submissions, re-submissions Pricing
Design Retina Dimensions No font details Designed for iOS
• Acknowledge OS differences (Nav, back buttons) • Educate the
client / designer • Give examples / links to tools • Send them images folder structure Design
• Real devices • hdpi, ldpi, etc • Multiple OSs
• Don’t forget 2.3.x Testing
• TestFlight • Installrapp Delivery
• Free, easy • Fast • Google APIs, Play support,
simple “hack” • Great GPS, Mapping tools • Android first! Genymotion
Android development before Genymotion
Android development after Genymotion
• See changes (almost) instantly • Works on simulator, emulator,
device • Instantly resolve platform differences as you go • Don’t get “locked in” to one platform • But, there be dragons! Use TiShadow / Liveview
• Separation of business logic & UI • Isolate code
with OS_IOS, OS_ANDROID • Platform, formfactor specific elements • Only relevant code / files are included in a build • Makes cross-plaform easier Alloy
• Separate business logic • APIs, Social, GPS etc •
Better memory management • Easier to re-use commonJS
• Define granular classes • Test layouts on both platforms
• app.tss for global classes • “reset” for Android • Platform specific overrides app.tss, classes
• Use dp/dip (ti.ui.defaultunit) • Avoid fixed widths / heights,
unless.. • Top, Left, Bottom, Right is the same on all devices • %age and fluid layouts • Dynamic buttons Flexible layouts
• Very granular • Long, NotLong, Landscape, Portrait • Keep
it simple • Retina images and Android ! ! Density Images
• iOS style stretchable images • Splash screens • Android
version of leftCap, topCap • Editor built-in to Android SDK • http://9patch.fokkezb.nl/ ! 9-Patch images
• Reduce “over the bridge” calls • TableViews - classname
• ImageViews vs Views • ListViews over TableViews • Reduce views, especially in tables Android Performance
• Views = screens • Swipe between (great for prototyping
/ demos) • Disable manual swiping • Simple view stack management • Super-fast and smooth animation on Android ScrollableView Navigation
• Simple “inheritance” for Alloy Controllers • Re-use controllers, views
• Create cross-platform template wrappers Base Controllers
• <require src=“controllerName”/> • Latest Alloy supports require/widgets with children
• Create a wrapper template controller Require templates
• Little-known feature of Alloy • Override Alloy Tags to
provide per-platform support • Create your own tags! • Not a replacement for Widgets, just different The “module” attribute
None
Thank you!
+BTPO,OFFO http://twitter/jasonkneen http://github.com/jasonkneen http://jasonified.com http://bouncingfish.com