SlideShare a Scribd company logo
1 of 23
Download to read offline
Bootstrapping iPhone Development


Munjal Budhabhatti
Senior Consultant
Sep/24/2009
San Antonio
Agenda

!!Current state of iPhone Development
!!Fast track to Objective – C
!!Fast track to XCode and Interface Builder
!!Getting productive using OR-Framework, Testing,
  Serialization
Current state of iPhone Development
•!   Requirements
      –! Intel based Mac with OSX 10.5
      –! iPhone SDK (Sign-up for iPhone Developer Program $99 for a year)
      –! Do NOT need iPhone or iPod Touch (Work on iPhone Simulator)

•!   Developer Resources
      http://developer.apple.com/iphone
      http://devforums.apple.com
      http://cs193p.stanford.edu
Fast track to Objective – C


•!   Object oriented programming language to write Applications for
     iPhone and Mac OS

•!   Powerful set of extensions to the standard ANSI C language
      –! Object oriented
      –! Dynamic (Adds Smalltalk-style or Ruby-style messaging)

•!   You manage your memory – Probably a good thing in mobile devices
Objective – C Syntax

•!   Objective – C is a strict superset thin layer on top of ANSI C

•!   Compile any ANSI C program with Objective – C compiler

•!   Object syntax derived from Smalltalk

•!   Non object oriented syntax identical to C

•!   A bit clumsy syntax. Can get lost in the woods. Do NOT let the syntax
     defeat you.
Coding in Objective – C

•!   Classes are developed using a header and an implementation.

•!   Names and types of instance variables and method signature in
     header file. Implement methods in implementation file
                 Interface                                Implementation
      @interface classname : superclassname {   @implementation classname
           //instance variables                   + classMethod1 {
      }                                         }
           +classMethod1;                         + (returnType) classMethod2 {
           +(returnType) classMethod2;          }
           -instanceMethod1;                      - instanceMethod1 {
           -(returnType) instanceMethod2;       }
      @end                                        - (returnType) instanceMethod2 {
                                                }
Messages (Methods) in Objective – C

•!   Java and C# implements Simula-style programming model: a method
     is bound to section of code in a compiler

•!   Objective – C is based on sending messages to object instances.
     Message is simply a name, resolved at runtime by the receiving object.

•!   fullName = [firstName stringByAppendingString: lastName]

•!   No type-checking. If the object cannot respond to a message it simply
     ignores it. No NULL checking!! Yay!!
Static and Dynamic Typing Objective – C


•!   Static typing using NSObject – the mother of almost all objects. You
     can have objects that don’t derive from NSObject.

•!   Dynamic typing using id

      –! Sending messages to Nil is OK

      –! Dynamic objection creation: objc_getClass, class_createInstance,
        class_getInstanceMethod, class_getInstanceVariable

      –! TypeIntrospection : isMemberOfClass & isKindOfClass
Invocation and Memory Management in Objective – C




•!   Memory management possible using Garbage collector for Mac OS

•!   You manage your memory for iPhone OS

•!   LeanManager *ronCampbell = [[LeanManager alloc] init];
Protocols in Objective – C

•!   Supports multiple-inheritance of specification

•!   Similar to Interface in C# and Java. However, the methods could be
     optional.

•!   Used to declare methods that could be implemented by any class

•!   Used to declare interface to an object while concealing its class

•!   Used to capture similarities among classes that are not in hierarchy
Protocol Example in Objective – C


   @protocol Serialization   @interface AccountImage : Image <Serialization>
    - (void) serialize;       - (void) serialize;
    - (void) deserialize;     - (void) deserialize;
   @end                      @end
Forwarding in Objective – C


•!   Dynamic nature of Objective C allows forwarding of messages

•!   If an object doesn’t respond to a message, it can forward to one that
     probably could.

•!   Similar to method_missing in Ruby

•!   ages = [persons age]
Category in Objective – C

