Your SlideShare is downloading. ×
0
Objective-C and iOSfor .NET Developers<br />Eduardo Scoz<br />Chicago ALT.NET<br />Sept 2011<br />
Me<br /><ul><li>Software Architect at
.NET Developer for 5-6 years
iOS Developer for the last 2 years
Obj-C exclusively for 4 months
http://escoz.com
http://twitter.com/escoz</li></li></ul><li>iOSDev 101<br />What you need:<br />A Mac<br />Register with Apple Dev Center -...
So, what is it like?<br />After 6 months<br />
iOS libraries are great<br /><ul><li>CocoaTouchworks really well
Really productive
Easy to make good stuff fast
NS objects get a while to get used to
C functions are necessary every once in a while, which is strange, but not the end of the world</li></li></ul><li>Obj-C is...
Old language, learn to accept it
Brackets everywhere
You’ll go crazy for a few weeks
Once you’re over it, development is just like C#
C code in between is messy</li></li></ul><li>XCode just sucks<br /><ul><li>Crash Fest
IDE Helps you very little
poor code navigation
poor refactoring
Good to manage project, NIBs and CoreData mappings
Upcoming SlideShare
Loading in...5
×

Obj-C and iOS for .NET Developers

7,501

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,501
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
30
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Obj-C and iOS for .NET Developers"

  1. 1. Objective-C and iOSfor .NET Developers<br />Eduardo Scoz<br />Chicago ALT.NET<br />Sept 2011<br />
  2. 2. Me<br /><ul><li>Software Architect at
  3. 3. .NET Developer for 5-6 years
  4. 4. iOS Developer for the last 2 years
  5. 5. Obj-C exclusively for 4 months
  6. 6. http://escoz.com
  7. 7. http://twitter.com/escoz</li></li></ul><li>iOSDev 101<br />What you need:<br />A Mac<br />Register with Apple Dev Center - $100.00<br />Download XCode4 (or beta) <br />Time and patience<br />Demo<br />
  8. 8. So, what is it like?<br />After 6 months<br />
  9. 9. iOS libraries are great<br /><ul><li>CocoaTouchworks really well
  10. 10. Really productive
  11. 11. Easy to make good stuff fast
  12. 12. NS objects get a while to get used to
  13. 13. C functions are necessary every once in a while, which is strange, but not the end of the world</li></li></ul><li>Obj-C is ugly but acceptable<br /><ul><li>You’ll be missing features all the time
  14. 14. Old language, learn to accept it
  15. 15. Brackets everywhere
  16. 16. You’ll go crazy for a few weeks
  17. 17. Once you’re over it, development is just like C#
  18. 18. C code in between is messy</li></li></ul><li>XCode just sucks<br /><ul><li>Crash Fest
  19. 19. IDE Helps you very little
  20. 20. poor code navigation
  21. 21. poor refactoring
  22. 22. Good to manage project, NIBs and CoreData mappings
  23. 23. Great performance tool: Instruments </li></li></ul><li>Jetbrainsappcode<br />Beautiful code development<br /><ul><li>Doesn’t do everything, but it’s great at what it does</li></ul>If you’re used to Resharper, you’ll feel at home<br />Still in beta, so buggy at times<br /><ul><li>http://www.jetbrains.com/objc/</li></li></ul><li>OBJ-C<br />Created in the early 80's, by StepStone<br /><ul><li>Adds Smalltalk-like messaging to C</li></ul>Steve Jobs/NeXT in 88 <br /><ul><li>added Obj-C compiler support to GCC in 88
  24. 24. uses it to create NeXTStep</li></ul>Apple acquires NeXT in '96 and builds OSX<br />
  25. 25. Based on C lang<br /><ul><li>Any C code is valid Obj-C code
  26. 26. No namespaces!
  27. 27. Global functions and variables!
  28. 28. Obj-C functions are built in C
  29. 29. Header and implementation files</li></li></ul><li>Object oriented<br />Just like C#<br /><ul><li>Classes, Objects, Constructors
  30. 30. Class methods, instance methods
  31. 31. No private methods, no class variables
  32. 32. Brackets, brackets, brackets!
  33. 33. Alloc/initvs Constructors
  34. 34. “id” is a pointer to any Obj-C object</li></ul>Demo<br />
  35. 35. Dynamic language<br />Pointers always used to pass objects around.<br />Types is used to assist compiler/tools<br />Message Passing, not method invocation<br /><ul><li>Think of every object as a Dictionary of methods
  36. 36. Extremely simple Reflection
  37. 37. Slower than C++, but still really fast</li></ul>Messages can be executed in a different thread<br />Messages can be forwarded to other objects <br />Method swizzling – change implementations at runtime<br />
  38. 38. More features<br />Categories == Extension methods<br />Protocols == kind of like interfaces<br /><ul><li>@optional and @required</li></ul>Properties<br /><ul><li>every class becomes a dictionary
  39. 39. Convention allows dot notation - KVC</li></ul>Blocks == lambda expressions<br />NSPredicates ~= LINQ, but ugly<br />
  40. 40. More features<br />Key Value Coding<br /><ul><li>Allows simple dot notation for properties:
  41. 41. -(id) valueForUndefinedKey:(NSString *)key {}</li></li></ul><li>Key value observing<br />Every object contains an observer pattern<br />
  42. 42. Memory management<br />GC, but only in OSX<br />Manual reference counting<br /><ul><li>[obj retain]
  43. 43. [obj release]
  44. 44. [objautorelease] - autorelease pools</li></ul>ARC - Automatic Reference Counting<br /><ul><li>Solution for GC envy
  45. 45. smart compiler can do exactly what you would do manually
  46. 46. __block, __weak, __strong</li></li></ul><li>Cocoa touch<br />Based on OSX Cocoa, but not the same<br />Frameworks to allow apps to run on iOS:<br /><ul><li>UIKit, CoreAnimation, OpenAL, MediaLibrary
  47. 47. CoreAudio, Quartz2D, OpenGL, Address Book
  48. 48. Core Location, MapKit, StoreKit, Bonjour, WebKit
  49. 49. BSD Sockets, AV Foundation</li></li></ul><li>UIKit<br />Pretty much anything related to the screen:<br /><ul><li>Displaying pixels
  50. 50. Handling user input
  51. 51. High level components, like tables, entry fields etc
  52. 52. Orientation, rotation</li></ul>MVC-based framework to deal with UI<br />Demo<br />NIBs - WYSIWYG Editor<br />Demo<br />
  53. 53. CORE DATA<br />Apple’s ORM<br />Managed object graph that can be persisted<br /><ul><li>SQLite only for iOS4, Json for new versions</li></ul>Manages object model versioning<br />Localization of names and properties<br />Demo<br />
  54. 54. Notes<br />XCode sucks<br /><ul><li>Be prepared for a life of frustration
  55. 55. Use AppCode</li></ul>ObjC is not bad, get used to it<br />iOS Frameworks are great<br /><ul><li>They’re not simple, but they work really well</li></li></ul><li>Resources<br />http://developer.apple.com<br /><ul><li>Apple developer Forums
  56. 56. irc.freenode.com#iPhoneDev</li></ul>https://github.com/languages/Objective-C/most_watched<br /><ul><li>Facebook three20
  57. 57. JSONKit
  58. 58. RestKit- great way of accessing RESTfulservices
  59. 59. QuickDialog – mine</li></li></ul><li>THANKS!<br />Eduardo Scoz<br />escoz@redpointtech.com<br />http://escoz.com<br />http://twitter.com/escoz<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×