Between Cocoa and Cocoa Touch: A Comparative Introduction

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Between Cocoa and Cocoa Touch: A Comparative Introduction - Presentation Transcript

    1. Between Cocoa and Cocoa Touch: A Comparative Intro lukhnos Lithoglyph Inc. 2009-01-22
    2. Topics Covered •3 Essential Facts • History • What’s in Common • What’s Different • Migration Paths
    3. Three Essential Facts
    4. • Cocoa and Objective-C go together • You need to know Foundation (NS.+) classes • App Store on iPhone is the disruptive technology
    5. History
    6. NEXTSTEP 1989-1995 Mach, Objective-C The “NS-” prefix
    7. Mac OS X 1999-present BSD userland Quartz Carbon Cocoa
    8. iPhone OS 2007 OS X under hood Desktop-grade services
    9. What’s in Common
    10. • Main Development Language • OS and Framework • Design • Tools
    11. Main Developement Language • Objective-C • Child of Smalltalk, sibling of Ruby • “C with OO” • Also, Objective-C++
    12. OS and Framework • Mac OS X essentials • BSD userland • CoreFoundation • Quartz • Foundation • Core.+ system components
    13. CoreFoundation • C, refcount-based data type and system service library • CFTypeRef family: array, dictionary, date, number, string... • Runloop management, i18n, etc. • CFNetwork stack • Quartz and other Core.+ services share the same model
    14. Foundation • The basis of Cocoa (hence “Foundation”) • All beginning with “NS” prefix (for historical reasons) • Non-nil containers: NSArray, NSDictionary, NSSet etc. • NSRunLoop, NSThread, etc., high-level system services • NSUserDefaults, NSNotificationCenter, app-support infrastructure
    15. Design • Bundle • Internationalization • Design patterns • delegate • notification • target/action model
    16. Tools • gcc • Xcode • Interface Builder • Instrument
    17. What’s Different?
    18. • Device Characteristics • System Limitations • SDK Differences • Development Limitations
    19. Device Characteristics • Screen estate • Nature of events • Usage, context, depth v.s. shallowness • Connectivity/ubiquitity
    20. System Limitations • Memory footprint • App lifecycle • Sandbox • No inter-app communication
    21. SDK Differences • AppKit v.s. UIKit • NSWindow/NSView v.s. unified UIView model • Better, re-inforced MVC paradigm in iPhone SDK
    22. Development Limitations • No external framework • No automatical garbage collection (GC) ! • Sandbox • Code signing constraints • Testing and distribution constraints
    23. Some Things We’ve Learned
    24. • Think in Objective-C 2.0 • Different platform for different use • Maximize shared code base, sweat on platform details
    25. Think in Objective-C 2.0 • @property saves your poor fingers • Fast enumeration also rocks • Formal and optional protocol can lead to better design • Also, in Cocoa, performSelector:onThread: etc. makes life easier
    26. Different Platform and Use • “Your iPhone is not a Mac Pro” • Think in bigger picture: Mobile-Web-Desktop integration
    27. Shared Code Base? • Cross-platform way of thinking helpful • Thinkin 32/64-bit neutral code, Endian-agnostic, encoding- agnostic, etc.
    28. In Essence • Objective-C is a must • Know the shared libraries: Foundation, CoreFoundation • Sweat the minor differences and details
    29. Question & Answer
    SlideShare Zeitgeist 2009

    + lukhnoslukhnos Nominate

    custom

    1058 views, 1 favs, 0 embeds more stats

    Lukhnos gives a talk at a CocoaHeads Taipei talk on more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1058
      • 1058 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 16
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories