Slide 1

Slide 1 text

Effective Network Programming with iOS 7 Wednesday, October 9, 13

Slide 2

Slide 2 text

Ben Scheirman CFOTDIFJSNBODPN !TVCEJHJUBM • Director

Slide 3

Slide 3 text

Wednesday, October 9, 13

Slide 4

Slide 4 text

Bite-sized Screencasts .com Weekly

Slide 5

Slide 5 text

Why is this important? 99%

Slide 6

Slide 6 text

Why is this important? Doing

Slide 7

Slide 7 text

Why is this important? Too

Slide 8

Slide 8 text

Exhibit A: Stuttery Scroller Wednesday, October 9, 13

Slide 9

Slide 9 text

Exhibit A: Stuttery Scroller Accessing

Slide 10

Slide 10 text

Exhibit B: The Perpetual Loader Wednesday, October 9, 13

Slide 11

Slide 11 text

Exhibit B: The Perpetual Loader How

Slide 12

Slide 12 text

Exhibit C: Slow Loader Wednesday, October 9, 13

Slide 13

Slide 13 text

Exhibit C: Slow Loader Loading

Slide 14

Slide 14 text

Exhibit D: Yesterday’s News Wednesday, October 9, 13

Slide 15

Slide 15 text

Exhibit D: Yesterday’s News Caching

Slide 16

Slide 16 text

What we’ll cover w /463-4FTTJPO#BTJDT w -*7&$0%*/( XJTINFMVDL w "'/FUXPSLJOH w )551$BDIJOH w $BDIJOH1BUUFSOT w "1*%FTJHO5JQT Wednesday, October 9, 13

Slide 17

Slide 17 text

NSURLConnection Invented for Safari ~2000, made public in 2003 Poor separation of settings, config, cache Now replaced by NSURLSession classes Wednesday, October 9, 13

Slide 18

Slide 18 text

NSURLConnection Invented for Safari ~2000, made public in 2003 Poor separation of settings, config, cache Now replaced by NSURLSession classes Wednesday, October 9, 13

Slide 19

Slide 19 text

NSURLSession Still use NSURLRequest Configurable Container (isolation w/ 3rd party libraries) Improved auth Rich Callbacks Wednesday, October 9, 13

Slide 20

Slide 20 text

NSURLSession Wednesday, October 9, 13

Slide 21

Slide 21 text

NSURLSession Wednesday, October 9, 13

Slide 22

Slide 22 text

NSURLSession Wednesday, October 9, 13

Slide 23

Slide 23 text

NSURLSession Class Family NSURLSessionConfiguration NSURLSessionTask NSURLSessionDelegate NSURLSession Wednesday, October 9, 13

Slide 24

Slide 24 text

NSURLSession NSURLSession Interface for issuing network calls against a server Likely use case: 1 session per API Wednesday, October 9, 13

Slide 25

Slide 25 text

NSURLSessionDelegate Delegate methods for a session: Used for connect level authentication challenges NTLM, Kerberos, Client certificates - URLSession:didBecomeInvalidWithError: - URLSession:didReceiveChallenge:completionHandler: Wednesday, October 9, 13

Slide 26

Slide 26 text

NSURLSessionTask Wednesday, October 9, 13

Slide 27

Slide 27 text

NSURLSessionTaskDelegate Delegate methods for a request: Only need to implement for fine-grained control - URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler: - URLSession:task:didReceiveChallenge:completionHandler: - URLSession:task:needNewBodyStream: - URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend: - URLSession:task:didCompleteWithError: Wednesday, October 9, 13

Slide 28

Slide 28 text

NSURLSessionDataTaskDelegate Delegate methods for a data request: Only need to implement for fine-grained control - URLSession:dataTask:didReceiveChallenge:completionHandler: - URLSession:dataTask:didBecomeDownloadTask: - URLSession:dataTask:didReceiveData: - URLSession:dataTask:willCacheResponse:completionHandler: Wednesday, October 9, 13

Slide 29

Slide 29 text

