SlideShare uma empresa Scribd logo
1 de 29
Between Cocoa and Cocoa Touch:
A Comparative Intro
lukhnos
Lithoglyph Inc.
2009-01-22
Topics Covered

•3   Essential Facts

• History

• What’s    in Common

• What’s    Different

• Migration   Paths
Three Essential Facts
• Cocoa   and Objective-C go together

• You   need to know Foundation (NS.+) classes

• App   Store on iPhone is the disruptive technology
History
NEXTSTEP
   1989-1995
Mach, Objective-C
The “NS-” prefix
Mac OS X
 1999-present
 BSD userland
   Quartz
   Carbon
    Cocoa
iPhone OS
        2007
  OS X under hood
Desktop-grade services
What’s in Common
• Main    Development Language

• OS   and Framework

• Design

• Tools
Main Developement Language

• Objective-C

• Child   of Smalltalk, sibling of
 Ruby

• “C   with OO”

• Also, Objective-C++
OS and Framework

• Mac   OS X essentials

• BSD   userland

• CoreFoundation

• Quartz

• Foundation

• Core.+   system components
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
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
Design

• Bundle

• Internationalization

• Design   patterns

  • delegate

  • notification

  • target/action   model
Tools


• gcc

• Xcode

• Interface   Builder

• Instrument
What’s Different?
• Device   Characteristics

• System   Limitations

• SDK   Differences

• Development    Limitations
Device Characteristics

• Screen   estate

• Nature   of events

• Usage, context, depth   v.s.
 shallowness

• Connectivity/ubiquitity
System Limitations


• Memory     footprint

• App   lifecycle

• Sandbox

• No   inter-app communication
SDK Differences


• AppKit   v.s. UIKit

• NSWindow/NSView         v.s. unified UIView model

• Better, re-inforced   MVC paradigm in iPhone SDK
Development Limitations

• No   external framework

• No   automatical garbage collection (GC) !

• Sandbox

• Code   signing constraints

• Testing   and distribution constraints
Some Things We’ve Learned
• Think   in Objective-C 2.0

• Different   platform for different use

• Maximize    shared code base, sweat on platform
 details
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
Different Platform and Use



• “Your   iPhone is not a Mac Pro”

• Think   in bigger picture: Mobile-Web-Desktop integration
Shared Code Base?



• Cross-platform   way of thinking helpful

• Thinkin 32/64-bit neutral code, Endian-agnostic, encoding-
 agnostic, etc.
In Essence


• Objective-C   is a must

• Know    the shared libraries: Foundation, CoreFoundation

• Sweat   the minor differences and details
Question & Answer

Mais conteúdo relacionado

Mais procurados

iOS Developer Concept introduction
iOS Developer Concept introductioniOS Developer Concept introduction
iOS Developer Concept introductionBanyapon Poolsawas
 
Building iOS App Project & Architecture
Building iOS App Project & ArchitectureBuilding iOS App Project & Architecture
Building iOS App Project & ArchitectureMassimo Oliviero
 
Beginning Real World iOS App Development
Beginning Real World iOS App DevelopmentBeginning Real World iOS App Development
Beginning Real World iOS App DevelopmentAndri Yadi
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating systemSalma Begum
 
Advantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform DevelopmentAdvantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform DevelopmentJochen Kirstätter
 
Никита Корчагин - Introduction to iOS development
Никита Корчагин - Introduction to iOS developmentНикита Корчагин - Introduction to iOS development
Никита Корчагин - Introduction to iOS developmentDataArt
 
Android Development - Session 1
Android Development - Session 1Android Development - Session 1
Android Development - Session 1Mohammad Shaker
 
I os 101:basic training rajan
I os 101:basic training   rajanI os 101:basic training   rajan
I os 101:basic training rajanPrawesh Shrestha
 
android architecture
android architectureandroid architecture
android architectureAashita Gupta
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - SeminarAkshay Sharma
 
ANDROID MOBILE OPERATING SYSTEM
ANDROID MOBILE OPERATING SYSTEMANDROID MOBILE OPERATING SYSTEM
ANDROID MOBILE OPERATING SYSTEMpreeta sinha
 
Versions of Android OS
Versions of Android OSVersions of Android OS
Versions of Android OSHaseeb
 
ppt based on android technology with great animations
ppt based on android technology with great animationsppt based on android technology with great animations
ppt based on android technology with great animationsHriday Garg
 
Android : a linux-based mobile operating system
Android : a linux-based mobile operating systemAndroid : a linux-based mobile operating system
Android : a linux-based mobile operating systemClément Escoffier
 

Mais procurados (20)

