Slide 1

Slide 1 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 Developer Experience: The UX of APIs Jeremiah Lee Cohick, Brian Smith, R. Kevin Nelson, Neil Mansilla 2013-03-11 #DX

Slide 2

Slide 2 text

Over the last few years, we've been studying theprocess designers (and their teams) use to make important decisions like these. In the course of our work, we've discovered there are five common styles of design that almost every team uses: (1) Unintended, (2) Self, (3) Genius, (4) Activity Focused, and (5) Experience Focused. -- User Interface Engineering

Slide 3

Slide 3 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 AGENDA 3:30 - Jeremiah Cohick design methodologies conducting user research UX hierarchy of needs design patterns from the real world 4:30 - Break 4:40 - Brian Smith SDK Design 5:10 - Panel Discussion Brian Smith Kevin Nelson Neil Mansilla

Slide 4

Slide 4 text

UX IS EMPATHY AS AN APPLIED SCIENCE

Slide 5

Slide 5 text

SUPPORTING THIRD- PARTY DEVELOPERS TAKES MORE THAN CODE

Slide 6

Slide 6 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 7

Slide 7 text

Over the last few years, we've been studying the process designers (and their teams) use to make important decisions like these. In the course of our work, we've discovered there are five common styles of design that almost every team uses: (1) Unintended, (2) Self, (3) Genius, (4) Activity Focused, and (5) Experience Focused. -- User Interface Engineering

Slide 8

Slide 8 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 9

Slide 9 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 10

Slide 10 text

Unintended design happens when the team focuses on the act of development and deployment without any consideration of what will happen when people try to use it. — User Interface Engineering

Slide 11

Slide 11 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 12

Slide 12 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 13

Slide 13 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 14

Slide 14 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 15

Slide 15 text

Before you design, you figure out what needs to be accomplished. The research will drive the design. — Jared Spool

Slide 16

Slide 16 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources

Slide 17

Slide 17 text

Not just discrete activities, but all the things that happen between activities. — UIE

Slide 18

Slide 18 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 19

Slide 19 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 20

Slide 20 text

— UIE Not just discrete activities, but all the things that happen between activities.

Slide 21

Slide 21 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 22

Slide 22 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 Used by permission. © 2012 The LEGO Group.

Slide 23

Slide 23 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 USE EXPERIENCE DESIGN WHEN Game changing innovation is *truly* a top priority A holistic experience would be greatly valued by the user You have the resources to invest into in-depth, 1:1 user research, preferably before you design an API

Slide 24

Slide 24 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 FIVE COMMON STYLES OF DESIGN Unintentional Self Genius Activity Focused Experienced Focused Research, Costs, Time, Resources initial focus on complexity and ease of use developing for users beyond ourselves designing something we've never designed before need to fill the gaps between activities

Slide 25

Slide 25 text

CONDUCTING USER RESEARCH

Slide 26

Slide 26 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 Market Research User Experience Research What people say What people do

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 Market Research User Experience Research What people say What people do What people will buy How people use a product or service Demographics Ethnographics

Slide 29

Slide 29 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 30

Slide 30 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 Market Research User Experience Research What people say What people do What people will buy How people use a product or service Demographics Ethnographics Large sample sizes Small sample sizes Broad insight Deep, focused insight

Slide 31

Slide 31 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 5 STEPS OF USER RESEARCH 1. Identify research method 2. Figure out who to interview 3. Conduct the research 4. Review findings 5. Act on the findings

Slide 32

Slide 32 text

1: IDENTIFY RESEARCH METHOD

Slide 33

Slide 33 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 METHODS OF USER RESEARCH user interviews contextual inquiries questionnaires focus groups card sorting eye-tracking click tracking tree tests journaling

Slide 34

Slide 34 text

2. FIGURE OUT WHO TO INTERVIEW

Slide 35

Slide 35 text

3. CONDUCT THE RESEARCH

Slide 36

Slide 36 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 CONDUCT THE RESEARCH Inform user that they are not being tested Ask user to think aloud as they work Confirm that they consent to being recorded

Slide 37

Slide 37 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 AS THEY WORK How do they get started? Time from desire to first request. How do they find and utilize documentation? How do they discover where to register or update configuration settings with you. What is their debugging process? What errors do they encounter and how do they diagnose and resolve them? How do they verify that they have properly integrated the API? What causes them to feel confident to push to production?

Slide 38

Slide 38 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 OTHER OBSERVATIONS Who made the decision to use your API? Are you replacing or augmenting existing functionality? Are you a new feature? What's their level of familiarity with the process that's being fulfilled? What external resources outside do they need to complete the tasks with your API? Are there interactions between the end users that you're uniquely facilitating for them?

Slide 39

Slide 39 text

4. REVIEW FINDINGS

Slide 40

Slide 40 text

5. ACT ON FINDINGS

Slide 41

Slide 41 text

