More Related Content Similar to iPhone Development For .Net Dev (20) iPhone Development For .Net Dev1. Mobile ‘i’ for the .NET Guy
iPhone development for .NET developer
Tuesday May 5th, 2009
© ThoughtWorks 2009
2. Agenda
• Introduction
• What do you need?
• Comparisons
• Code Demo
• Pleasure & Pain
• MIA
• Why?
• Open discussion
© ThoughtWorks 2009
3. Introduction
• .NET developer since 2004 (WinForms, WebForms,
ASP.NET MVC)
• C/C++ before that
• iPhone development since SDK beta 1
© ThoughtWorks 2009
4. What do you need?
Hardware
• Mac
• Mini - $599
• iMac - $1199
• MacBook - $1299
• MacBook Pro - $1999
• iPod Touch - $229 (8GB)
• iPhone 3G
• $199 (8GB + 2yr contract)
• $599 (8GB + no contract)
© ThoughtWorks 2009
5. What do you need?
Software
• iPhone SDK (require registration but free to download)
• iPhone Developer Program
• Personal - $99 (ad-hoc deploy to hardware, submit to AppStore)
• Enterprise - $299 (Personal + in-house deployment)
© ThoughtWorks 2009
6. What do you need?
Books
• The iPhone Developer Cookbook
• Beginning iPhone Development
• Beginning Xcode
• Programming in Objective-C 2.0
© ThoughtWorks 2009
7. What do you need?
Optional
Mockup Software
– Balsamiq (http://www.balsamiq.com/)
– iPhone Mockup (http://iphonemockup.lkmc.ch/)
Bucket loads of patience!
© ThoughtWorks 2009
8. Language Comparison
Objective-C C#
Square Brackets + Dot notation Dot notation
self.currentPostion = 0.5; this.currentPosition = 0.5;
[foodoStuffWith:bar]; foo.DoStuff(bar);
Named Parameter Object/Collection Initializer in C# 3.0
[foodoStuffWith:bar atPosition:4]; Named Parameter in C# 4.0
new foo(bar = “ISO”, position = 4);
Message Passing Method Invocation
Category Extension Method
Protocol/Interface Interface/Class
Class/Method prefix Namespace
C based (header file, pointers) Inline declaration, no pointer
Manual Memory Management (in iPhone) GC
NSString *foo = [NSStringalloc];
[foo release];
© ThoughtWorks 2009
9. IDE Comparison
quot;What is Xcode? It starts as a great source code editor...” and
quot;... and also has a nice debugger”
- Scott Forstall, Senior VP of iPhone Software
© ThoughtWorks 2009
10. IDE Comparison
Xcode 3.1 Visual Studio 2008
Text Editor
Refactoring
UI Design
Debugging
Profiling
Localization
© ThoughtWorks 2009
12. Pleasure
• MVC architecture
• SDK’s API
o Hit the 80/20 rules
o Convention over Configuration
Settings bundle
Application icon
© JesperRønn-Jensen
• Simulator
o Work exactly as the real phone
o Except bandwidth, CPU (audio/video), interruptions
© ThoughtWorks 2009
13. Pleasure – cont’d
• Objective-C language features
o Dynamic
o Named parameters
o Categories
o Properties & @synthesize
o C-based. Lots of libraries available (e.g. libxml)
© ThoughtWorks 2009
14. Pain
• Xcode IDE
o CodeSense is not that smart
o Keyboard shortcuts are strange
o Take a while to re-train muscle memory
• Interface Builder © deeleea
o Good for simple UI, not so for complext UI
o Can’t do everything (UITabController and UINavigationController don’t
mix well)
• Objective-C syntax
o [foodoBar] – having to type the square brackets get old very quickly
o Header files – What’s this, the 90’s?
© ThoughtWorks 2009
15. Pain – cont’d
• Memory management
o Constraint environment
o No GC
o Have to remember to release object manually
• Debugging
o Do I really care about register address?
o Erratic behavior
• Unit testing framework
o OCUnit/Google Toolbox for mac
o OCMock
© ThoughtWorks 2009
16. Pain – cont’d
• Deployment
o Require code signing
o Opaque approval process
o Small(er) developer community
o StackOverflow
o Google’s your friend!
© ThoughtWorks 2009
17. MIA/WIP
• DI/IoC container
• OR/M
– Partly solved by SqlitePersistanceObjects (Google Code)
• Build Framework
– Use scripts (Rake, shell script)
© ThoughtWorks 2009
18. Why learn something so different?
• Diversify skills
• Expansive API
– A/V
– Graphics/Animation
– Game/Peer to Peer (in 3.0)
– Maps (in 3.0)
• On most CTOs’ radar
• iTuneAppStore
– Broad reach
– Easy to start
© ThoughtWorks 2009
19. Open Discussion ahung@thoughtworks.com
Twitter: AlexHung
http://alexhung.vox.com
Questions?
RubyCocoa
Mono
Feedback
© ThoughtWorks 2009