Objective-C Crash Course for Web Developers
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Objective-C Crash Course for Web Developers

on

  • 7,748 views

These are the slides of my SXSW 2010 Objective-C Crash Course for Web Developers.

These are the slides of my SXSW 2010 Objective-C Crash Course for Web Developers.

The code samples (and the keynote document) can also be downloaded from http://workshop.verbogt.nl/

Statistics

Views

Total Views
7,748
Views on SlideShare
7,599
Embed Views
149

Actions

Likes
7
Downloads
201
Comments
1

14 Embeds 149

http://dr-palaniraja.blogspot.com 91
http://www.slideshare.net 33
http://dr-palaniraja.blogspot.in 7
http://dr-palaniraja.blogspot.fr 3
http://dr-palaniraja.blogspot.co.uk 3
http://dr-palaniraja.blogspot.ro 2
http://dr-palaniraja.blogspot.se 2
http://dr-palaniraja.blogspot.cz 2
http://dr-palaniraja.blogspot.ru 1
http://dr-palaniraja.blogspot.ie 1
http://dr-palaniraja.blogspot.jp 1
http://dr-palaniraja.blogspot.it 1
http://dr-palaniraja.blogspot.com.br 1
http://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Is there a video available for these?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • Chief Developer <br /> Backend stuff / JavaScript integration <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Basic description <br />
  • <br />
  • <br />
  • Questions at the end <br /> Except for things that aren&#x2019;t clear <br />
  • Questions at the end <br /> Except for things that aren&#x2019;t clear <br />
  • Questions at the end <br /> Except for things that aren&#x2019;t clear <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Objective-C Crash Course for Web Developers Presentation Transcript

  • 1. Objective-C Crash Course for Web Developers
  • 2. About me
  • 3. About me LinkedIn: jverbogt Twitter: silentjohnny Facebook: silentjohnny E-mail: joris@mangrove.nl
  • 4. History
  • 5. iPhone SDK
  • 6. AppStore
  • 7. Build your own
  • 8. TXXI
  • 9. Today’s Topics
  • 10. Today’s Topics
  • 11. Today’s Topics Native iPhone Development
  • 12. Today’s Topics Native iPhone Development Live Demo
  • 13. Today’s Topics Native iPhone Development Live Demo Questions
  • 14. iPhone Development
  • 15. iPhone Development Tools: Xcode / Interface Builder
  • 16. iPhone Development Tools: Xcode / Interface Builder Language: Objective-C
  • 17. iPhone Development Tools: Xcode / Interface Builder Language: Objective-C Frameworks: Foundation / UIKit
  • 18. Xcode
  • 19. Xcode Editor
  • 20. Xcode Editor Debugger
  • 21. Xcode Editor Debugger Build Tools
  • 22. Xcode Editor Debugger Build Tools Documentation
  • 23. Interface Builder
  • 24. Interface Builder Design UI
  • 25. Interface Builder Design UI Bind to code
  • 26. Interface Builder Design UI Bind to code Generate code
  • 27. iPhone Simulator
  • 28. iPhone Simulator Easy for debugging
  • 29. iPhone Simulator Easy for debugging No device needed
  • 30. iPhone Simulator Easy for debugging No device needed Fast round-trip
  • 31. Not a real iPhone!
  • 32. Objective-C
  • 33. Objective-C
  • 34. Objective-C Superset of C, can be mixed
  • 35. Objective-C Superset of C, can be mixed Simple syntax
  • 36. Objective-C Superset of C, can be mixed Simple syntax Dynamic runtime
  • 37. OOP in Objective-C
  • 38. OOP in Objective-C
  • 39. OOP in Objective-C Single inheritance class tree
  • 40. OOP in Objective-C Single inheritance class tree Protocols for multi-class behavior
  • 41. OOP in Objective-C Single inheritance class tree Protocols for multi-class behavior Instance variables are hidden
  • 42. OOP in Objective-C Single inheritance class tree Protocols for multi-class behavior Instance variables are hidden Objects respond to messages for interaction
  • 43. OOP in Objective-C Single inheritance class tree Protocols for multi-class behavior Instance variables are hidden Objects respond to messages for interaction Variables are bound to classes at runtime
  • 44. OOP in Objective-C Single inheritance class tree Protocols for multi-class behavior Instance variables are hidden Objects respond to messages for interaction Variables are bound to classes at runtime There is an anonymous object type ‘id’
  • 45. Syntax
  • 46. Syntax
  • 47. Syntax float moneyInTheBank = 0.0;
  • 48. Syntax float moneyInTheBank = 0.0; var moneyInTheBank = 0.0;
  • 49. Syntax
  • 50. Syntax MacBookPro *myNewMac = [MacBookPro new];
  • 51. Syntax MacBookPro *myNewMac = [MacBookPro new]; var myNewMac = new MacBookPro();
  • 52. Syntax
  • 53. Syntax if (moneyInTheBank > [myNewMac price]) { // Go buy one! }
  • 54. Syntax if (moneyInTheBank > [myNewMac price]) { // Go buy one! } if (moneyInTheBank > myNewMac.getPrice()) { // Go buy one! }
  • 55. Syntax
  • 56. Syntax for (i=1; i<count; i++) { }
  • 57. Messaging
  • 58. Messaging
  • 59. Messaging NSString *name = [person name];
  • 60. Messaging NSString *name = [person name]; var name = person.getName();
  • 61. Messaging
  • 62. Messaging [person setName:@”John”];
  • 63. Messaging [person setName:@”John”]; person.setName(”John”);
  • 64. Messaging
  • 65. Messaging NSUInteger length = [[person name] length];
  • 66. Messaging NSUInteger length = [[person name] length]; var length = person.getName().getLength();
  • 67. Messaging
  • 68. Messaging [person setName:name andAge:21];
  • 69. Messaging [person setName:name andAge:21]; person.set({name:name, age:21});
  • 70. Creating Instances
  • 71. Creating Instances
  • 72. Creating Instances Person *person = [[Person alloc] init];
  • 73. Creating Instances Person *person = [[Person alloc] init]; Person *person = [Person new];
  • 74. Creating Instances Person *person = [[Person alloc] init]; Person *person = [Person new]; Person *person = [Person person];
  • 75. Memory Management
  • 76. Memory Management
  • 77. Memory Management If you allocate memory, you need to clean it up!
  • 78. Memory Management
  • 79. Memory Management NSObject *keepMe = [[NSObject alloc] init];
  • 80. Memory Management NSObject *keepMe = [[NSObject alloc] init]; [keepMe retain];
  • 81. Memory Management NSObject *keepMe = [[NSObject alloc] init]; [keepMe retain]; [keepMe autorelease];
  • 82. Memory Management NSObject *keepMe = [[NSObject alloc] init]; [keepMe retain]; [keepMe autorelease]; [keepMe release];
  • 83. Memory Management NSObject *keepMe = [[NSObject alloc] init]; [keepMe retain]; [keepMe autorelease]; [keepMe release]; NSObject *keepMe = [NSObject object];
  • 84. Categories
  • 85. Categories
  • 86. Categories Extending classes without subclassing
  • 87. Categories Extending classes without subclassing NSString *json = @”{“test”:”OK”}”;
  • 88. Categories Extending classes without subclassing NSString *json = @”{“test”:”OK”}”; SBJsonParser *parser = [[SBJsonParser] alloc] init]; NSDictionary *data = [parser objectWithString:json];
  • 89. Categories Extending classes without subclassing NSString *json = @”{“test”:”OK”}”; NSDictionary *data = [json JSONValue];
  • 90. Categories
  • 91. Categories String.prototype.getJSONValue = function() { return ... };
  • 92. Categories String.prototype.getJSONValue = function() { return ... }; var json = “{”test”:”OK”}”; var myObject = json.getJSONValue();
  • 93. Foundation Classes
  • 94. NSString
  • 95. NSString
  • 96. NSString NSString *myName = @”joris”;
  • 97. NSString NSString *myName = @”joris”; NSString *welcome = [NSString stringWithFormat:@”Hello %@”, name];
  • 98. NSString NSString *myName = @”joris”; NSString *welcome = [NSString stringWithFormat:@”Hello %@”, name]; NSString *greeting = @”Hello ”; NSString *welcome = [greeting stringByAppendingString:name];
  • 99. NSString NSString *myName = @”joris”; NSString *welcome = [NSString stringWithFormat:@”Hello %@”, name]; NSString *greeting = @”Hello ”; NSString *welcome = [greeting stringByAppendingString:name]; if ([myName isEqualToString:otherName]) { // Strings are equal! }
  • 100. NSArray
  • 101. NSArray
  • 102. NSArray NSArray *myArray = [NSArray arrayWithObjects:@”me”, @”you”, nil];
  • 103. NSArray NSArray *myArray = [NSArray arrayWithObjects:@”me”, @”you”, nil]; NSUInteger count = [myArray count];
  • 104. NSArray NSArray *myArray = [NSArray arrayWithObjects:@”me”, @”you”, nil]; NSUInteger count = [myArray count]; NSString *secondItem = [myArray objectAtIndex:1];
  • 105. NSArray NSArray *myArray = [NSArray arrayWithObjects:@”me”, @”you”, nil]; NSUInteger count = [myArray count]; NSString *secondItem = [myArray objectAtIndex:1]; for (NSString *name in myArray) { NSLog(@”Name: %@”, name); }
  • 106. NSDictionary
  • 107. NSDictionary
  • 108. NSDictionary NSDictionary *myDict = [NSDictionary dictionaryWithObjectsAndKeys: @”joris”, @”firstname”, @”verbogt”, @”lastname”, nil];
  • 109. NSDictionary NSDictionary *myDict = [NSDictionary dictionaryWithObjectsAndKeys: @”joris”, @”firstname”, @”verbogt”, @”lastname”, nil]; NSString *lastname = [myDict objectForKey:@”lastname”];
  • 110. UIKit
  • 111. Delegates
  • 112. Delegates
  • 113. Delegates Many UIKit classes define delegate protocols
  • 114. Delegates Many UIKit classes define delegate protocols No subclassing necessary for custom behavior
  • 115. Delegates Many UIKit classes define delegate protocols No subclassing necessary for custom behavior Loose coupling
  • 116. Delegates Many UIKit classes define delegate protocols No subclassing necessary for custom behavior Loose coupling Easy refactoring
  • 117. Connecting UI Elements
  • 118. Connecting UI Elements
  • 119. Connecting UI Elements Code defines outlets to UI elements
  • 120. Connecting UI Elements Code defines outlets to UI elements Code responds to actions from UI
  • 121. Connecting UI Elements Code defines outlets to UI elements Code responds to actions from UI UI Elements fire actions to a target
  • 122. Connecting UI Elements Code defines outlets to UI elements Code responds to actions from UI UI Elements fire actions to a target Again: no subclassing
  • 123. ViewControllers
  • 124. ViewControllers
  • 125. ViewControllers Control a UI view (with sub-views)
  • 126. ViewControllers Control a UI view (with sub-views) Ready to use, out-of-the-box
  • 127. ViewControllers Control a UI view (with sub-views) Ready to use, out-of-the-box Can be stacked for navigation
  • 128. ViewControllers Control a UI view (with sub-views) Ready to use, out-of-the-box Can be stacked for navigation Can be initialized from code or IB
  • 129. ViewControllers
  • 130. ViewControllers Useful Subclasses:
  • 131. ViewControllers Useful Subclasses: TableViewController
  • 132. ViewControllers Useful Subclasses: TableViewController NavigationController
  • 133. ViewControllers Useful Subclasses: TableViewController NavigationController TabBarController
  • 134. Let’s do some coding...
  • 135. Why?
  • 136. Why?
  • 137. Why? Fun challenge
  • 138. Why? Fun challenge Frameworks
  • 139. Why? Fun challenge Frameworks Best User Experience
  • 140. Why? Fun challenge Frameworks Best User Experience Inspiration
  • 141. Thank you
  • 142. Copyright Artwork by nozzman.com Presentation by Joris Verbogt This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License. Download at http://workshop.verbogt.nl/