NSURLSessionDownloadDelegate - URLSession:downloadTask:didFinishDownloadingToURL: -URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite: - URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes: Wednesday, October 9, 13

Slide 30

Slide 30 text

Requesting Images Wednesday, October 9, 13

Slide 31

Slide 31 text

Have you ever seen this? NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/kwpjYwQ.jpg”]; NSData *imageData = [NSData dataWithContentsOfURL:imageUrl]; UIImage *image = [UIImage imageWithData:imageData]; [imageView setImage:image]; Wednesday, October 9, 13

Slide 32

Slide 32 text

Have you ever seen this? NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/kwpjYwQ.jpg”]; NSData *imageData = [NSData dataWithContentsOfURL:imageUrl]; UIImage *image = [UIImage imageWithData:imageData]; [imageView setImage:image]; WRONG Wednesday, October 9, 13

Slide 33

Slide 33 text

Have you ever seen this? NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/kwpjYwQ.jpg”]; NSData *imageData = [NSData dataWithContentsOfURL:imageUrl]; UIImage *image = [UIImage imageWithData:imageData]; [imageView setImage:image]; Wednesday, October 9, 13

Slide 34

Slide 34 text

In case you were wondering... Wednesday, October 9, 13

Slide 35

Slide 35 text

Demo •Demo: Download an image with NSURLSessionDownloadTask Wednesday, October 9, 13

Slide 36

Slide 36 text

NSURLSessionDataTask •Represents GET/PUT/POST/DELETE •Handle completion callback •If error is present, request failed Wednesday, October 9, 13

Slide 37

Slide 37 text

What constitutes an error? • Connection failed • Timeouts • Host invalid • Bad URL • Too many redirects • ... dozens more (check URL Loading System Error Codes) Wednesday, October 9, 13

Slide 38

Slide 38 text

Demo •Demo: Searching the iTunes Store Wednesday, October 9, 13

Slide 39

Slide 39 text

AFNetworking Wednesday, October 9, 13

Slide 40

Slide 40 text

AFNetworking 2.0 Wednesday, October 9, 13

Slide 41

Slide 41 text

Installation gem install cocoapods Podfile pod install platform :ios, "7.0" pod 'AFNetworking', '2.0' Wednesday, October 9, 13

Slide 42

Slide 42 text

Installation gem install cocoapods Podfile pod install platform :ios, "7.0" pod 'AFNetworking', '2.0' Wednesday, October 9, 13

Slide 43

Slide 43 text

Installation Podfile pod install platform :ios, "7.0" pod 'AFNetworking', '2.0' gem install cocoapods Wednesday, October 9, 13

Slide 44

Slide 44 text

Installation Podfile pod install platform :ios, "6.0" pod 'AFNetworking' platform :ios, "7.0" pod 'AFNetworking', '2.0' gem install cocoapods Wednesday, October 9, 13

Slide 45

Slide 45 text

AFNetworking 1.0 Design AFHTTPRequestOperation NSOperation AFURLConnectionOperation NSURLRequest NSURLConnection Wednesday, October 9, 13

Slide 46

Slide 46 text

AFNetworking 2.0 Design AFHTTPSessionManager NSObject AFURLSessionManager NSURLSession NSURLSessionConfiguration NSURLSessionTask Wednesday, October 9, 13

Slide 47

Slide 47 text

Serializers AFJSONSerializer AFURLSessionManager Wednesday, October 9, 13

Slide 48

Slide 48 text

Usage Wednesday, October 9, 13

Slide 49

Slide 49 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; Wednesday, October 9, 13

Slide 50

Slide 50 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration Wednesday, October 9, 13

Slide 51

Slide 51 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; Wednesday, October 9, 13

Slide 52

Slide 52 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] Wednesday, October 9, 13

Slide 53

Slide 53 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; Wednesday, October 9, 13

Slide 54

Slide 54 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; Wednesday, October 9, 13

Slide 55

Slide 55 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, Wednesday, October 9, 13

Slide 56

Slide 56 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, id responseObject) { Wednesday, October 9, 13

Slide 57

Slide 57 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, id responseObject) { // handle success Wednesday, October 9, 13

Slide 58

Slide 58 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, id responseObject) { // handle success } failure:^(NSURLSessionDataTask *task, NSError *error) { Wednesday, October 9, 13

Slide 59

Slide 59 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, id responseObject) { // handle success } failure:^(NSURLSessionDataTask *task, NSError *error) { // handle failure Wednesday, October 9, 13

Slide 60

Slide 60 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultConfiguration]; AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:config]; manager.responseSerializer = [[AFJSONSerializer alloc] init]; [manager GET:url parameters:nil completion:^(NSURLSessionDataTask *task, id responseObject) { // handle success } failure:^(NSURLSessionDataTask *task, NSError *error) { // handle failure }]; Wednesday, October 9, 13

Slide 61

Slide 61 text

Requesting Images Wednesday, October 9, 13

Slide 62

Slide 62 text

Requesting Images NSURL *imageUrl = [NSURL URLWithString: Wednesday, October 9, 13

Slide 63

Slide 63 text

Requesting Images NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/kwpjYwQ.jpg”]; Wednesday, October 9, 13

Slide 64

Slide 64 text

Requesting Images NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/kwpjYwQ.jpg”]; [imageView setImageWithURL:imageUrl]; Wednesday, October 9, 13

Slide 65

Slide 65 text

Requesting XML? Wednesday, October 9, 13

Slide 66

Slide 66 text

Requesting XML? AFXMLResponseSerializer Wednesday, October 9, 13

Slide 67

Slide 67 text

Requesting plist? Wednesday, October 9, 13

Slide 68

Slide 68 text

Requesting plist? AFPropertyListResponseSerializer Wednesday, October 9, 13

Slide 69

Slide 69 text

Requesting a custom data format? Wednesday, October 9, 13

Slide 70

Slide 70 text

Requesting a custom data format? MyCustomResponseSerializer Wednesday, October 9, 13

Slide 71

Slide 71 text

Demo: app.net client Wednesday, October 9, 13

Slide 72

Slide 72 text

Other AFNetworking Goodies AFHTTPSessionManager setSecurityPolicy [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey] Wednesday, October 9, 13

Slide 73

Slide 73 text

Other AFNetworking Goodies UIActivityIndicatorView+AFNetworking.h [indicator setAnimatingWithStateOfTask:task] Wednesday, October 9, 13

Slide 74

Slide 74 text

HTTP Status Code Cheat Sheet 1xx - Not Used 2xx - Thumbs Up 3xx - It's over there 4xx - You messed up 5xx - We messed up Wednesday, October 9, 13

Slide 75

Slide 75 text

HTTP Caching Client Server Wednesday, October 9, 13

Slide 76

Slide 76 text

HTTP Caching Client Server GET /customer/152.json HTTP 1.1 Host: example.com Wednesday, October 9, 13

Slide 77

Slide 77 text

HTTP Caching Client Server HTTP/1.1 200 OK Content-Type: application/json Content-Length: 37142 Etag:“e6482391249374127ca94128” Cache-Control:max-age=60, public Date:Sun, 21 Oct 2012 16:15:37 GET /customer/152.json HTTP 1.1 Host: example.com Wednesday, October 9, 13

Slide 78

Slide 78 text

HTTP Caching GET /customer/152.json HTTP 1.1 Host: example.com Client Server HTTP/1.1 200 OK Content-Type: application/json Content-Length: 37142 Etag:“e6482391249374127ca94128” Cache-Control:max-age=60, public Date:Sun, 21 Oct 2012 16:15:37 Wednesday, October 9, 13

Slide 79

Slide 79 text

HTTP Caching GET /customer/152.json HTTP 1.1 Host: example.com Client Server HTTP/1.1 200 OK Content-Type: application/json Content-Length: 37142 Etag:“e6482391249374127ca94128” Cache-Control:max-age=60, public Date:Sun, 21 Oct 2012 16:15:37 Wednesday, October 9, 13

Slide 80

Slide 80 text

HTTP Caching GET /customer/152.json HTTP 1.1 Host: example.com Client Server HTTP/1.1 200 OK Content-Type: application/json Content-Length: 37142 Etag:“e6482391249374127ca94128” Cache-Control:max-age=60, public Date:Sun, 21 Oct 2012 16:15:37 Wednesday, October 9, 13

Slide 81

Slide 81 text

Leveraging Etag on the client Client Server Wednesday, October 9, 13

Slide 82

Slide 82 text

Leveraging Etag on the client GET /customer/152.json HTTP 1.1 Host: example.com If-None-Match:“e6482391249374127ca94128” Client Server Wednesday, October 9, 13

Slide 83

Slide 83 text

Leveraging Etag on the client GET /customer/152.json HTTP 1.1 Host: example.com If-None-Match:“e6482391249374127ca94128” Client Server HTTP/1.1 304 Not Modified < no response body > Wednesday, October 9, 13

Slide 84

Slide 84 text

Leveraging Modified Date Client Server Wednesday, October 9, 13

Slide 85

Slide 85 text

Leveraging Modified Date GET /customer/152.json HTTP 1.1 Host: example.com If-Modified-Since: Client Server Wednesday, October 9, 13

Slide 86

Slide 86 text

Leveraging Modified Date GET /customer/152.json HTTP 1.1 Host: example.com If-Modified-Since: Client Server HTTP/1.1 304 Not Modified < no response body > Wednesday, October 9, 13

Slide 87

Slide 87 text

Etag/Last Modified on the Server Wednesday, October 9, 13

Slide 88

Slide 88 text

Etag/Last Modified on the Server def show Wednesday, October 9, 13

Slide 89

Slide 89 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) Wednesday, October 9, 13

