RestKit Revisited

1,108 views

Published on

Cocoaheads presentation I gave at TouchWonders in Utrecht, the Netherlands on April 16, 2013

Published in: Technology, News & Politics
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,108
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

RestKit Revisited

  1. 1. Restkit Revisited RESTing beyond the samples Axel Roest • @axello zondag, 22 september 2013
  2. 2. self zondag, 22 september 2013
  3. 3. self zondag, 22 september 2013
  4. 4. WHY? zondag, 22 september 2013
  5. 5. WHY? communicating with backend zondag, 22 september 2013
  6. 6. WHY? communicating with backend but JSON is easy! zondag, 22 september 2013
  7. 7. WHY? communicating with backend but JSON is easy! [NSJSONSerialization  JSONObjectWithData:responseData] zondag, 22 september 2013
  8. 8. WHY? communicating with backend but JSON is easy! error checking zondag, 22 september 2013
  9. 9. WHY? communicating with backend but JSON is easy! error checking easy mapping to CoreData zondag, 22 september 2013
  10. 10. WHY? communicating with backend but JSON is easy! error checking easy mapping to CoreData zondag, 22 september 2013
  11. 11. WHY? communicating with backend but JSON is easy! error checking easy mapping to CoreData xml & json agnostic zondag, 22 september 2013
  12. 12. Why this talk? started with RestKit 0.10 last year RestKit in the real world Examples sucked zondag, 22 september 2013
  13. 13. Typical Example simple JSON feed of one type load objects from feed zondag, 22 september 2013
  14. 14. Example setup Create: Custom Class RKObjectManager (singleton) RKObjectMapping Fetch objects zondag, 22 september 2013
  15. 15. Real-World multiple different json feeds post multiple compound json objects different responses (data, error) restkit 0.10 objectmanager couldn’t cope zondag, 22 september 2013
  16. 16. Solution 0.10 use separate RKObjectLoader RKObjectMappingProvider zondag, 22 september 2013
  17. 17. RestKit 0.20 based on AFNetworking framework cleaner object mapping more blocks, less delegates zondag, 22 september 2013
  18. 18. Flow 0.20 based on NSOperation: RKObjectRequestOperation RKResponseMapperOperation RKObjectMappingOperation zondag, 22 september 2013
  19. 19. Flow setup AFHTTPClient RKObjectManager (singleton) RKObjectMapping(s) (RKRelationshipMapping) RKResponseDescriptor [[RKObjectManager sharedManager] getObjectsAtPath] zondag, 22 september 2013
  20. 20. Two Basic Flows toplevel based add response to RKObjectManager fetch objects fine-grained add response to RKObjectRequest RKObjectRequestOperation zondag, 22 september 2013
  21. 21. Demo zondag, 22 september 2013
  22. 22. Demo Converting from RestKit 0.10 to 0.20 is a lot of work zondag, 22 september 2013
  23. 23. Demo Converting from RestKit 0.10 to 0.20 is a lot of work RKGist https://github.com/RestKit/RKGist/ zondag, 22 september 2013
  24. 24. Gist Lister https://api.github.com/gists/public zondag, 22 september 2013
  25. 25. Gist Lister https://api.github.com/gists/public zondag, 22 september 2013
  26. 26. Code zondag, 22 september 2013
  27. 27. Where http://restkit.org http://phlux.us axel@phlux.us Axel Roest @axello zondag, 22 september 2013

×