Slide 1

Slide 1 text

Tips & Tricks for iPhone Application Development Skills Matter - London - February 2nd 2010

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Adrian Kosmaczewski

Slide 4

Slide 4 text

akosma software akosma.com akosma.tumblr.com github.com/akosma linkedin.com/in/akosma facebook.com/akosma

Slide 5

Slide 5 text

@akosma

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

some questions

Slide 8

Slide 8 text

new to iPhone?

Slide 9

Slide 9 text

designer? developer?

Slide 10

Slide 10 text

technologies?

Slide 11

Slide 11 text

Android J2EE J2ME .NET Ruby on Rails others?

Slide 12

Slide 12 text

programming languages?

Slide 13

Slide 13 text

C / C++? Java, C#? Ruby, Python, Lua? JavaScript?

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Dev Days for iPhone

Slide 16

Slide 16 text

Mon, April 26th 2010

Slide 17

Slide 17 text

Win a free ticket!

Slide 18

Slide 18 text

Fill your evaluation form! :)

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

iPhone dev ≠ web dev

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Cocoa & Objective-C

Slide 23

Slide 23 text

born in the 80s

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Objective-C

Slide 29

Slide 29 text

Objective-C Java @interface & @implementation class (1 file) @protocol interface #import // files! import // classes! categories n/a (in C#, “class extensions”) id n/a (generics?)

Slide 30

Slide 30 text

Objective-C Java @selector n/a NSObject / NSProxy / ... Object @public / @protected / @private public / protected / private @try / @catch / @finally NSException try / catch / finally Exception n/a package / namespace

Slide 31

Slide 31 text

• Thin layer around C • Message-dispatch runtime • Static and dynamic (you choose) • The “real” inspiration for Java: • http://cs.gmu.edu/~sean/stuff/java- objc.html

Slide 32

Slide 32 text

• Single inheritance + interfaces (“@protocols”) • @protocols can have optional methods • Fields protected by default • All methods are virtual and overridable • Methods can be added to existing classes • Full introspection / reflection • Messages can be intercepted and forwarded à la AOP

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Demo

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Cocoa Touch

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

iPhone Specifics

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

128 or 256 MB RAM

Slide 45

Slide 45 text

~70 MB for the OS!

Slide 46

Slide 46 text

no swap file

Slide 47

Slide 47 text

(no virtual memory)

Slide 48

Slide 48 text

no garbage collector

Slide 49

Slide 49 text

(manual memory management)

Slide 50

Slide 50 text

http://cocoadevcentral.com/d/learn_objectivec/

Slide 51

Slide 51 text

no automatic objects on the stack (C++)

Slide 52

Slide 52 text

// C++ // Memory freed when out of scope std::string name(“Adrian”); std::string *name = NULL; name = new std::string(“Adrian”); delete name;

Slide 53

Slide 53 text

hygiene

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

memory warnings

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

avoid autorelease

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

lazy-loading & reuse

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

custom table cells & reuse

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

override setters properly

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

beware of delegation

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

instruments & static analysis

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

warnings as errors

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

code organization

Slide 73

Slide 73 text

(cheaper maintenance)

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

iPhone ≠ computer

Slide 76

Slide 76 text

http://www.flickr.com/photos/oskay/365607662/

Slide 77

Slide 77 text

http://www.flickr.com/photos/blakespot/2379207825/

Slide 78

Slide 78 text

http://www.flickr.com/photos/oskay/365607591/

Slide 79

Slide 79 text

Mobile HIG

Slide 80

Slide 80 text

now more important than ever!

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

NDA

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

books

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

thanks!

Slide 98

Slide 98 text

Please fill your evaluation forms!

Slide 99

Slide 99 text

(you could win a ticket)

Slide 100

Slide 100 text

questions?