SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
An Introduction
                          iPhone Programming
                            Stewart Gleadow, Thoughtworks




Thursday, 5 August 2010
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?




Thursday, 5 August 2010
Learning the Hard Way

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


                    • Frameworks
                          •   Don’t fight the framework


                    • View Lifecycles

Thursday, 5 August 2010
User Interfaces

                    • Interface Builder

                    • Hand-rolled Controllers
                          •   NavigationController, TabController

                          •   UIViewController subclasses

                          •   UIView subclasses




Thursday, 5 August 2010
Testing
                    • Unit Testing
                          •   OCUnit, GTM Test, GHUnit


                    • OCMock
                          •   Not on the iPhone?


                    • Functional Testing
                          •   Instruments & UIAutomation

                          •   Manual Testing




Thursday, 5 August 2010
iPhone Concerns

                    • Persistence
                    • Performance
                    • Multiple Resolutions
                    • Network Dropouts

Thursday, 5 August 2010
Header
                @class ExtraClass;

                @interface SomeClass : NSObject
                {
                  ExtraClass *extraClass_;
                }

                + (NSString *)classLevelMethod;

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

                @property (nonatomic, retain) ExtraClass *extraClass;

                @end




Thursday, 5 August 2010
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
Thursday, 5 August 2010
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;




Thursday, 5 August 2010
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


Thursday, 5 August 2010
Demo



Thursday, 5 August 2010

Mais conteúdo relacionado

Semelhante a An Introduction to

Beginning iPhone Development
Beginning iPhone DevelopmentBeginning iPhone Development
Beginning iPhone Developmentsgleadow
 
Qt test framework
Qt test frameworkQt test framework
Qt test frameworkICS
 
Fxug@北陸in富山 - Flex Unit4Beta1+α -
Fxug@北陸in富山 - Flex Unit4Beta1+α -Fxug@北陸in富山 - Flex Unit4Beta1+α -
Fxug@北陸in富山 - Flex Unit4Beta1+α -Yasuhiro Morikawa
 
Lecture 10 slides (february 4, 2010)
Lecture 10 slides (february 4, 2010)Lecture 10 slides (february 4, 2010)
Lecture 10 slides (february 4, 2010)Bruce Lee
 
iOS 2 - The practical Stuff
iOS 2 - The practical StuffiOS 2 - The practical Stuff
iOS 2 - The practical StuffPetr Dvorak
 
PHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An IntroductionPHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An Introductionalexmace
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOSPetr Dvorak
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google MockICS
 
Introduction to Robotium
Introduction to RobotiumIntroduction to Robotium
Introduction to Robotiumalii abbb
 
Frederick web meetup slides
Frederick web meetup slidesFrederick web meetup slides
Frederick web meetup slidesPat Zearfoss
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"Stephen Donner
 
Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Jay Friendly
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And TechniquesJordan Baker
 
Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not JavaChris Adamson
 

Semelhante a An Introduction to (20)

Beginning iPhone Development
Beginning iPhone DevelopmentBeginning iPhone Development
Beginning iPhone Development
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
 
Fxug@北陸in富山 - Flex Unit4Beta1+α -
Fxug@北陸in富山 - Flex Unit4Beta1+α -Fxug@北陸in富山 - Flex Unit4Beta1+α -
Fxug@北陸in富山 - Flex Unit4Beta1+α -
 
Lecture 10 slides (february 4, 2010)
Lecture 10 slides (february 4, 2010)Lecture 10 slides (february 4, 2010)
Lecture 10 slides (february 4, 2010)
 
iOS 2 - The practical Stuff
iOS 2 - The practical StuffiOS 2 - The practical Stuff
iOS 2 - The practical Stuff
 
FreshAir2008
FreshAir2008FreshAir2008
FreshAir2008
 
FreshAir2008
FreshAir2008FreshAir2008
FreshAir2008
 
PHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An IntroductionPHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An Introduction
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOS
 
Fwt ios 5
Fwt ios 5Fwt ios 5
Fwt ios 5
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
 
Introduction to Robotium
Introduction to RobotiumIntroduction to Robotium
Introduction to Robotium
 
Frederick web meetup slides
Frederick web meetup slidesFrederick web meetup slides
Frederick web meetup slides
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Junit
JunitJunit
Junit
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"
 
Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Automated php unit testing in drupal 8
Automated php unit testing in drupal 8
 
Unit testing on mobile apps
Unit testing on mobile appsUnit testing on mobile apps
Unit testing on mobile apps
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And Techniques
 
Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not Java
 

Mais de melbournepatterns (20)

State Pattern from GoF
State Pattern from GoFState Pattern from GoF
State Pattern from GoF
 
Iterator Pattern
Iterator PatternIterator Pattern
Iterator Pattern
 
Iterator
IteratorIterator
Iterator
 
Concurrency Patterns
Concurrency PatternsConcurrency Patterns
Concurrency Patterns
 
Continuous Integration, Fast Builds and Flot
Continuous Integration, Fast Builds and FlotContinuous Integration, Fast Builds and Flot
Continuous Integration, Fast Builds and Flot
 
Code Contracts API In .Net
Code Contracts API In .NetCode Contracts API In .Net
Code Contracts API In .Net
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
Gpu Cuda
Gpu CudaGpu Cuda
Gpu Cuda
 
Facade Pattern
Facade PatternFacade Pattern
Facade Pattern
 
Phani Kumar - Decorator Pattern
Phani Kumar - Decorator PatternPhani Kumar - Decorator Pattern
Phani Kumar - Decorator Pattern
 
Composite Pattern
Composite PatternComposite Pattern
Composite Pattern
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Prototype Design Pattern
Prototype Design PatternPrototype Design Pattern
Prototype Design Pattern
 
Factory Method Design Pattern
Factory Method Design PatternFactory Method Design Pattern
Factory Method Design Pattern
 
Abstract Factory Design Pattern
Abstract Factory Design PatternAbstract Factory Design Pattern
Abstract Factory Design Pattern
 
A Little Lisp
A Little LispA Little Lisp
A Little Lisp
 
State Pattern in Flex
State Pattern in FlexState Pattern in Flex
State Pattern in Flex
 
Active Object
Active ObjectActive Object
Active Object
 
Extract Composite Talk Andy
Extract Composite Talk AndyExtract Composite Talk Andy
Extract Composite Talk Andy
 
Selenium Interpreter
Selenium InterpreterSelenium Interpreter
Selenium Interpreter
 

An Introduction to

  • 1. An Introduction iPhone Programming Stewart Gleadow, Thoughtworks Thursday, 5 August 2010
  • 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? Thursday, 5 August 2010
  • 3. Learning the Hard Way • Memory Model • Get your memory management right the first time • Frameworks • Don’t fight the framework • View Lifecycles Thursday, 5 August 2010
  • 4. User Interfaces • Interface Builder • Hand-rolled Controllers • NavigationController, TabController • UIViewController subclasses • UIView subclasses Thursday, 5 August 2010
  • 5. Testing • Unit Testing • OCUnit, GTM Test, GHUnit • OCMock • Not on the iPhone? • Functional Testing • Instruments & UIAutomation • Manual Testing Thursday, 5 August 2010
  • 6. iPhone Concerns • Persistence • Performance • Multiple Resolutions • Network Dropouts Thursday, 5 August 2010
  • 7. Header @class ExtraClass; @interface SomeClass : NSObject { ExtraClass *extraClass_; } + (NSString *)classLevelMethod; - (id)initWithExtraClass:(ExtraClass *)extraClass; @property (nonatomic, retain) ExtraClass *extraClass; @end Thursday, 5 August 2010
  • 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 Thursday, 5 August 2010
  • 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; Thursday, 5 August 2010
  • 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 Thursday, 5 August 2010