Rocket Surgery Made Easy: The Do-It-Yourself Guide to Finding and Fixing Usability Problems — Steven Krug

Slide 42

Slide 42 text

ELEMENTS OF A GREAT API DESIGN

Slide 43

Slide 43 text

THE SECRET TO MACHINES TALKING TO MACHINES IS TO BE HUMAN

Slide 44

Slide 44 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 UX HIERARCHY OF NEEDS PLEASURABLE USABLE RELIABLE FUNCTIONAL — Aarron Walter, “Designing For Emotion”

Slide 45

Slide 45 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 46

Slide 46 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 UX HIERARCHY OF NEEDS PLEASURABLE USABLE RELIABLE FUNCTIONAL — Aarron Walter, “Designing For Emotion”

Slide 47

Slide 47 text

Amazon has both SOAP and REST interfaces to their web services, and 85% of their usage is of the REST interface. — Jeff Barr, Amazon, Chief Web Services Evangelist

Slide 48

Slide 48 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 UX HIERARCHY OF NEEDS PLEASURABLE USABLE RELIABLE FUNCTIONAL — Aarron Walter, “Designing For Emotion”

Slide 49

Slide 49 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 50

Slide 50 text

Slide 51

Slide 51 text

SOAP: 51,393 vs. cURL: 9,041

Slide 52

Slide 52 text

quotes Nelson Content-Type text/plain family Muntz 5 a9a7b886d6241bf9b1c61be666e9 chriscustomer FULL_CONTROL http://acs.amazonaws.com/groups/global/AllUsers READ AKIAIOSFODNN7EXAMPLE 2007-05-11T12:00:00.183Z Iuyz3d3P0aTou39dzbqaEXAMPLE=

Slide 53

Slide 53 text

PUT /my-image.jpg HTTP/1.1 Host: myBucket.s3.amazonaws.com Date: Wed, 12 Oct 2009 17:50:00 GMT Authorization: AWS AKIAIOSFODNN7EXAMPLE:xQE0diMbLRepdf3YB +FIEXAMPLE= Content-Type: text/plain Content-Length: 11434 Expect: 100-continue [11434 bytes of object data]

Slide 54

Slide 54 text

DX DESIGN PATTERNS

Slide 55

Slide 55 text

We'll begin with a recap of REST, Representational State Transfer 1

Slide 56

Slide 56 text

REST Recap GET /orders -> Find all orders (200 OK) POST /orders -> Create a new order (201 Created) GET /orders/123 -> Find Order #123 (200 OK) PUT /orders/123 -> Update Order #123 (200 OK) DELETE /orders/123 -> Delete Order # 123 (204 No Content) 1

Slide 57

Slide 57 text

REST Recap GET /orders Accept: application/json 1

Slide 58

Slide 58 text

URL parameters or JSON input? 2

Slide 59

Slide 59 text

URL parameters or JSON input? /orders?order_date=2013-03-10 2

Slide 60

Slide 60 text

URL parameters or JSON input? PUT /orders/123 Accept: application/json { "customer_id": 948, "order_date": "2013-03-10", "shipping_address": … } 2

Slide 61

Slide 61 text

It's ok to break the REST architecture in the name of UX 3

Slide 62

Slide 62 text

Breaking REST for UX PUT /orders/123.json?body={"customer_id": 948,"order_date": "2013-03-10","shipping_address": …} 3

Slide 63

Slide 63 text

Considerations for parameter names 4

Slide 64

Slide 64 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 4 - PARAMETER NAMES Don't abbreviate parameter names. Pick a naming convention and don't deviate: camelCase, hyphenated-nouns, underscored_nouns HTML id and classes should not use underscores, but JavaScript object keys should not use hyphens, and camelCasing introduces error-prone case sensitivity. Pick one and stick with it. Booleans should use 'true' and 'false'. 1/0 and t/f are not explicit. Dates should be represented as a subset ISO 8601 (2013-03-22T12:00:00.0Z). Assume dates passed to the server are in UTC.

Slide 65

Slide 65 text

4 ISO 8601 was published on 06/05/88 and most recently amended on 12/01/04. http://xkcd.com/1179/

Slide 66

Slide 66 text

Don't expose internal IDs 5

Slide 67

Slide 67 text

Pagination 6

Slide 68

Slide 68 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 6 - PAGINATION To modify the results, use: a 'sort_type' parameter to specify which attribute to sort on a 'sort_order' parameter to specify ascending or descending a 'per_page' parameter to specify the number of results per page a 'page' parameter to specify which page an 'offset' parameter to specify the number of records to offset the results by that would override the 'page' parameter

Slide 69

Slide 69 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 6 - PAGINATION And in the results returned, it's useful to have a pagination object that notes: the current page the current offset the last offset to denote when you're out of results

Slide 70

Slide 70 text

Pagination { "orders": [], "pagination": { "per_page": 6, "offset": 37, "last_offset": 40, "total_results": 40 } } 6