•!   A category allows you to add methods to an existing class – even for
     ones that you don’t own or have the source code

•!   Allows to extend the functionality without subclassing

•!   Split the implementation of your class between several files

•!   Caveat: Cannot create new instance variable in a class
Fast track to Interface Builder


•!   App for iPhone devs to create GUI

•!   Typical MVC pattern. Write models and controllers in Xcode. Build
     interface in Interface Builder

•!   One could build interface using code. However, I would advise to bear
     the pain once and learn using Interface Builder with Xcode.

•!   Nib file and the magic
Fast Track to OR-framework such as Active Record




•!   Beautify your models

      –! Will you make raw SQL calls ?

•!   Start using ObjectPersistentFramework
Fast track to Testing




•!   Test using GoogleToolbox

•!   Mock using OCMock

•!   Serialization using JSON framework for iPhone
iPhone development fundamentals


•!   Cocoa Touch – Framework to develop touchscreen applications: UI
     elements, event dispatching, application lifecycle

•!   Media – Graphics, animations, sound, video

•!   Core Services – Collections, Strings, Location, SQLLite, Networking

•!   Core OS Layer – Standard IO/, Power Management
main() method

•!   Java/C# developers look for “main()” method

•!   NSApplication provides the central framwork for app execution

•!   Every app creates one instance of NSApplication in main()

•!   After NSApplication creation, load the Nib file and start event loop

•!   Nib file loads the UI

•!   applicationDidFinishLauching() method called when app is launched
View Controllers
•!   Model View Controller Pattern

•!   Each view in an iPhone app is managed by UIViewController

•!   Mother of all view classes

•!   Importance of IBAction and IBOutlet

•!   IBAction: editButtonClicked()
•!   IBOutlet: UILabel
Table View Controller


•!   Define and populate NSMutableArray in initWithCoder

•!   Implement numberOfRowsInSection protocol for tabelView

•!   Implement cellForRowAtIndexPath

•!   Improve performance by reusing cells
Navigation Controller

•!   Mail app is the best way to understand navigation controller

•!   Navigation controller maintains stack of view controllers

•!   Each controller represents one node in hierarchy

•!   Typical push and pop to manage controllers

•!   [self.navigationController pushViewController: self.ctr animate:YES]

•!   [self.navigationController popViewControllerAnimate: YES];
File I/O



•!   Your appliction is Sandboxed. Cannot access data from other apps

•!   Documents directory

•!   Tmp directory
Bootstrapping iPhone Development

More Related Content

What's hot

C++ to java
C++ to javaC++ to java
C++ to javaAjmal Ak
 
How to really obfuscate your pdf malware
How to really obfuscate your pdf malwareHow to really obfuscate your pdf malware
How to really obfuscate your pdf malwarezynamics GmbH
 
Rootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift ApplicationsRootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift Applicationseightbit
 
Wahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash CourseWahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash Courseeightbit
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageSwift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageHossam Ghareeb
 
Introduction to mobile reversing
Introduction to mobile reversingIntroduction to mobile reversing
Introduction to mobile reversingjduart
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into JavaTom Johnson
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
Basic online java course - Brainsmartlabs
Basic online java course  - BrainsmartlabsBasic online java course  - Brainsmartlabs
Basic online java course - Brainsmartlabsbrainsmartlabsedu
 

What's hot (20)

C++ to java
C++ to javaC++ to java
C++ to java
 
Tutorial c#
Tutorial c#Tutorial c#
Tutorial c#
 
How to really obfuscate your pdf malware
How to really obfuscate your pdf malwareHow to really obfuscate your pdf malware
How to really obfuscate your pdf malware
 
C#
C#C#
C#
 
Rootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift ApplicationsRootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift Applications
 
Java notes
Java notesJava notes
Java notes
 
C sharp
C sharpC sharp
C sharp
 
C#.NET
C#.NETC#.NET
C#.NET
 
Wahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash CourseWahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash Course
 
