SlideShare a Scribd company logo
1 of 11
An Introduction
iPhone Programming
  Stewart Gleadow, Thoughtworks
Barriers to Entry

• Objective C
   •   I can’t see my code for all the square brackets


• Development Tools
   •   I survived XCode and lived to tell the tale


• Real Software?
   •   Only people that don’t know how to program write iPhone Apps?
Learning the Hard Way

• Memory Model
   •   Get your memory management right the first time


• Frameworks
   •   Don’t fight the framework


• View Lifecycles
User Interfaces

• Interface Builder

• Hand-rolled Controllers
    •   NavigationController, TabController

    •   UIViewController subclasses

    •   UIView subclasses
Testing
• Unit Testing
    •   OCUnit, GTM Test, GHUnit


• OCMock
    •   Not on the iPhone?


• Functional Testing
    •   Instruments & UIAutomation

    •   Manual Testing
iPhone Concerns

• Persistence
• Performance
• Multiple Resolutions
• Network Dropouts
Header
@class ExtraClass;

@interface SomeClass : NSObject
{
  ExtraClass *extraClass_;
}

+ (NSString *)classLevelMethod;

- (id)initWithExtraClass:(ExtraClass *)extraClass;

@property (nonatomic, retain) ExtraClass *extraClass;

@end
Implementation
#import “SomeClass.h”
#import “ExtraClass.h”

@interface SomeClass ()
@end

@implementation SomeClass

- (id)initWithExtraClass:(ExtraClass *)extraClass; {
  if (self = [super init]) {
    [self setExtraClass:extraClass];
  }
  return self;
}

-(void)dealloc; {
  [extraClass_ release];
}

@synthesize extraClass = extraClass_;

@end
Using your Class
ExtraClass *extraClass = [ExtraClass defaultExtraClass];

SomeClass *someClass =
  [[SomeClass alloc] initWithExtraClass:extraClass];

// do some stuff with your class

ExtraClass *fromAccessor = [someClass extraClass];

[someClass release];
someClass = nil;
Looking Forward

• Barriers to entry are more like hurdles
    •   Objective C is not as bad as I thought

    •   XCode 4 to save the day?


• Don’t give up on testing
Demo

More Related Content

What's hot

Angular testing
Angular testingAngular testing
Angular testingYu Jin
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinOren Rubin
 
Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015roland99
 
Java GUI Toolkits - Swing vs. SWT vs. Jambi
Java GUI Toolkits - Swing vs. SWT vs. JambiJava GUI Toolkits - Swing vs. SWT vs. Jambi
Java GUI Toolkits - Swing vs. SWT vs. JambiAndreas Schreiber
 
Introduction to AndroidMock
Introduction to AndroidMockIntroduction to AndroidMock
Introduction to AndroidMockLi-Wei Cheng
 
AspectJ Android with Example
AspectJ Android with ExampleAspectJ Android with Example
AspectJ Android with Examplefirstthumb
 
«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...Mail.ru Group
 
C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8Chris Hardy
 
Integration with swift
Integration with swiftIntegration with swift
Integration with swiftichiko_revjune
 
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tls
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tlsSpec et test agile sur mobile @airfrance #at lille & cocoaheads tls
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tlsekito
 
Italian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionItalian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionChris Hardy
 
Eclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceEclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceLuca D'Onofrio
 

What's hot (20)

Angular testing
Angular testingAngular testing
Angular testing
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
ClassJS
ClassJSClassJS
ClassJS
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubin
 
Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015Xcode 7 UI Testing - Xcake Dublin, October 2015
Xcode 7 UI Testing - Xcake Dublin, October 2015
 
Java GUI Toolkits - Swing vs. SWT vs. Jambi
Java GUI Toolkits - Swing vs. SWT vs. JambiJava GUI Toolkits - Swing vs. SWT vs. Jambi
Java GUI Toolkits - Swing vs. SWT vs. Jambi
 
AOP on Android
AOP on AndroidAOP on Android
AOP on Android
 
Introduction to AndroidMock
Introduction to AndroidMockIntroduction to AndroidMock
Introduction to AndroidMock
 
Node
NodeNode
Node
 
1.3 tools and-repl
1.3 tools and-repl1.3 tools and-repl
1.3 tools and-repl
 
AspectJ Android with Example
AspectJ Android with ExampleAspectJ Android with Example
AspectJ Android with Example
 
«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...«Управление логикой переходов между экранами приложения с помощью координатор...
«Управление логикой переходов между экранами приложения с помощью координатор...
 
C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8C# On The iPhone with MonoTouch at DDD8
C# On The iPhone with MonoTouch at DDD8
 
Integration with swift
Integration with swiftIntegration with swift
Integration with swift
 
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tls
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tlsSpec et test agile sur mobile @airfrance #at lille & cocoaheads tls
Spec et test agile sur mobile @airfrance #at lille & cocoaheads tls
 
