Slide 1

Slide 1 text

Building MeatText Super fast mobile development with Cordova + Backbone.js Garrett Miller @heyitsgarrett

Slide 2

Slide 2 text

@heyitsgarrett

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

DOODLE OR DIE

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Let’s build MeatText!

Slide 7

Slide 7 text

+

Slide 8

Slide 8 text

(who also have iPhones) Find My Friends

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Google:

Slide 11

Slide 11 text

• Easy • Quick • Fun So let’s make sharing a location...

Slide 12

Slide 12 text

• Easy • Quick • Fun (and do it in two weeks) SXSW! So let’s make sharing a location...

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Create the Instagram of Maps

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

Implementation >

Slide 19

Slide 19 text

Apache Cordova •HTML/CSS + JavaScript •Renders in WebView •Supplement with plug-ins

Slide 20

Slide 20 text

meattext-ios - CordovaLib - MeatText - MeatText.xcodeproj - README.md - cordova - www

Slide 21

Slide 21 text

meattext-ios - CordovaLib - MeatText - MeatText.xcodeproj - README.md - cordova - www - cordova-2.4.0.js - index.html - loading.gif

Slide 22

Slide 22 text

meattext-ios - CordovaLib - MeatText - MeatText.xcodeproj - README.md - cordova - www - cordova-2.4.0.js - index.html - loading.gif

Slide 23

Slide 23 text

index.html

Slide 24

Slide 24 text

index.html

Slide 25

Slide 25 text

TROJAN HORSE

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

LIVE DEMO

Slide 28

Slide 28 text

Main viewport

Slide 29

Slide 29 text

•Stop tying data to the DOM •Turns your data into a Model •Listens for attribute changes, updates the Model

Slide 30

Slide 30 text

When the model changes, the view updates

Slide 31

Slide 31 text

When the model changes, the view updates PERFECT FOR MOBILE!

Slide 32

Slide 32 text

http://tiny.cc/bt7yuw

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

. . .

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Model attributes

Slide 38

Slide 38 text

“coffee”

Slide 39

Slide 39 text

Events

Slide 40

Slide 40 text

Events

Slide 41

Slide 41 text

Attribute Changes

Slide 42

Slide 42 text

GOTCHAS

Slide 43

Slide 43 text

position: absolute/fixed is your friend

Slide 44

Slide 44 text

Main viewport

Slide 45

Slide 45 text

Animating CSS Transform = Jumpy

Slide 46

Slide 46 text

Animating CSS Transform = Jumpy X translate3D

Slide 47

Slide 47 text

translate3D

Slide 48

Slide 48 text

this is not always this

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

model.set(...) var model = this.model;

Slide 52

Slide 52 text

max file size in WebView <= 5 megapixels

Slide 53

Slide 53 text

width * height ≤ 5 * 1024 * 1024

Slide 54

Slide 54 text

width * height ≤ 5 * 1024 * 1024 width * height ≤ 3 * 1024 * 1024 on devices with less than 256 RAM:

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

elastic scrolling

Slide 57

Slide 57 text

-webkit-overflow-scrolling: touch;

Slide 58

Slide 58 text

300ms tap delay

Slide 59

Slide 59 text

ghost clicks

Slide 60

Slide 60 text

fastclick/onpress plugins fix the delay and ghost clicks

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

@heyitsgarrett

Slide 64

Slide 64 text

meattext.com