SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Your API is a UIChristopher Hoult
Your API is a UI @choult
Who is this guy?
“We’re Hiring”
Previously...
I also act
Credit: Richard Brown
YMMV
http://bit.ly/1yvvYb5
Your API is a UI @choult
What is a UI?
A “space where interactions between humans and
machines occur. The goal of this interaction is effective
operation and control of the machine on the user’s end,
and feedback from the machine, which aids the operator
in making operational decisions.”
Wikipedia
Your API is a UI @choult
What is an API?
“An application programming interface (API) specifies
a software component in terms of its operations, their
inputs and outputs and underlying types. Its main
purpose is to define a set of functionalities that are
independent of their respective implementation, allowing
both definition and implementation to vary without
compromising each other.”
Wikipedia
Users
http://bit.ly/1DMivvR
Your API is a UI @choult
Who are your users?
•	Developers
•	Colleagues
•	Customers
•	Their Customers
•	Applications
Your API is a UI @choult
What does your API do?
•	Real use cases
•	User stories
•	Document usage/flow
•	Sell your API
Your API is a UI @choult
What can users do?
•	Why are you exposing an API?
•	It’s very rare to expose everything
•	Too much complexity -> confusion
•	Define restrictions
•	Validate user stories against goals
Your API is a UI @choult
API Hierarchy of Needs
APIUX.com: http://bit.ly/Zl8Exo
Usability
http://bit.ly/1DWUcva
Your API is a UI @choult
Consistency
•	Improves comfort for user
•	Style guide (PSR-1/2; REST etc.)
•	Common attributes/functions
•	Naming
•	Error codes
Your API is a UI @choult
Patterns
•	Users understand Patterns
•	Patterns aid understanding
•	Webservices: RPC, REST
•	Code: Gang of Four etc.
Your API is a UI @choult
Information Hierarchy
•	Define ERM
•	Arrange entry points from user POV
•	Nesting entities can be problematic
•	Get it right: classes and objects intuitive
Your API is a UI @choult
Abstraction
•	User stories guide API design
•	Hide complexity
•	Avoid adhering to underlying model
•	Do the hard work so users don’t have to
Your API is a UI @choult
Simplicity
•	Best result of abstraction
•	More straightforward, more use
•	Smaller footprint = fewer failure paths
•	Easy fault detection
Your API is a UI @choult
Extensibility
•	Flipside to abstraction
•	How will users extend codebase?
•	Restrict as required - public/protected/private
•	Take care - hard to retract public
•	Patterns help here!
Functionality
& Reliability
http://bit.ly/109m7bG
(Oh, so he does do colour!)
Your API is a UI @choult
Testing
•	Use appropriate testing methodology
•	Make part of build/release process
•	Monitor production with live testing
•	Consider record/replay testing
•	Regression testing
Your API is a UI @choult
Metrics
•	Metrics tell you what is happening
•	Record status codes
•	Calibrate with normal running
•	Insight into running code
•	Graphite/statsd
Your API is a UI @choult
Logging
•	Tells you what happened
•	Helps debug production faults
•	Reference in error messages
•	Insight into running applications
•	Information for users of code
Your API is a UI @choult
Versioning
•	Plan versioning upfront
•	Define upgrade/deprecation strategy
•	What is a breaking change?
•	How long will API be supported?
•	Communicate with users
Your API is a UI @choult
Feedback
•	 Clear feedback
•	 Reasons for failure
•	 Appropriate language
•	 Error codes
•	Normalized; human readable
•	Provide glossary
Proficiency
http://bit.ly/1rJmLHJ
Your API is a UI @choult
Documentation
•	No such thing as “self-documenting code”
•	Write fulsome documentation
•	Include working examples
•	Cross-link from code
•	Manuals, Quick Start Guides, Cookbooks
Your API is a UI @choult
Living Documentation
•	Docblocks (Javadoc/PHPdoc) are a good start
•	Cross-language (eg Doxygen)
•	Use standards like PSR 5
•	Annotations
•	Interactive documentation - eg. IODocs
Your API is a UI @choult
Support / Community
•	 Define channels of communication
•	 Define location for participation
•	 Invite feedback
•	 Invite contribution - define guidelines
•	 Respond gracefully and attentively
•	 Learn from your users
Creativity
http://bit.ly/109m7bG
Your API is a UI @choult
<Inspirational Title>
•	Flexibility
•	Extensibility
•	Serendipity
•	Outreach
•	Encouragement
Pragmatism
http://bit.ly/1votyWc
Your API is a UI @choult
On Pragmatism
•	Pragmatism is good!
•	Can promote technical debt
•	Find a balance - RESTlike, RPCish
•	Be realistic
•	Iterate - versioning and deprecation
Take Pride
http://bit.ly/1xCeQ1W
Your API is a UI @choult
Your API is You!
•	Like your UI, your API is your public face
•	It is your avatar
•	Take pride in your work
•	Impress your users with its awesomeness!
Questions?
http://bit.ly/1npSVI6
Your API is a UI @choult
Thank you!
@choult
christopherhoult
chris@choult.com@
This presentation was typeset in HandTIMES and Open Sans, using Adobe InDesign CS6
(because I’m a lunatic)
Feedback please! https://joind.in/13392
Your API is a UI @choult
Resources / Inspiration
10 User Interface Design Fundamentals - Kyle Sollenberger
http://blog.teamtreehouse.com/10-user-interface-design-fundamentals
APIUX: API Hierarchy of Needs
http://apiux.com/2013/05/29/api-hierarchy-needs/
5 Golden Rules for Great Web API Design - Jordan Ambra
http://www.toptal.com/api-developers/5-golden-rules-for-designing-a-great-web-api