Italian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch SessionItalian Alt.Net Conference MonoTouch Session
Italian Alt.Net Conference MonoTouch Session
 
JavaScript, qué hermoso eres
JavaScript, qué hermoso eresJavaScript, qué hermoso eres
JavaScript, qué hermoso eres
 
Eclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceEclipse Training - SWT & JFace
Eclipse Training - SWT & JFace
 
AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Swt vs swing
Swt vs swingSwt vs swing
Swt vs swing
 

Similar to Beginning iPhone Development

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
Qt test framework
Qt test frameworkQt test framework
Qt test frameworkICS
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOSPetr Dvorak
 
Kirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UIKirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UIjhugman
 
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_Compromised
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_CompromisedCansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_Compromised
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_CompromisedLiang Chen
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsPetr Dvorak
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworksTomáš Kypta
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's NewNascentDigital
 
Mobile developer is Software developer
Mobile developer is Software developerMobile developer is Software developer
Mobile developer is Software developerEugen Martynov
 
iPhone dev intro
iPhone dev introiPhone dev intro
iPhone dev introVonbo
 
Beginning to iPhone development
Beginning to iPhone developmentBeginning to iPhone development
Beginning to iPhone developmentVonbo
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
Unit testing and Android
Unit testing and AndroidUnit testing and Android
Unit testing and AndroidTomáš Kypta
 
Scott Mason: Enhancing the User Interface Using Titanium Modules
Scott Mason: Enhancing the User Interface Using Titanium ModulesScott Mason: Enhancing the User Interface Using Titanium Modules
Scott Mason: Enhancing the User Interface Using Titanium ModulesAxway Appcelerator
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
React Native: The Development Flow
React Native: The Development FlowReact Native: The Development Flow
React Native: The Development FlowRitesh Kumar
 

Similar to Beginning iPhone Development (20)

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOS
 
Kirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UIKirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UI
 
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_Compromised
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_CompromisedCansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_Compromised
Cansecwest_16_Dont_Trust_Your_Eye_Apple_Graphics_Is_Compromised
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
An Introduction to
An Introduction to An Introduction to
An Introduction to
 
Unit testing on mobile apps
Unit testing on mobile appsUnit testing on mobile apps
Unit testing on mobile apps
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's New
 
Mobile developer is Software developer
Mobile developer is Software developerMobile developer is Software developer
Mobile developer is Software developer
 
iPhone dev intro
iPhone dev introiPhone dev intro
iPhone dev intro
 
Beginning to iPhone development
Beginning to iPhone developmentBeginning to iPhone development
Beginning to iPhone development
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Unit testing and Android
Unit testing and AndroidUnit testing and Android
Unit testing and Android
 
Scott Mason: Enhancing the User Interface Using Titanium Modules
Scott Mason: Enhancing the User Interface Using Titanium ModulesScott Mason: Enhancing the User Interface Using Titanium Modules
Scott Mason: Enhancing the User Interface Using Titanium Modules
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
React Native: The Development Flow
React Native: The Development FlowReact Native: The Development Flow
React Native: The Development Flow
 

More from sgleadow

Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9sgleadow
 
Evolving for Multiple Screens
Evolving for Multiple ScreensEvolving for Multiple Screens
Evolving for Multiple Screenssgleadow
 
Mobile: more than just an app
Mobile: more than just an appMobile: more than just an app
Mobile: more than just an appsgleadow
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architecturessgleadow
 
Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to marketsgleadow
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testingsgleadow
 
iOS app case study
iOS app case studyiOS app case study
iOS app case studysgleadow
 
iOS View Coordinators
iOS View CoordinatorsiOS View Coordinators
iOS View Coordinatorssgleadow
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testingsgleadow
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transportsgleadow
 
A few design patterns
A few design patternsA few design patterns
A few design patternssgleadow
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programmingsgleadow
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patternssgleadow
 

More from sgleadow (14)

Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9
 
Evolving for Multiple Screens
Evolving for Multiple ScreensEvolving for Multiple Screens
Evolving for Multiple Screens
 
Mobile: more than just an app
Mobile: more than just an appMobile: more than just an app
Mobile: more than just an app
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
 
Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to market
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testing
 
iOS app case study
iOS app case studyiOS app case study
iOS app case study
 
Agile iOS
Agile iOSAgile iOS
Agile iOS
 
iOS View Coordinators
iOS View CoordinatorsiOS View Coordinators
iOS View Coordinators
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testing
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transport
 
A few design patterns
A few design patternsA few design patterns
A few design patterns
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programming
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patterns
 