Slide 71

Slide 71 text

Provide awesome errors 7

Slide 72

Slide 72 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 7 - PROVIDE AWESOME ERRORS 400 Bad Request 401 Unauthorized 404 Not Found 405 Method Not Allowed 409 Conflict 410 Gone 500 Internal Server Error 503 Service Unavailable

Slide 73

Slide 73 text

Provide awesome errors { "error": { "type": "invalid_request_error", "message": "You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/ api#authentication for details, or we can help at https:// support.stripe.com/." } } 7

Slide 74

Slide 74 text

Provide smart caching headers 8

Slide 75

Slide 75 text

Rate limits 9

Slide 76

Slide 76 text

Rate limits X-FeatureRateLimit-Limit X-FeatureRateLimit-Remaining X-FeatureRateLimit-Reset 9

Slide 77

Slide 77 text

Batch endpoints 10

Slide 78

Slide 78 text

Batch endpoints curl \ -F 'access_token=…' \ -F 'batch=[{"method":"GET", "relative_url":"me"},{"method":"GET", "relative_url":"me/friends?limit=50"}]' \ https://graph.facebook.com [ { "code": 200, "headers":[ { "name": "Content-Type", "value": "text/javascript; charset=UTF-8" } ], "body": "{\"id\":\"…\"}"}, { "code": 200, "headers":[ { "name":"Content-Type", "value":"text/javascript; charset=UTF-8"} ], "body":"{\"data\": [{…}]}} ] 10

Slide 79

Slide 79 text

HTTPS 11

Slide 80

Slide 80 text

Offer CORS and JSON-P 12

Slide 81

Slide 81 text

Offer CORS and JSON-P /orders?callback=foo function foo(data) { /* do something */ } foo({"real_data":true, "id": 123}); Go to http://enable-cors.org/ to learn more. 12

Slide 82

Slide 82 text

OAuth 1 vs OAuth 2 vs API keys 13

Slide 83

Slide 83 text

Versioning 14

Slide 84

Slide 84 text

Webhooks 15

Slide 85

Slide 85 text

OEmbed 16

Slide 86

Slide 86 text

OEmbed http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch %3Fv%3DbDOYN-6gdRE { "provider_url": "http://www.youtube.com/", "author_name": "schmoyoho", "provider_name": "YouTube", "height": 344, "thumbnail_height": 360, "thumbnail_url": "http://i3.ytimg.com/vi/bDOYN-6gdRE/hqdefault.jpg", "type": "video", "version": "1.0", "thumbnail_width": 480, "html": "", "title": "Auto-Tune the News #8: dragons. geese. Michael Vick. (ft. T- Pain)", "author_url": "http://www.youtube.com/user/schmoyoho", "width": 459 } 16

Slide 87

Slide 87 text

Play to your strengths 17

Slide 88

Slide 88 text

Play to your strengths 17

Slide 89

Slide 89 text

Leverage infrastructure to assist non- functional requirements 18

Slide 90

Slide 90 text

Documentation 19

Slide 91

Slide 91 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 19 - API DOCUMENTATION HTTP Method Input parameters data type required? default value? all possible values? what it does Error Codes Related endpoints Rate Limit? Common use cases

Slide 92

Slide 92 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2

Slide 93

Slide 93 text

Testing accounts or environments 20

Slide 94

Slide 94 text

Logging 21

Slide 95

Slide 95 text

[status.you-api.com] 22

Slide 96

Slide 96 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 22 - API STATUS EXAMPLES https://status.github.com/ http://status.twilio.com/ https://developers.facebook.com/live_status

Slide 97

Slide 97 text

Support channels 23

Slide 98

Slide 98 text

Public Bug Reports and status 24

Slide 99

Slide 99 text

Developer Showcase 25

Slide 100

Slide 100 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 25 - DEVELOPER SHOWCASE Box.net: https://www.box.com/apps/ Eventbrite: http://eventbrite.com/partners Evernote: http://trunk.evernote.com/ Foursquare: https://foursquare.com/apps/ Pocket: http://getpocket.com/apps/ Salesforce App Exchange: https://appexchange.salesforce.com/

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 BREAK! 2013.03.11

Slide 103

Slide 103 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 SDK DESIGN Brian Smith, Dropbox 2013.03.11

Slide 104

Slide 104 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 PANEL DISCUSSION Brian Smith API Engineering Lead Dropbox R. Kevin Nelson API Engineer Rdio Neil Mansilla Director, Developer Platform and Partnerships Mashery Jeremiah Cohick

Slide 105

Slide 105 text

SLIDE TITLE BLOCK Item 1 sub item 1 sub item 2 sub item 3 Item 2 sub item 1 Item 3 sub item 1 sub item 2 http://dx.jeremiahlee.com/ THANKS FOR ATTENDING content available: Please support: