iPhone Development A Web Devs Perspective Ben Sandofsky - - - PowerPoint PPT Presentation

iphone development
SMART_READER_LITE
LIVE PREVIEW

iPhone Development A Web Devs Perspective Ben Sandofsky - - - PowerPoint PPT Presentation

iPhone Development A Web Devs Perspective Ben Sandofsky - ben@sandofsky.com Im Your Straight Man Im a Ruby guy Put on ad-hoc Yellowpages.com iPhone App Team Worked with the SDK since Beta 1 The Platform You must use


slide-1
SLIDE 1

iPhone Development

Ben Sandofsky - ben@sandofsky.com

A Web Dev’s Perspective

slide-2
SLIDE 2

I’m Your Straight Man

  • I’m a Ruby guy
  • Put on ad-hoc

Yellowpages.com iPhone App Team

  • Worked with the

SDK since Beta 1

slide-3
SLIDE 3

The Platform

  • You must use Objective-C (for now)
  • Cocoa Touch is the Framework
  • You must use Xcode
slide-4
SLIDE 4

Objective-C

  • A superset of C
  • Message Based
  • Static or Dynamic Typing
slide-5
SLIDE 5

Syntax

[human say:@”Hello World” with:@”joy”];

  • (void) say:(NSString *)message with:(NSString *)emotion;
  • (void) say:(NSString *)message with:(NSString *)emotion

{ NSLog(@”He said %@ with great %@”, message, emotion); }

human.h human.m

slide-6
SLIDE 6

What’s good?

  • Introspection and Pseudo Metaprogramming
  • Type safety is optional
  • Clean Syntax
slide-7
SLIDE 7

What’s bad?

  • Rituals: header files, types required in

method signatures

  • Message Verbosity
  • Memory Management
slide-8
SLIDE 8

Memory Management

  • No Garbage Collector (yet)
  • Retain/Release Model. (Leaks ahoy!)
  • Auto-release Pools
slide-9
SLIDE 9

The Framework

  • OO Primitives: NSString, NSNumber, etc
  • Heavy use of Delegates
  • Model View Controller
slide-10
SLIDE 10

Delegates

  • Alternative to Subclassing
  • Override Custom Behavior
  • Leaner
slide-11
SLIDE 11

Views

  • Layers with subview
  • Respond to Events

and send messages

  • Pain to set by hand
slide-12
SLIDE 12

Interface Builder

  • Set views and wire

up events WYSIWYG

  • “Freeze” it to a file
slide-13
SLIDE 13

Conclusions

  • There’s a reason iPhone Developers charge

$200 an hour.

  • A lot of it is just “different,” but a lot of it is

just hard.

  • It will get easier as hardware gets faster
slide-14
SLIDE 14

iPhone Development

Ben Sandofsky - ben@sandofsky.com

A Web Dev’s Perspective