Más contenido relacionado

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Your API is a UI

  • 1. Your API is a UIChristopher Hoult
  • 2. Your API is a UI @choult Who is this guy? “We’re Hiring” Previously...
  • 3. I also act Credit: Richard Brown
  • 5. Your API is a UI @choult What is a UI? A “space where interactions between humans and machines occur. The goal of this interaction is effective operation and control of the machine on the user’s end, and feedback from the machine, which aids the operator in making operational decisions.” Wikipedia
  • 6. Your API is a UI @choult What is an API? “An application programming interface (API) specifies a software component in terms of its operations, their inputs and outputs and underlying types. Its main purpose is to define a set of functionalities that are independent of their respective implementation, allowing both definition and implementation to vary without compromising each other.” Wikipedia
  • 8. Your API is a UI @choult Who are your users? • Developers • Colleagues • Customers • Their Customers • Applications
  • 9. Your API is a UI @choult What does your API do? • Real use cases • User stories • Document usage/flow • Sell your API
  • 10. Your API is a UI @choult What can users do? • Why are you exposing an API? • It’s very rare to expose everything • Too much complexity -> confusion • Define restrictions • Validate user stories against goals
  • 11. Your API is a UI @choult API Hierarchy of Needs APIUX.com: http://bit.ly/Zl8Exo
  • 13. Your API is a UI @choult Consistency • Improves comfort for user • Style guide (PSR-1/2; REST etc.) • Common attributes/functions • Naming • Error codes
  • 14. Your API is a UI @choult Patterns • Users understand Patterns • Patterns aid understanding • Webservices: RPC, REST • Code: Gang of Four etc.
  • 15. Your API is a UI @choult Information Hierarchy • Define ERM • Arrange entry points from user POV • Nesting entities can be problematic • Get it right: classes and objects intuitive
  • 16. Your API is a UI @choult Abstraction • User stories guide API design • Hide complexity • Avoid adhering to underlying model • Do the hard work so users don’t have to
  • 17. Your API is a UI @choult Simplicity • Best result of abstraction • More straightforward, more use • Smaller footprint = fewer failure paths • Easy fault detection
  • 18. Your API is a UI @choult Extensibility • Flipside to abstraction • How will users extend codebase? • Restrict as required - public/protected/private • Take care - hard to retract public • Patterns help here!
  • 20. Your API is a UI @choult Testing • Use appropriate testing methodology • Make part of build/release process • Monitor production with live testing • Consider record/replay testing • Regression testing
  • 21. Your API is a UI @choult Metrics • Metrics tell you what is happening • Record status codes • Calibrate with normal running • Insight into running code • Graphite/statsd
  • 22.
  • 23. Your API is a UI @choult Logging • Tells you what happened • Helps debug production faults • Reference in error messages • Insight into running applications • Information for users of code
  • 24. Your API is a UI @choult Versioning • Plan versioning upfront • Define upgrade/deprecation strategy • What is a breaking change? • How long will API be supported? • Communicate with users
  • 25. Your API is a UI @choult Feedback • Clear feedback • Reasons for failure • Appropriate language • Error codes • Normalized; human readable • Provide glossary
  • 27. Your API is a UI @choult Documentation • No such thing as “self-documenting code” • Write fulsome documentation • Include working examples • Cross-link from code • Manuals, Quick Start Guides, Cookbooks
  • 28. Your API is a UI @choult Living Documentation • Docblocks (Javadoc/PHPdoc) are a good start • Cross-language (eg Doxygen) • Use standards like PSR 5 • Annotations • Interactive documentation - eg. IODocs
  • 29. Your API is a UI @choult Support / Community • Define channels of communication • Define location for participation • Invite feedback • Invite contribution - define guidelines • Respond gracefully and attentively • Learn from your users
  • 31. Your API is a UI @choult <Inspirational Title> • Flexibility • Extensibility • Serendipity • Outreach • Encouragement
  • 33. Your API is a UI @choult On Pragmatism • Pragmatism is good! • Can promote technical debt • Find a balance - RESTlike, RPCish • Be realistic • Iterate - versioning and deprecation
  • 35. Your API is a UI @choult Your API is You! • Like your UI, your API is your public face • It is your avatar • Take pride in your work • Impress your users with its awesomeness!
  • 37. Your API is a UI @choult Thank you! @choult christopherhoult chris@choult.com@ This presentation was typeset in HandTIMES and Open Sans, using Adobe InDesign CS6 (because I’m a lunatic) Feedback please! https://joind.in/13392
  • 38. Your API is a UI @choult Resources / Inspiration 10 User Interface Design Fundamentals - Kyle Sollenberger http://blog.teamtreehouse.com/10-user-interface-design-fundamentals APIUX: API Hierarchy of Needs http://apiux.com/2013/05/29/api-hierarchy-needs/ 5 Golden Rules for Great Web API Design - Jordan Ambra http://www.toptal.com/api-developers/5-golden-rules-for-designing-a-great-web-api