Mobile in the cloud with diamonds

4,857 views
4,413 views

Published on

smartphones today are completely depends on internet services. And developing software for mobile means integration with some number of online services. This task becomes a basic block in a development line.
The presentation is a highlight of current state of tools and frameworks for iOS developers to connect their mobile software with backends fast. And less pain. And less custom coding.

Published in: Technology, Design
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,857
On SlideShare
0
From Embeds
0
Number of Embeds
1,004
Actions
Shares
0
Downloads
0
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Mobile in the cloud with diamonds

  1. MOBILE IN THE CLOUDWITH DIAMONDS2013Monday, June 3, 13
  2. Monday, June 3, 13
  3. ContentMobile & CloudDilemmaEssential frameworksAdvanced frameworksWondertoolsBackendsImaginationMonday, June 3, 13
  4. mobile and the internetsmMonday, June 3, 13
  5. VSFRAMEWORKS★ faster★ know how★ solves the problem★ tested★ independent★ supportedDeveloper’s dilemmaMonday, June 3, 13
  6. FRAMEWORKSRESTawfulservicesThat could be a painMonday, June 3, 13
  7. Core DataData and CloudMonday, June 3, 13
  8. Core DataData and CloudNSOperationMonday, June 3, 13
  9. Core DataData and CloudNSOperationNSURLConnectionMonday, June 3, 13
  10. Core DataData and CloudNSOperationNSURLConnectionAFNetworkingNSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"];NSURLRequest *request = [NSURLRequest requestWithURL:url];AFJSONRequestOperation *operation = [AFJSONRequestOperationJSONRequestOperationWithRequest:request success:^(NSURLRequest*request, NSHTTPURLResponse *response, id JSON) {NSLog(@"App.net Global Stream: %@", JSON);} failure:nil];[operation start];Monday, June 3, 13
  11. Core DataData and CloudNSOperationNSURLConnectionAFNetworkingMonday, June 3, 13
  12. Core DataData and CloudNSOperationNSURLConnectionAFNetworkingKITRESTMonday, June 3, 13
  13. NSOperationNSURLConnection Core DataData and CloudAFNetworking KITRESTMonday, June 3, 13
  14. NSURLConnectionAFNetworkingNSOperation Core DataKITRESTDataMappingData and Cloud - RestKitMonday, June 3, 13
  15. RestKit example@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endRKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweetclass]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc]initWithRequest:request responseDescriptors:@[responseDescriptor]];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {NSLog(@"The public timeline Tweets: %@", [result array]);} failure:nil];[operation start];@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endMonday, June 3, 13
  16. RestKit example@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endRKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweetclass]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc]initWithRequest:request responseDescriptors:@[responseDescriptor]];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweet class]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];Monday, June 3, 13
  17. RestKit example@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endRKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweetclass]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc]initWithRequest:request responseDescriptors:@[responseDescriptor]];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {NSLog(@"The public timeline Tweets: %@", [result array]);} failure:nil];[operation start];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperationalloc] initWithRequest:requestresponseDescriptors:@[responseDescriptor]];Monday, June 3, 13
  18. RestKit example@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endRKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweetclass]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc]initWithRequest:request responseDescriptors:@[responseDescriptor]];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {NSLog(@"The public timeline Tweets: %@", [result array]);} failure:nil];[operation start];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {NSLog(@"The public timeline Tweets: %@", [result array]);} failure:nil];[operation start];Monday, June 3, 13
  19. RestKit example@interface RKTweet : NSObject@property (nonatomic, copy) NSNumber *userID;@property (nonatomic, copy) NSString *username;@property (nonatomic, copy) NSString *text;@endRKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKTweetclass]];[mapping addAttributeMappingsFromDictionary:@{@"user.name": @"username",@"user.id": @"userID",@"text": @"text"}];RKResponseDescriptor *responseDescriptor = [RKResponseDescriptorresponseDescriptorWithMapping:mapping pathPattern:nil keyPath:nilstatusCodes:nil];NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];NSURLRequest *request = [NSURLRequest requestWithURL:url];RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc]initWithRequest:request responseDescriptors:@[responseDescriptor]];[operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation*operation, RKMappingResult *result) {NSLog(@"The public timeline Tweets: %@", [result array]);} failure:nil];[operation start];Monday, June 3, 13
  20. Next StepNSURLConnection NSOperation Core DataNSIncrementalStoreMonday, June 3, 13
  21. Next StepNSURLConnection NSOperation Core DataNSIncrementalStoreAFNetworkingMonday, June 3, 13
  22. Next StepNSURLConnection NSOperation Core DataNSIncrementalStoreAFNetworkingMonday, June 3, 13
  23. NSURLConnectionAFNetworkingNSOperationNSIncrementalStoreCore DataAFIncrementalStoreNext Step - Data SyncMonday, June 3, 13
  24. a snap into AFIncrementalStoreYOUR CODECoreDataframeworkYOUR CODECoreDataframework+AFIncrementalStoreAFNetworkingRESTful serverunusualusualMonday, June 3, 13
  25. working with AFIncrementalStoreis the same as with CoreData@interface TasksViewController()<NSFetchedResultsControllerDelegate>@property NSFetchedResultsController *fetchedResultsController;@end- (UITableViewCell *)tableView:(UITableView *)tableViewcellForRowAtIndexPath:(NSIndexPath *)indexPath{...[self configureCell:cell forRowAtIndexPath:indexPath];return cell;}- (void)configureCell:(UITableViewCell *)cellforRowAtIndexPath:(NSIndexPath *)indexPath{NSManagedObject *managedObject = [self.fetchedResultsControllerobjectAtIndexPath:indexPath];cell.textLabel.text = [managedObject valueForKey:@"text"];}Monday, June 3, 13
  26. AFIncrementalStore?Business Logic??Monday, June 3, 13
  27. ⦿Push Notifications⦿InAppPurchase⦿ Analytics⦿ Passbook⦿ NewsstandSync.#"helios"serverwith just one command...*Monday, June 3, 13
  28. Helios-ready iOS frameworksAFIncrementalStoreCore Data Persistence withAFNetworking, Done RightAFNetworkingA Delightful iOS & OS XNetworking FrameworkAntennaExtensible Remote LoggingSkyLabMultivariate & A/B TestingOrbiterPush NotificationRegistrationCargo BayThe Essential StoreKitCompanionGround ControlRemote ConfigurationMonday, June 3, 13
  29. Cocoa Pods$ [sudo] gem install cocoapods$ pod setuphttp://cocoapods.orgmyproject$ edit Podfileplatform :ios, 5.0pod AFIncrementalStore, ~> 0.3.1pod AFNetworking, ~> 1.0.1myproject$ pod installusing to add RestKit to xcode projectRestKitAFNetworkingAFIncrementalStoreAFAmazonS3Client...https://github.com/CocoaPods/SpecsMonday, June 3, 13
  30. READY TO USE CLOUDS★Deployd.com- free to use- javascript based★★Parse.com-all essential platforms supported-“out of the box” basic data entities-free to test★★★APIgee.com (books & webcasts)- developer console to popular services- intermediate data processing (eg.convert xml to json, mapping, etc)- free to testMonday, June 3, 13
  31. Oleg.Shanyuk@gmail.com@gelosi - http://obrij.comAFNetworking, AFIncrementalStore, AF***https://github.com/helios-framework/heliosRESTKit - https://github.com/RestKit/RestKitFollow: @mattt, @soffes, @gruber, @edog1203CocoaPods - http://cocoapods.orgMonday, June 3, 13

×