Swift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming languageSwift Tutorial Part 2. The complete guide for Swift programming language
Swift Tutorial Part 2. The complete guide for Swift programming language
 
Introduction to mobile reversing
Introduction to mobile reversingIntroduction to mobile reversing
Introduction to mobile reversing
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Core Java
Core JavaCore Java
Core Java
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
core java
core javacore java
core java
 
Basic online java course - Brainsmartlabs
Basic online java course  - BrainsmartlabsBasic online java course  - Brainsmartlabs
Basic online java course - Brainsmartlabs
 

Viewers also liked

01 introduction
01 introduction01 introduction
01 introductionrakesyh
 
Mume JQueryMobile Intro
Mume JQueryMobile IntroMume JQueryMobile Intro
Mume JQueryMobile IntroGonzalo Parra
 
iOS Development Introduction
iOS Development IntroductioniOS Development Introduction
iOS Development IntroductionGonzalo Parra
 

Viewers also liked (6)

Mobile development
Mobile developmentMobile development
Mobile development
 
01 introduction
01 introduction01 introduction
01 introduction
 
Mume JQueryMobile Intro
Mume JQueryMobile IntroMume JQueryMobile Intro
Mume JQueryMobile Intro
 
More! @ ED-MEDIA
More! @ ED-MEDIAMore! @ ED-MEDIA
More! @ ED-MEDIA
 
Mume HTML5 Intro
Mume HTML5 IntroMume HTML5 Intro
Mume HTML5 Intro
 
iOS Development Introduction
iOS Development IntroductioniOS Development Introduction
iOS Development Introduction
 

Similar to Bootstrapping iPhone Development

Objective-c for Java Developers
Objective-c for Java DevelopersObjective-c for Java Developers
Objective-c for Java DevelopersMuhammad Abdullah
 
Intro to Objective C
Intro to Objective CIntro to Objective C
Intro to Objective CAshiq Uz Zoha
 
Никита Корчагин - Programming Apple iOS with Objective-C
Никита Корчагин - Programming Apple iOS with Objective-CНикита Корчагин - Programming Apple iOS with Objective-C
Никита Корчагин - Programming Apple iOS with Objective-CDataArt
 
Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkAndreas Korth
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introductionSireesh K
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentationjuliasceasor
 
ASP.NET Session 3
ASP.NET Session 3ASP.NET Session 3
ASP.NET Session 3Sisir Ghosh
 
Image Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadImage Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadOge Marques
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyondrsebbe
 
introduction to c #
introduction to c #introduction to c #
introduction to c #Sireesh K
 
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptxGauravGamer2
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!Alessandro Giorgetti
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony IngraldiTony Ingraldi
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for seleniumapoorvams
 

Similar to Bootstrapping iPhone Development (20)

Objective-c for Java Developers
Objective-c for Java DevelopersObjective-c for Java Developers
Objective-c for Java Developers
 
Intro to Objective C
Intro to Objective CIntro to Objective C
Intro to Objective C
 
Никита Корчагин - Programming Apple iOS with Objective-C
Никита Корчагин - Programming Apple iOS with Objective-CНикита Корчагин - Programming Apple iOS with Objective-C
Никита Корчагин - Programming Apple iOS with Objective-C
 
Ios development
Ios developmentIos development
Ios development
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application Framework
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introduction
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
 
ASP.NET Session 3
ASP.NET Session 3ASP.NET Session 3
ASP.NET Session 3
 
Image Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPadImage Processing and Computer Vision in iPhone and iPad
Image Processing and Computer Vision in iPhone and iPad
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Intro to .NET and Core C#
Intro to .NET and Core C#Intro to .NET and Core C#
Intro to .NET and Core C#
 
C# Fundamental
C# FundamentalC# Fundamental
C# Fundamental
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 
introduction to c #
introduction to c #introduction to c #
introduction to c #
 
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
2R-3KS03-OOP_UNIT-I (Part-A)_2023-24.pptx
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony Ingraldi
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 

