Slide 1

Slide 1 text

Advanced Cross-Platform Development Ricardo Alcocer | @ricardoalcocer

Slide 2

Slide 2 text

Cross-Platform Development Fundamentals Ricardo Alcocer | @ricardoalcocer

Slide 3

Slide 3 text

What you need to know before you build a cross- platform app Ricardo Alcocer | @ricardoalcocer

Slide 4

Slide 4 text

$ whoami · Lead Developer Evangelist @ Appcelerator · Former independent Titanium trainer · Obsessed with native cross- platform development · Love knowledge transfer, hacking and tech startups · Author of Titanium Alloy in Action

Slide 5

Slide 5 text

$ whoami · Lead Developer Evangelist @ Appcelerator · Former independent Titanium trainer · Obsessed with native cross- platform development · Love knowledge transfer, hacking and tech startups · Author of Titanium Alloy in Action

Slide 6

Slide 6 text

Cross-platform Development: A very old problem

Slide 7

Slide 7 text

Menus are in different places

Slide 8

Slide 8 text

Buttons are written in different styles

Slide 9

Slide 9 text

These two buttons are different by design

Slide 10

Slide 10 text

Fast-forward to 2009

Slide 11

Slide 11 text

iOS was nice and polished; Android was mostly monochromatic and plain

Slide 12

Slide 12 text

Today Android has user interface guidelines

Slide 13

Slide 13 text

Devices are not only for testing

Slide 14

Slide 14 text

Be the #1 fan of the platforms you target

Slide 15

Slide 15 text

When you strive for consistency, you achieve it through mediocrity — Phil Libin, CEO Evernote

Slide 16

Slide 16 text

Evernote mobile app

Slide 17

Slide 17 text

Cross-platform done right

Slide 18

Slide 18 text

Can we achieve this with Appcelerator?

Slide 19

Slide 19 text

Heck yeah! And with a single code base!

Slide 20

Slide 20 text

It all begins with your "main app container"

Slide 21

Slide 21 text

Cross-platform tabs

Slide 22

Slide 22 text

Different container, code reused

Slide 23

Slide 23 text

Multiple Windows in a single View file Home

Slide 24

Slide 24 text

Views in platform-specific folders

Slide 25

Slide 25 text

Platform-specific styling ".loginLabel[platform=ios]":{ font:{ fontSize: 20 } } ".loginLabel[platform=ios]":{ font:{ fontSize: 22 } }

Slide 26

Slide 26 text

index.xml

Slide 27

Slide 27 text

index.js

Slide 28

Slide 28 text

Platform-specific home.xml

Slide 29

Slide 29 text

Platform-specific containers

Slide 30

Slide 30 text

Sample full app

Slide 31

Slide 31 text

Know your target platforms Read the User Interface Guidelines

Slide 32

Slide 32 text

Top 10 Tips for successful cross-platform development

Slide 33

Slide 33 text

#10 Work with your design team

Slide 34

Slide 34 text

#9 Beauty is relative to the platform

Slide 35

Slide 35 text

#8 Code reuse is for code, not necessarily for UI

Slide 36

Slide 36 text

#7 Tabs: Deep vs Shallow

Slide 37

Slide 37 text

Tabs : Deep vs Shallow

Slide 38

Slide 38 text

Tabs : Deep vs Shallow

Slide 39

Slide 39 text

#6 Always think stateless

Slide 40

Slide 40 text

#5 Know your target platforms Read the User Interface Guidelines

Slide 41

Slide 41 text

#4 Don't fear modules

Slide 42

Slide 42 text

#3 Emulate UI elements only when justified

Slide 43

Slide 43 text

#2 Test often

Slide 44

Slide 44 text

#1 Be your user!

Slide 45

Slide 45 text

Questions?

Slide 46

Slide 46 text

Thank you! Twitter: @ricardoalcocer SpeakerDeck: /ricardoalcocer Find the sample code at Github.com/ricardoalcocer Check out my book at http://bit.ly/alloybook 40%-off with coupon code tialloyapp