iOS Developer Concept introduction
iOS Developer Concept introductioniOS Developer Concept introduction
iOS Developer Concept introduction
 
Building iOS App Project & Architecture
Building iOS App Project & ArchitectureBuilding iOS App Project & Architecture
Building iOS App Project & Architecture
 
Beginning Real World iOS App Development
Beginning Real World iOS App DevelopmentBeginning Real World iOS App Development
Beginning Real World iOS App Development
 
basic of Java
basic of Javabasic of Java
basic of Java
 
Android architechture
Android architechtureAndroid architechture
Android architechture
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating system
 
Advantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform DevelopmentAdvantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform Development
 
Никита Корчагин - Introduction to iOS development
Никита Корчагин - Introduction to iOS developmentНикита Корчагин - Introduction to iOS development
Никита Корчагин - Introduction to iOS development
 
Android Development - Session 1
Android Development - Session 1Android Development - Session 1
Android Development - Session 1
 
I os 101:basic training rajan
I os 101:basic training   rajanI os 101:basic training   rajan
I os 101:basic training rajan
 
Android Media player
Android Media playerAndroid Media player
Android Media player
 
android architecture
android architectureandroid architecture
android architecture
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
 
ANDROID MOBILE OPERATING SYSTEM
ANDROID MOBILE OPERATING SYSTEMANDROID MOBILE OPERATING SYSTEM
ANDROID MOBILE OPERATING SYSTEM
 
Android Presentation [Final]
Android Presentation [Final]Android Presentation [Final]
Android Presentation [Final]
 
Versions of Android OS
Versions of Android OSVersions of Android OS
Versions of Android OS
 
Android ppt
Android ppt Android ppt
Android ppt
 
ppt based on android technology with great animations
ppt based on android technology with great animationsppt based on android technology with great animations
ppt based on android technology with great animations
 
Android : a linux-based mobile operating system
Android : a linux-based mobile operating systemAndroid : a linux-based mobile operating system
Android : a linux-based mobile operating system
 

Semelhante a Cocoa and Cocoa Touch Development Comparison: A Guide to Their Similarities and Differences

Yet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationYet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationNao Tokui
 
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf....NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...Karel Zikmund
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java Hitesh-Java
 
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...Codemotion
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Android Bootcamp
Android   BootcampAndroid   Bootcamp
Android Bootcampahkjsdcsadc
 
Session 01 - Introduction to Java
Session 01 - Introduction to JavaSession 01 - Introduction to Java
Session 01 - Introduction to JavaPawanMM
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2RatnaJava
 
Auto cad 2006_api_overview
Auto cad 2006_api_overviewAuto cad 2006_api_overview
Auto cad 2006_api_overviewscdhruv5
 
iPhone Development For .Net Dev
iPhone Development For .Net DeviPhone Development For .Net Dev
iPhone Development For .Net DevAlex Hung
 
Cloud Computing Introduction
Cloud Computing IntroductionCloud Computing Introduction
Cloud Computing IntroductionAdomas Svirskas
 

Semelhante a Cocoa and Cocoa Touch Development Comparison: A Guide to Their Similarities and Differences (20)

mekentosj.com - building Papers
mekentosj.com - building Papersmekentosj.com - building Papers
mekentosj.com - building Papers
 
Yet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationYet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa Communication
 
Couch Db
Couch DbCouch Db
Couch Db
 
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf....NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
 
software programs
software programssoftware programs
software programs
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Titanium Desktop Intro
Titanium Desktop IntroTitanium Desktop Intro
Titanium Desktop Intro
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Android Bootcamp
Android   BootcampAndroid   Bootcamp
Android Bootcamp
 
Cv
CvCv
Cv
 
.Net Core
.Net Core.Net Core
.Net Core
 
Session 01 - Introduction to Java
Session 01 - Introduction to JavaSession 01 - Introduction to Java
Session 01 - Introduction to Java
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2
 
Auto cad 2006_api_overview
Auto cad 2006_api_overviewAuto cad 2006_api_overview
Auto cad 2006_api_overview
 
iPhone Development For .Net Dev
iPhone Development For .Net DeviPhone Development For .Net Dev
iPhone Development For .Net Dev
 
Cloud Computing Introduction
Cloud Computing IntroductionCloud Computing Introduction
Cloud Computing Introduction
 
Ada at Barco avionics
Ada at Barco avionicsAda at Barco avionics
Ada at Barco avionics
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Cocoa and Cocoa Touch Development Comparison: A Guide to Their Similarities and Differences

  • 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
  • 4. • Cocoa and Objective-C go together • You need to know Foundation (NS.+) classes • App Store on iPhone is the disruptive technology
  • 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
  • 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
  • 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
  • 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

Notas do Editor