More from ThoughtWorks

Online and Publishing casestudies
Online and Publishing casestudiesOnline and Publishing casestudies
Online and Publishing casestudiesThoughtWorks
 
Insurecom Case Study
Insurecom Case StudyInsurecom Case Study
Insurecom Case StudyThoughtWorks
 
Grameen Case Study
Grameen Case StudyGrameen Case Study
Grameen Case StudyThoughtWorks
 
Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesThoughtWorks
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in RubyThoughtWorks
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in RubyThoughtWorks
 
Lets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiLets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiThoughtWorks
 
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank... Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...ThoughtWorks
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices ThoughtWorks
 
Present and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniPresent and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniThoughtWorks
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThoughtWorks
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - MatzThoughtWorks
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimThoughtWorks
 
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SProject Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SThoughtWorks
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta ThoughtWorks
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew ThoughtWorks
 
HadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkHadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkThoughtWorks
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith RubyThoughtWorks
 

More from ThoughtWorks (20)

Online and Publishing casestudies
Online and Publishing casestudiesOnline and Publishing casestudies
Online and Publishing casestudies
 
Insurecom Case Study
Insurecom Case StudyInsurecom Case Study
Insurecom Case Study
 
Grameen Case Study
Grameen Case StudyGrameen Case Study
Grameen Case Study
 
BFSI Case Sudies
BFSI Case SudiesBFSI Case Sudies
BFSI Case Sudies
 
Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific Languages
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Lets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiLets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagi
 
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank... Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
 
Present and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniPresent and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola bini
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj Kumar
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - Matz
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. Lim
 
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SProject Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G S
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew
 
HadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkHadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software Framework
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
 
Cloud Computing
Cloud  ComputingCloud  Computing
Cloud Computing
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
[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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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...
 
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...
 
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...
 
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
 
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
 
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
 
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)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 

