Slide 1

Slide 1 text

Effective Network Programming with Wednesday, October 24, 12

Slide 2

Slide 2 text

Ben Scheirman CFOTDIFJSNBODPN !TVCEJHJUBM • Director

Slide 3

Slide 3 text

Bite-sized Screencasts .com Wednesday, October 24, 12

Slide 4

Slide 4 text

Why is this important? 99%

Slide 5

Slide 5 text

Why is this important? Doing

Slide 6

Slide 6 text

Why is this important? Everyone

Slide 7

Slide 7 text

Why is this important? Everyone

Slide 8

Slide 8 text

Exhibit A: Stuttery Scroller Wednesday, October 24, 12

Slide 9

Slide 9 text

Exhibit A: Stuttery Scroller Accessing

Slide 10

Slide 10 text

Exhibit B: The Perpetual Loader Wednesday, October 24, 12

Slide 11

Slide 11 text

Exhibit B: The Perpetual Loader How

Slide 12

Slide 12 text

Exhibit C: Slow Loader Wednesday, October 24, 12

Slide 13

Slide 13 text

Exhibit C: Slow Loader Loading

Slide 14

Slide 14 text

Exhibit D: Yesterday’s News Wednesday, October 24, 12

Slide 15

Slide 15 text

Exhibit D: Yesterday’s News Caching

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

AFNetworking Wednesday, October 24, 12

Slide 18

Slide 18 text

Installation gem install cocoapods Podfile pod install platform :ios, “5.0” pod ‘AFNetworking’ Wednesday, October 24, 12

Slide 19

Slide 19 text

Installation gem install cocoapods Podfile pod install platform :ios, “5.0” pod ‘AFNetworking’ Wednesday, October 24, 12

Slide 20

Slide 20 text

Installation gem install cocoapods Podfile platform :ios, “5.0” pod ‘AFNetworking’ pod install Wednesday, October 24, 12

Slide 21

Slide 21 text

Installation gem install cocoapods Podfile pod install platform :ios, “5.0” pod ‘AFNetworking’ Wednesday, October 24, 12

Slide 22

Slide 22 text

AFNetworking Design AFHTTPRequestOperation NSOperation AFURLConnectionOperation NSURLRequest NSURLConnection Wednesday, October 24, 12

Slide 23

Slide 23 text

Why NSOperation? •Queues

Slide 24

Slide 24 text

Usage Wednesday, October 24, 12

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; Wednesday, October 24, 12

Slide 27

Slide 27 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; Wednesday, October 24, 12

Slide 28

Slide 28 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] Wednesday, October 24, 12

Slide 29

Slide 29 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; Wednesday, October 24, 12

Slide 30

Slide 30 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, Wednesday, October 24, 12

Slide 31

