LoginSignup
0
0

More than 5 years have passed since last update.

RestKit Basics

Posted at
  1. Restkitの基本

Object Mapping:
Object mapping is the process of taking a representation of data in one form and transforming it into another.

Restkit:
Restkit provides a object mapping engine that transform the remote data format, such as a object in JSON, into the format of local objects.

Three main components:
Network – RestKit now uses AFNetworking v1.3.3 for the network layer. RestKit maintainers are working on updating to AFNetworking 2.0.
Object Mapping – Provides a simple API for turning remote JSON/XML responses into local objects.
Core Data – Provides additional support on top of the object mapper for mapping remote resources to persisted local objects. (No Core Data for this tutorial)

Key classes
RKObjectMapping: An object mapping defines the mapping between a JSON attribute and your data model’s attribute.

RKResponseDescriptor: which describes an object mapping that is applicable to an HTTP response.

RKObjectRequestOperation: An object request operation is responsible for managing the life-cycle of an object mapped HTTP request from start to finish. It handles the transmission of the HTTP request, deserialization of the response, and processing of the response through the object mapping engine. Object request operations are configured with an NSURLRequest and one or more RKResponseDescriptor objects specifying ways in which the response may be mapped.

Two good examples to refer to:
1. Object Mapping by Example
https://github.com/RestKit/RestKit/wiki/Object-mapping

  1. Introduction to RestKit Tutorial http://www.raywenderlich.com/58682/introduction-restkit-tutorial

RestKit Related Links
Restkit Wikiの感じ
https://github.com/RestKit/RestKit/
Object- mappingに関する説明
https://github.com/RestKit/RestKit/wiki/Object-mapping

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0