Bootstrapping iPhone Development

  • 1. Bootstrapping iPhone Development Munjal Budhabhatti Senior Consultant Sep/24/2009 San Antonio
  • 2. Agenda !!Current state of iPhone Development !!Fast track to Objective – C !!Fast track to XCode and Interface Builder !!Getting productive using OR-Framework, Testing, Serialization
  • 3. Current state of iPhone Development •! Requirements –! Intel based Mac with OSX 10.5 –! iPhone SDK (Sign-up for iPhone Developer Program $99 for a year) –! Do NOT need iPhone or iPod Touch (Work on iPhone Simulator) •! Developer Resources http://developer.apple.com/iphone http://devforums.apple.com http://cs193p.stanford.edu
  • 4. Fast track to Objective – C •! Object oriented programming language to write Applications for iPhone and Mac OS •! Powerful set of extensions to the standard ANSI C language –! Object oriented –! Dynamic (Adds Smalltalk-style or Ruby-style messaging) •! You manage your memory – Probably a good thing in mobile devices
  • 5. Objective – C Syntax •! Objective – C is a strict superset thin layer on top of ANSI C •! Compile any ANSI C program with Objective – C compiler •! Object syntax derived from Smalltalk •! Non object oriented syntax identical to C •! A bit clumsy syntax. Can get lost in the woods. Do NOT let the syntax defeat you.
  • 6. Coding in Objective – C •! Classes are developed using a header and an implementation. •! Names and types of instance variables and method signature in header file. Implement methods in implementation file Interface Implementation @interface classname : superclassname { @implementation classname //instance variables + classMethod1 { } } +classMethod1; + (returnType) classMethod2 { +(returnType) classMethod2; } -instanceMethod1; - instanceMethod1 { -(returnType) instanceMethod2; } @end - (returnType) instanceMethod2 { }
  • 7. Messages (Methods) in Objective – C •! Java and C# implements Simula-style programming model: a method is bound to section of code in a compiler •! Objective – C is based on sending messages to object instances. Message is simply a name, resolved at runtime by the receiving object. •! fullName = [firstName stringByAppendingString: lastName] •! No type-checking. If the object cannot respond to a message it simply ignores it. No NULL checking!! Yay!!
  • 8. Static and Dynamic Typing Objective – C •! Static typing using NSObject – the mother of almost all objects. You can have objects that don’t derive from NSObject. •! Dynamic typing using id –! Sending messages to Nil is OK –! Dynamic objection creation: objc_getClass, class_createInstance, class_getInstanceMethod, class_getInstanceVariable –! TypeIntrospection : isMemberOfClass & isKindOfClass
  • 9. Invocation and Memory Management in Objective – C •! Memory management possible using Garbage collector for Mac OS •! You manage your memory for iPhone OS •! LeanManager *ronCampbell = [[LeanManager alloc] init];
  • 10. Protocols in Objective – C •! Supports multiple-inheritance of specification •! Similar to Interface in C# and Java. However, the methods could be optional. •! Used to declare methods that could be implemented by any class •! Used to declare interface to an object while concealing its class •! Used to capture similarities among classes that are not in hierarchy
  • 11. Protocol Example in Objective – C @protocol Serialization @interface AccountImage : Image <Serialization> - (void) serialize; - (void) serialize; - (void) deserialize; - (void) deserialize; @end @end
  • 12. Forwarding in Objective – C •! Dynamic nature of Objective C allows forwarding of messages •! If an object doesn’t respond to a message, it can forward to one that probably could. •! Similar to method_missing in Ruby •! ages = [persons age]
  • 13. Category in Objective – C •! A category allows you to add methods to an existing class – even for ones that you don’t own or have the source code •! Allows to extend the functionality without subclassing •! Split the implementation of your class between several files •! Caveat: Cannot create new instance variable in a class
  • 14. Fast track to Interface Builder •! App for iPhone devs to create GUI •! Typical MVC pattern. Write models and controllers in Xcode. Build interface in Interface Builder •! One could build interface using code. However, I would advise to bear the pain once and learn using Interface Builder with Xcode. •! Nib file and the magic
  • 15. Fast Track to OR-framework such as Active Record •! Beautify your models –! Will you make raw SQL calls ? •! Start using ObjectPersistentFramework
  • 16. Fast track to Testing •! Test using GoogleToolbox •! Mock using OCMock •! Serialization using JSON framework for iPhone
  • 17. iPhone development fundamentals •! Cocoa Touch – Framework to develop touchscreen applications: UI elements, event dispatching, application lifecycle •! Media – Graphics, animations, sound, video •! Core Services – Collections, Strings, Location, SQLLite, Networking •! Core OS Layer – Standard IO/, Power Management
  • 18. main() method •! Java/C# developers look for “main()” method •! NSApplication provides the central framwork for app execution •! Every app creates one instance of NSApplication in main() •! After NSApplication creation, load the Nib file and start event loop •! Nib file loads the UI •! applicationDidFinishLauching() method called when app is launched
  • 19. View Controllers •! Model View Controller Pattern •! Each view in an iPhone app is managed by UIViewController •! Mother of all view classes •! Importance of IBAction and IBOutlet •! IBAction: editButtonClicked() •! IBOutlet: UILabel
  • 20. Table View Controller •! Define and populate NSMutableArray in initWithCoder •! Implement numberOfRowsInSection protocol for tabelView •! Implement cellForRowAtIndexPath •! Improve performance by reusing cells
  • 21. Navigation Controller •! Mail app is the best way to understand navigation controller •! Navigation controller maintains stack of view controllers •! Each controller represents one node in hierarchy •! Typical push and pop to manage controllers •! [self.navigationController pushViewController: self.ctr animate:YES] •! [self.navigationController popViewControllerAnimate: YES];
  • 22. File I/O •! Your appliction is Sandboxed. Cannot access data from other apps •! Documents directory •! Tmp directory