Recently uploaded

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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Recently uploaded (20)

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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Beginning iPhone Development

  • 1. An Introduction iPhone Programming Stewart Gleadow, Thoughtworks
  • 2. Barriers to Entry • Objective C • I can’t see my code for all the square brackets • Development Tools • I survived XCode and lived to tell the tale • Real Software? • Only people that don’t know how to program write iPhone Apps?
  • 3. Learning the Hard Way • Memory Model • Get your memory management right the first time • Frameworks • Don’t fight the framework • View Lifecycles
  • 4. User Interfaces • Interface Builder • Hand-rolled Controllers • NavigationController, TabController • UIViewController subclasses • UIView subclasses
  • 5. Testing • Unit Testing • OCUnit, GTM Test, GHUnit • OCMock • Not on the iPhone? • Functional Testing • Instruments & UIAutomation • Manual Testing
  • 6. iPhone Concerns • Persistence • Performance • Multiple Resolutions • Network Dropouts
  • 7. Header @class ExtraClass; @interface SomeClass : NSObject { ExtraClass *extraClass_; } + (NSString *)classLevelMethod; - (id)initWithExtraClass:(ExtraClass *)extraClass; @property (nonatomic, retain) ExtraClass *extraClass; @end
  • 8. Implementation #import “SomeClass.h” #import “ExtraClass.h” @interface SomeClass () @end @implementation SomeClass - (id)initWithExtraClass:(ExtraClass *)extraClass; { if (self = [super init]) { [self setExtraClass:extraClass]; } return self; } -(void)dealloc; { [extraClass_ release]; } @synthesize extraClass = extraClass_; @end
  • 9. Using your Class ExtraClass *extraClass = [ExtraClass defaultExtraClass]; SomeClass *someClass = [[SomeClass alloc] initWithExtraClass:extraClass]; // do some stuff with your class ExtraClass *fromAccessor = [someClass extraClass]; [someClass release]; someClass = nil;
  • 10. Looking Forward • Barriers to entry are more like hurdles • Objective C is not as bad as I thought • XCode 4 to save the day? • Don’t give up on testing
  • 11. Demo

Editor's Notes

  1. \n
  2. - Barriers to entry:\nObjective C: not a pretty language, message passing, small talk\n- semi-dynamic (responds to, contexts, monkey patching)\n- header files & properties\nDevelopment Tools: developers are second class citizens, testing difficult, TDD/Agile, refactoring\n- get to know the tools\nHobby only: reflected in developer tools, not going for corporate market, no pressure to learn it\n
  3. - Objective C 2 autorelease pool (now available on iPhone)\n- memory leaks are much easier to avoid than they are to track down\n- follow conventions for autorelease/retain\n- frameworks: UIKit, CoreGraphics, CoreAnimation, CoreData, Three20/Facebook\n- view lifecycles: - when views are created and destroyed\n- low memory conditions\n- make sure your delegates are still there\n
  4. IB - drag and drop\n - probably ok if you’re using the framework exactly as intended\nhand-roller controllers\n- safer option if you want control\n
  5. OCUnit, GTM Test (Google Toolbox for Mac)\nGHUnit - can be used with both testing frameworks\n- run unit tests on the device\nOCMock - instance methods only, swizzle for static methods\nInstruments - with XCode 3.2.3 or so, iPad version (on device in iPhone 4)\nUIAutomation - Javascript hooks, device or phone, Jasmine (RSpec/ScrewUnit-like)\nManual Tests - document reproducible steps (Gherkin-like syntax)\n
  6. Really for any mobile platform\nPersistence - application lifecycle (multitasking without multitasking)\n- good for users, bad for developers\n- needs to keep track of your state all the time\nPerformance - multiple devices to test on\n- must do device testing (simulator has a lot more resources)\nResolutions - \nDropouts - anyc requests, what to do?\n
  7. forward class definition\ntrailing underscore to not clash with frameworks\n+ for class level methods, - for instance level\n\nnonatomic guarantees the whole value is received or set, not thread safety\nOther Property Types:\ncopy - when mutable subclasses\nassign - for primitive types, and delegates\n
  8. import - like include with a #ifdef guard for multiple inclusion\nprivate parts in “anonymous” categories, no extra attributes\n(doesn’t mean people can’t use the private methods)\nanonymous vs named categories\n; on methods so the same as header, for copy and paste (not here)\nsuper - needs to be called (returns self, does not set it, so assign)\nuse properties with messaging not . syntax so not confused with C structs\n
  9. Call class method on extra class, convention means this is autoreleased\n- anything that wants to keep it needs to call retain, or it will get cleaned up\nrelease any objects that are\nnil - can pass it messages, it just does nothing (clean and readable not equivalent)\n
  10. Objective C is not too bad\n- long lines, lots of brackets, after a while see bbrh\n- code actually reads quite nicely\nXCode 4 looks a lot better\nTesting - don’t revert back to old habits\n- new platform, don’t know use in advance, test after?\n
  11. \n