Slide 90

Slide 90 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, Wednesday, October 9, 13

Slide 91

Slide 91 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, :last_modified => @band, Wednesday, October 9, 13

Slide 92

Slide 92 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, :last_modified => @band, :public => true) Wednesday, October 9, 13

Slide 93

Slide 93 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, :last_modified => @band, :public => true) expires_in 10.minutes, :public => true Wednesday, October 9, 13

Slide 94

Slide 94 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, :last_modified => @band, :public => true) expires_in 10.minutes, :public => true end Wednesday, October 9, 13

Slide 95

Slide 95 text

Etag/Last Modified on the Server def show @band = Band.find(params[:id]) fresh_when(:etag => @band, :last_modified => @band, :public => true) expires_in 10.minutes, :public => true end Note: server still does a db query, but doesn’t render a template Saves on rendering & bandwidth for response transfer Wednesday, October 9, 13

Slide 96

Slide 96 text

Cache-Control limitations Server Wednesday, October 9, 13

Slide 97

Slide 97 text

Cache-Control limitations Server Wednesday, October 9, 13

Slide 98

Slide 98 text

Cache-Control limitations Server Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 99

Slide 99 text

Cache-Control limitations Server Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 100

Slide 100 text

Cache-Control limitations Server Cache-Control: max-age: 600 Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 101

Slide 101 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 9, 13

Slide 102

Slide 102 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 9, 13

Slide 103

Slide 103 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 9, 13

Slide 104

Slide 104 text

Reverse-Proxy Cache FTW Server Cache-Control: max-age: 600 Varnish / Squid / Nginx Wednesday, October 9, 13

Slide 105

Slide 105 text

Reverse-Proxy Cache FTW Server Cache-Control: max-age: 600 Varnish / Squid / Nginx Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 106

Slide 106 text

Reverse-Proxy Cache FTW Server Cache-Control: max-age: 600 Varnish / Squid / Nginx Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 107

Slide 107 text

Reverse-Proxy Cache FTW Server Cache-Control: max-age: 600 Cache-Control: max-age: 600 Varnish / Squid / Nginx Cache-Control: max-age: 600 Wednesday, October 9, 13

Slide 108

Slide 108 text

Leverage Cache-Control? HTTP/1.1 200 OK Content-Type: application/json Content-Length: 37142 Etag:“e6482391249374127ca94128” Cache-Control:max-age=9999999999, public Date:Sun, 21 Oct 2012 16:15:37 GMT Wednesday, October 9, 13