Slide 31 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { Wednesday, October 24, 12

Slide 32

Slide 32 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { // handle success Wednesday, October 24, 12

Slide 33

Slide 33 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { // handle success } failure:^(AFHTTPRequestOperation *operation, NSError *error) { Wednesday, October 24, 12

Slide 34

Slide 34 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { // handle success } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // handle failure Wednesday, October 24, 12

Slide 35

Slide 35 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { // handle success } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // handle failure }]; Wednesday, October 24, 12

Slide 36

Slide 36 text

Usage NSURL *url = [NSURL URLWithString:@”http://google.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation; operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { // handle success } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // handle failure }]; [operation start]; Wednesday, October 24, 12

Slide 37

Slide 37 text

Requesting JSON Wednesday, October 24, 12

Slide 38

Slide 38 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; Wednesday, October 24, 12

Slide 39

Slide 39 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; Wednesday, October 24, 12

Slide 40

Slide 40 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; Wednesday, October 24, 12

Slide 41

Slide 41 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] Wednesday, October 24, 12

Slide 42

Slide 42 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; Wednesday, October 24, 12

Slide 43

Slide 43 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( Wednesday, October 24, 12

Slide 44

Slide 44 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( AFHTTPRequestOperation *operation, id responseObject) { Wednesday, October 24, 12

Slide 45

Slide 45 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( AFHTTPRequestOperation *operation, id responseObject) { // responseObject is already parsed Wednesday, October 24, 12

Slide 46

Slide 46 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( AFHTTPRequestOperation *operation, id responseObject) { // responseObject is already parsed } failure:^(AFHTTPRequestOperation *operation, NSError *error) { Wednesday, October 24, 12

Slide 47

Slide 47 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( AFHTTPRequestOperation *operation, id responseObject) { // responseObject is already parsed } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // handle failure Wednesday, October 24, 12

Slide 48

Slide 48 text

Requesting JSON NSURL *url = [NSURL URLWithString:@”http://jsonip.com”]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation; operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; [operation setCompletionWithSuccess:^( AFHTTPRequestOperation *operation, id responseObject) { // responseObject is already parsed } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // handle failure }]; Wednesday, October 24, 12

Slide 49

Slide 49 text

Requesting Images Wednesday, October 24, 12

Slide 50

Slide 50 text

Requesting Images NSURL *imageUrl = [NSURL URLWithString: Wednesday, October 24, 12

Slide 51

Slide 51 text

Requesting Images NSURL *imageUrl = [NSURL URLWithString: @”http://i.imgur.com/RH1Si.jpg”]; Wednesday, October 24, 12

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

Say it with me now... Wednesday, October 24, 12

Slide 54

Slide 54 text

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

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

Requesting XML? Wednesday, October 24, 12

Slide 58

Slide 58 text

Requesting XML? AFXMLRequestOperation Wednesday, October 24, 12

Slide 59

Slide 59 text

Requesting plist? Wednesday, October 24, 12

Slide 60

Slide 60 text

Requesting plist? AFPropertyListRequestOperation Wednesday, October 24, 12

Slide 61

Slide 61 text

Requesting raw data? Wednesday, October 24, 12

Slide 62

Slide 62 text

Requesting raw data? AFHTTPRequestOperation Wednesday, October 24, 12

Slide 63

Slide 63 text

API Clients

Slide 64

Slide 64 text

Demo: app.net client Wednesday, October 24, 12

Slide 65

Slide 65 text

What is success? 200-299 Wednesday, October 24, 12

Slide 66

Slide 66 text

What about 404? AFNetworkingErrorDomain (check response code) calls failure block Wednesday, October 24, 12

Slide 67

Slide 67 text

What about 302? call setRedirectResponseBlock: to alter behavior transparently handled for you Wednesday, October 24, 12

Slide 68

Slide 68 text

Other errors Timeout No network available 401 Unauthorized 403 Forbidden 5xx server error Wednesday, October 24, 12

Slide 69

Slide 69 text

HTTP Caching Client Server Wednesday, October 24, 12

Slide 70

Slide 70 text

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

Slide 71

Slide 71 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 24, 12

Slide 72

Slide 72 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 24, 12

Slide 73

Slide 73 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 24, 12

Slide 74

Slide 74 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 24, 12

Slide 75

Slide 75 text

Leveraging Etag on the client Client Server Wednesday, October 24, 12

Slide 76

Slide 76 text

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

Slide 77

Slide 77 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 24, 12

Slide 78

Slide 78 text

Leveraging Modified Date Client Server Wednesday, October 24, 12

Slide 79

Slide 79 text

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

Slide 80

Slide 80 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 24, 12

Slide 81

Slide 81 text

Etag/Last Modified on the Server Wednesday, October 24, 12

Slide 82

Slide 82 text

Etag/Last Modified on the Server def show Wednesday, October 24, 12

Slide 83

Slide 83 text

Etag/Last Modified on the Server def show @customer = Customer.find(params[:id]) Wednesday, October 24, 12

Slide 84

Slide 84 text

Etag/Last Modified on the Server def show @customer = Customer.find(params[:id]) fresh_when(:etag => @customer, Wednesday, October 24, 12

Slide 85

Slide 85 text

Etag/Last Modified on the Server def show @customer = Customer.find(params[:id]) fresh_when(:etag => @customer, :last_modified => @customer, Wednesday, October 24, 12

Slide 86

Slide 86 text

Etag/Last Modified on the Server def show @customer = Customer.find(params[:id]) fresh_when(:etag => @customer, :last_modified => @customer, :public => true) Wednesday, October 24, 12

Slide 87

Slide 87 text

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

Slide 88

Slide 88 text

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

Slide 89

Slide 89 text

Etag/Last Modified on the Server def show @customer = Customer.find(params[:id]) fresh_when(:etag => @customer, :last_modified => @customer, :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 24, 12

Slide 90

Slide 90 text

Cache-Control limitations Server Wednesday, October 24, 12

Slide 91

Slide 91 text

Cache-Control limitations Server Wednesday, October 24, 12

Slide 92

Slide 92 text

Cache-Control limitations Server Cache-Control: max-age: 600 Wednesday, October 24, 12

Slide 93

Slide 93 text

Cache-Control limitations Server Cache-Control: max-age: 600 Wednesday, October 24, 12

Slide 94

Slide 94 text

Cache-Control limitations Server Cache-Control: max-age: 600 Cache-Control: max-age: 600 Wednesday, October 24, 12

Slide 95

Slide 95 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 24, 12

Slide 96

Slide 96 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 24, 12

Slide 97

Slide 97 text

Reverse-Proxy Cache FTW Server Varnish / Squid / Nginx Wednesday, October 24, 12

Slide 98

Slide 98 text

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

Slide 99

Slide 99 text

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

Slide 100

Slide 100 text

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

Slide 101

Slide 101 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 24, 12

Slide 102

Slide 102 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 24, 12

Slide 103

Slide 103 text

.JLF %PO`UFWFSDBMMNFBHBJO Wednesday, October 24, 12

Slide 104

Slide 104 text

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

Slide 105

Slide 105 text

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

Slide 106

Slide 106 text

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

Slide 107

Slide 107 text

Tradeoff Fresh

Slide 108

Slide 108 text

Tradeoff Fresh

Slide 109

Slide 109 text

Caching w/ AFNetworking Leverages NSURLCache already Wednesday, October 24, 12

Slide 110

Slide 110 text

Caching w/ AFNetworking Customize if needed NSURLCache *cache = [[NSURLCache alloc] initWithMemoryCapacity:1024*1024*10 diskCapacity:1024*1024*50 diskPath:nil]; [NSURLCache setSharedURLCache:cache]; Wednesday, October 24, 12

Slide 111

Slide 111 text

Consider alternatives SDURLCache http://github.com/steipete/SDURLCache Wednesday, October 24, 12

Slide 112

Slide 112 text

Default Cache Location ~/Library/Caches/com.acme.app/Cache.db Wednesday, October 24, 12

Slide 113

Slide 113 text

Wednesday, October 24, 12

Slide 114

Slide 114 text

Switcheroo View Controller API Client Coordinator Wednesday, October 24, 12

Slide 115

Slide 115 text

Switcheroo View Controller API Client Coordinator get data Wednesday, October 24, 12

Slide 116

Slide 116 text

Switcheroo View Controller API Client Coordinator get data start request Wednesday, October 24, 12

Slide 117

Slide 117 text

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

Slide 118

Slide 118 text

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

Slide 119

Slide 119 text

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

Slide 120

Slide 120 text

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

Slide 121

Slide 121 text

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

Slide 122

Slide 122 text

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

Slide 123

Slide 123 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 24, 12

Slide 124

Slide 124 text

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

Slide 125

Slide 125 text

API Design Tips Version your API Wednesday, October 24, 12

Slide 126

Slide 126 text

API Design Tips Send OS Version, App Version, and Device Name as headers Device Name OS Version App Version Wednesday, October 24, 12

Slide 127

Slide 127 text

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

Slide 128

Slide 128 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 24, 12

Slide 129

Slide 129 text

API Design Tips Page Large Datasets Wednesday, October 24, 12

Slide 130

Slide 130 text

API Design Tips Build-in HTTP Caching support from day 1 Wednesday, October 24, 12

Slide 131

Slide 131 text

API Design Tips Take care when caching user-specific data Wednesday, October 24, 12

Slide 132

Slide 132 text

API Design Tips Turn on Gzip Compression Wednesday, October 24, 12

Slide 133

Slide 133 text

API Design Tips Measure your API response times Wednesday, October 24, 12

Slide 134

Slide 134 text

Thank you! Ben Scheirman @subdigital nsscreencast.com Wednesday, October 24, 12