iphone development
play

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


  1. iPhone Development A Web Dev’s Perspective Ben Sandofsky - ben@sandofsky.com

  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

  3. The Platform • You must use Objective-C (for now) • Cocoa Touch is the Framework • You must use Xcode

  4. Objective-C • A superset of C • Message Based • Static or Dynamic Typing

  5. Syntax human.h - (void) say:(NSString *)message with:(NSString *)emotion; human.m - (void) say:(NSString *)message with:(NSString *)emotion { NSLog(@”He said %@ with great %@”, message, emotion); } [human say:@”Hello World” with:@”joy”];

  6. What’s good? • Introspection and Pseudo Metaprogramming • Type safety is optional • Clean Syntax

  7. What’s bad? • Rituals: header files, types required in method signatures • Message Verbosity • Memory Management

  8. Memory Management • No Garbage Collector (yet) • Retain/Release Model. (Leaks ahoy!) • Auto-release Pools

  9. The Framework • OO Primitives: NSString, NSNumber, etc • Heavy use of Delegates • Model View Controller

  10. Delegates • Alternative to Subclassing • Override Custom Behavior • Leaner

  11. Views • Layers with subview • Respond to Events and send messages • Pain to set by hand

  12. Interface Builder • Set views and wire up events WYSIWYG • “Freeze” it to a file

  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

  14. iPhone Development A Web Dev’s Perspective Ben Sandofsky - ben@sandofsky.com

Recommend


More recommend