Slide 109

Slide 109 text

.JLF %PO`UFWFSDBMMNFBHBJO Wednesday, October 9, 13

Slide 110

Slide 110 text

Pros / Cons of Cache-Control Client doesn’t wait for response Server spends no resources But, clients may render stale data Wednesday, October 9, 13

Slide 111

Slide 111 text

Pros / Cons of Etag / IMS Server skips rendering Miniscule data transfer Appears instantaneous* But, server still doing a db query Wednesday, October 9, 13

Slide 112

Slide 112 text

Reason about your data • List of US States • User’s Profile • Customer’s Order • Activity Timeline • Yesterday’s stats Wednesday, October 9, 13

Slide 113

Slide 113 text

Tradeoff Fresh

Slide 114

Slide 114 text

Caching w/ NSURLSession Leverages NSURLCache already Use default session configuration or customize cache settings Use ephemeral configuration to disable caching Wednesday, October 9, 13

Slide 115

Slide 115 text

Caching w/ NSURLSession Customize if needed NSURLCache *cache = [[NSURLCache alloc] initWithMemoryCapacity:1024*1024*10 diskCapacity:1024*1024*50 diskPath:nil]; [sessionConfiguration setURLCache:cache]; Wednesday, October 9, 13

Slide 116

Slide 116 text

Default Cache Location ~/Library/Caches/com.acme.app/Cache.db Wednesday, October 9, 13

Slide 117

Slide 117 text

Wednesday, October 9, 13

Slide 118

Slide 118 text

Switcheroo View Controller API Client Coordinator Wednesday, October 9, 13

Slide 119

Slide 119 text

Switcheroo View Controller API Client Coordinator get data Wednesday, October 9, 13

Slide 120

Slide 120 text

Switcheroo View Controller API Client Coordinator get data start request Wednesday, October 9, 13

Slide 121

Slide 121 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) Wednesday, October 9, 13

Slide 122

Slide 122 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET Wednesday, October 9, 13

Slide 123

Slide 123 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET Wednesday, October 9, 13

Slide 124

Slide 124 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET 200 OK Wednesday, October 9, 13

Slide 125

Slide 125 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET 200 OK (parsed response) Wednesday, October 9, 13

Slide 126

Slide 126 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET 200 OK (parsed response) update cache Wednesday, October 9, 13

Slide 127

Slide 127 text

Switcheroo View Controller API Client Coordinator get data start request (cached data) HTTP GET 200 OK (parsed response) (parsed response) update cache Wednesday, October 9, 13

Slide 128

Slide 128 text

API Design Tips Don’t expose your internal model http://www.myspace.com/na6_build/photos/20613762 Wednesday, October 9, 13

Slide 129

Slide 129 text

API Design Tips Version your API Wednesday, October 9, 13

Slide 130

Slide 130 text

API Design Tips Send OS Version, App Version, and Device Name as headers Device Name OS Version App Version Wednesday, October 9, 13

Slide 131

Slide 131 text

API Design Tips Have a way to notify clients to upgrade (even force) Wednesday, October 9, 13

Slide 132

Slide 132 text

API Design Tips • Techniques for permeating deletes • Valid ID Check • Client requests changes, server returns a set of new records, changed records, and deleted record ids Wednesday, October 9, 13

Slide 133

Slide 133 text

API Design Tips Page Large Datasets Wednesday, October 9, 13

Slide 134

Slide 134 text

API Design Tips Build-in HTTP Caching support from day 1 Wednesday, October 9, 13

Slide 135

Slide 135 text

API Design Tips Take care when caching user-specific data Wednesday, October 9, 13

Slide 136

Slide 136 text

API Design Tips Turn on Gzip Compression Wednesday, October 9, 13

Slide 137

Slide 137 text

API Design Tips Measure your API response times Wednesday, October 9, 13

Slide 138

Slide 138 text

Thank you! Ben Scheirman @subdigital @bens (adn) @nsscreencast Wednesday, October 9, 13