Course description
In this course we go over the basics of what it means to have a RESTful interface. We then review the Objective-C objects and methods we will use to interact with the remote service over http. Next we revise an application to use some basic http methods to download data from a Ruby server. Then we review the JSON information format. JSON objects map to Objective-C strings, numbers, dictionaries and arrays. We'll look at the format so we can predict from the raw data what types of objects we will get from the NSJSONSerialization class. Last but not least we create a custom NSObject subclass to hold JSON data.
Prerequisites
This course assumes that students have a general understanding of programming concepts in Xcode and Objective C.
Learning Paths
This course is part of the following LearnNowOnline SuccessPaths™:
iOS Mobile Development
Meet the expert
David Solberg has been developing iOS applications for several years for both consumers and enterprises. He has multiple applications in the App Store in addition to numerous private applications for internal business use. He is co-organizer of the Twin Cities, Minnesota, Meetup group for iOS developers. In addition to his many years training people to use technology, David has architected online assessment systems.
Course outline
Rest and JSON
Introduction to Rest (23:50)
- Introduction (00:36)
- RESTful Interfaces (01:31)
- SOAP (01:23)
- Why REST (00:42)
- When/Where to Use REST (00:55)
- How to use REST (01:23)
- HTTP Process in Objective-C (00:45)
- NSURL Request (01:00)
- NSURL Connection (02:18)
- NSURL Response (01:28)
- Accessing Public Resources (00:32)
- Installing Ruby (01:16)
- Demo: Starting Ruby (03:00)
- Demo: App (06:30)
- Summary (00:24)
Introduction to Rest Part 2 (23:19)
- Introduction (00:45)
- Demo: NSString (04:52)
- Demo: NSURL and Error Checking (01:59)
- Demo: NSURLRequest (01:31)
- Demo: NSConnection (03:37)
- Demo: NSResponse (02:42)
- Demo: NSJSON Serialization (02:30)
- Demo: JSON Error Checking (03:37)
- Demo: Inspecting JSON (01:17)
- Summary (00:24)
Understanding JSON (27:01)
- Introduction (00:40)
- Parsing the Data Received (01:39)
- Understanding JSON (01:10)
- Raw JSON (02:12)
- JSON to Objective-C Objects (00:58)
- Mapping JSON array to C (00:56)
- Demo: Table View Cells (05:41)
- Demo: Storyboard (00:59)
- Demo: Subtitles (01:15)
- Demo: NSNull (04:01)
- Demo: Detail (01:47)
- Demo: Segue (03:01)
- Demo: Explaining Issues (02:09)
- Summary (00:26)
JSON and RESTful Database
Representing JSON (35:37)
- Introduction (00:40)
- Custom Objective-C Objects (04:00)
- Steps for Each Object (00:41)
- Saving and Archiving (01:31)
- Demo: Objective-C Objects (06:21)
- Demo: Objective-C Methods (09:11)
- Demo: Convert Member Objects (05:21)
- Demo: Class Instances (05:22)
- Demo: Booleans (02:05)
- Summary (00:19)
Archiving JSON (18:40)
- Introduction (00:37)
- Demo: Saving with encoder (04:14)
- Demo: Init with encoder (04:00)
- Demo: Save Path (02:52)
- Demo: Archiving (03:26)
- Demo: Retrieving from Cache (03:03)
- Summary (00:26)