SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
BUILDING REST APIS THAT DON’T
SUCK FOR MODERN DAY SPAS
Adewale Abati
ABATI “ACEKYD” ADEWALE
Web Engineer
Community Manager &
Developer Advocate @
Ingressive
Open source Enthusiast
YouTuber
Gamer & Basketballer
WHO AM I?
@acekyd @ace_kyd
BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS
WHAT WE WOULD BE TALKING ABOUT
What are Single Page Applications
How do REST APIs come in
Common Practices for REST API structures.
API Accessibility tips
Documentation tips
Error handling and status codes tips
Differences in building private APIs from experience.
WHAT ARE SINGLE PAGE APPLICATIONS?
A single page application also known as SPA is a web
application or website that interacts with the user by
dynamically rewriting the current page rather than
loading entire new pages from a server.
It does not require page reloading during use by relying on the features
and capabilities of modern web browsers.
WHAT ARE SINGLE PAGE APPLICATIONS?
SINGLE PAGE APPLICATIONS ARE AS A RESULT OF
Modern browsers
JavaScript becoming increasingly powerful
HTML5 capabilities
Heightened focus on user interfaces and experience
COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPLICATIONS
COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPS
…and many more…
HOW DO REST APIS
COME IN?
A RESTful API is a standard pattern for APIs
that use HTTP requests to GET, PUT, POST
and DELETE data.
HOW DO REST APIS COME IN?
Source:https://msdn.microsoft.com/en-us/magazine/dn463786.aspx
API ACCESSIBILITY TIPS
BUILDING AN ACCESSIBLE API
Users should be able to get up and running with a basic
implementation of your API in about 15 minutes
Think in resources for endpoints.
Think nouns not verbs. Leave verbs to request methods.
Same endpoint structure (plural endpoints) - Be consistent
Avoid breaking changes to existing endpoints.
Performance and speed are important.
THINK IN RESOURCES FOR ENDPOINTS
API ACCESSIBILITY TIPS
NOUNS NOT VERBS. LEAVE VERBS FOR REQUEST METHODS
API ACCESSIBILITY TIPS
AVOID BREAKING CHANGES
API ACCESSIBILITY TIPS
DOCUMENTATION BEST PRACTICES
First entry point for users
Include a tutorial or summary of what can be done with
the API
Include example requests and responses
Use generators or tools to create nice documentation.
Provide information on each endpoint.
DOCUMENTATION BEST PRACTICES
DOCUMENTATION BEST PRACTICES
INCLUDE SUMMARY FOR API
The Twilio REST API quickly highlights all the things you
can do with their API. Giving you an idea of the features
available to you at a glance.
DOCUMENTATION BEST PRACTICES
INCLUDE TUTORIALS WHERE POSSIBLE FOR API
DOCUMENTATION BEST PRACTICES
INCLUDE TUTORIALS WHERE POSSIBLE FOR API
DOCUMENTATION BEST PRACTICES
EXAMPLE REQUESTS AND RESPONSES
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
APIDOCjs.com
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
swagger.io
COMMON TOOLS FOR MAKING API DOCUMENTATION
DOCUMENTATION BEST PRACTICES
https://spectrum.chat/slate
HANDLING ERRORS, RESPONSES & STATUS CODES
HANDLING ERRORS, RESPONSES & STATUS CODES
Validation - Validate everything
Be consistent with your response format.
Use common status codes with responses
2xx (Success category) - 200 Ok, 201 Created, 204 No content
3xx (Redirection category) - 304 Not Modified
4xx (Client Error category) - 400 Bad Request, 401 Unauthorized, 403
Forbidden, 404 Not Found
5xx (Server Error category) - 500 Internal Server Error, 503 Service
Unavailable.
PRIVATE API
BUILDING A PRIVATE API
Look at UI designs before implementing API
Recommended to have an understanding of how the
frontend app works to better know how to present data
Start with authentication before going deep into the API
features when necessary.
Maintain good documentation.
QUESTIONS?@acekyd @ace_kyd

Contenu connexe

Tendances

Response Visualizations in Postman
Response Visualizations in PostmanResponse Visualizations in Postman
Response Visualizations in PostmanPostman
 
On the shoulders of giants Learning About API Design by Looking Backwards
On the shoulders of giants Learning About API Design by Looking Backwards On the shoulders of giants Learning About API Design by Looking Backwards
On the shoulders of giants Learning About API Design by Looking Backwards CA API Management
 
Building APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDBBuilding APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDBCharlie Key
 
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays
 
Top 5 Ways To Increase API Adoption
Top 5 Ways To Increase API AdoptionTop 5 Ways To Increase API Adoption
Top 5 Ways To Increase API AdoptionProgrammableWeb
 
APIs for your Business + Stages of the API Lifecycle
APIs for your Business + Stages of the API LifecycleAPIs for your Business + Stages of the API Lifecycle
APIs for your Business + Stages of the API Lifecycle3scale
 
Open APIs and the Semantic Web 2011
Open APIs and the Semantic Web 2011Open APIs and the Semantic Web 2011
Open APIs and the Semantic Web 2011John Musser
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsTimmy Kokke
 
API Architecture
API ArchitectureAPI Architecture
API ArchitectureRyan Kolak
 
Your API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductYour API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductProgrammableWeb
 
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflixapidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflixapidays
 
apidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays LIVE New York - API Code First vs Design First by Phil Sturgeonapidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays LIVE New York - API Code First vs Design First by Phil Sturgeonapidays
 
Android Instant Apps testing
Android Instant Apps testingAndroid Instant Apps testing
Android Instant Apps testingDiana Pinchuk
 
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...apidays
 
Hybrid app development
Hybrid app developmentHybrid app development
Hybrid app developmentHarshul Shah
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out3scale
 
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapDroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapAyushman Jain
 

Tendances (20)

Response Visualizations in Postman
Response Visualizations in PostmanResponse Visualizations in Postman
Response Visualizations in Postman
 
On the shoulders of giants Learning About API Design by Looking Backwards
On the shoulders of giants Learning About API Design by Looking Backwards On the shoulders of giants Learning About API Design by Looking Backwards
On the shoulders of giants Learning About API Design by Looking Backwards
 
Angular Universal
Angular UniversalAngular Universal
Angular Universal
 
Building APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDBBuilding APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDB
 
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
 
Top 5 Ways To Increase API Adoption
Top 5 Ways To Increase API AdoptionTop 5 Ways To Increase API Adoption
Top 5 Ways To Increase API Adoption
 
APIs for your Business + Stages of the API Lifecycle
APIs for your Business + Stages of the API LifecycleAPIs for your Business + Stages of the API Lifecycle
APIs for your Business + Stages of the API Lifecycle
 
Open APIs and the Semantic Web 2011
Open APIs and the Semantic Web 2011Open APIs and the Semantic Web 2011
Open APIs and the Semantic Web 2011
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
API Architecture
API ArchitectureAPI Architecture
API Architecture
 
WordCamp Bucharest 2017
WordCamp Bucharest 2017WordCamp Bucharest 2017
WordCamp Bucharest 2017
 
Your API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductYour API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A Product
 
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflixapidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
apidays LIVE Hong Kong 2021 - Less Data is More by Damir Svrtan, Netflix
 
apidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays LIVE New York - API Code First vs Design First by Phil Sturgeonapidays LIVE New York - API Code First vs Design First by Phil Sturgeon
apidays LIVE New York - API Code First vs Design First by Phil Sturgeon
 
Android Instant Apps testing
Android Instant Apps testingAndroid Instant Apps testing
Android Instant Apps testing
 
API Design Approach
API Design ApproachAPI Design Approach
API Design Approach
 
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
 
Hybrid app development
Hybrid app developmentHybrid app development
Hybrid app development
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out
 
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using PhonegapDroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
 

Similaire à Building REST APIs that don't suck for modern day SPAs

INTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API FirstINTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API Firstapidays
 
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...apidays
 
A_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdfA_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdfPamRobert
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIsReda Hmeid MBCS
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJordan Open Source Association
 
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...Polyxer Systems
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture StrategyOCTO Technology
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
Accidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIAccidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIMarjukka Niinioja
 
Rebooting APIs at scale
Rebooting APIs at scaleRebooting APIs at scale
Rebooting APIs at scaleRahul Dighe
 
Things you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationThings you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationAndolasoft Inc
 
api_101
api_101api_101
api_101samir
 
The Next Step to Build Better APIs — Consistent Data Structure
The Next Step to Build Better APIs — Consistent Data StructureThe Next Step to Build Better APIs — Consistent Data Structure
The Next Step to Build Better APIs — Consistent Data StructureDialexa
 
6 Best OpenAPI Documentation Tools that You must Know
6 Best OpenAPI Documentation Tools that You must Know6 Best OpenAPI Documentation Tools that You must Know
6 Best OpenAPI Documentation Tools that You must KnowMars Devs
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers LoveJamison K. Bell | OvenPOP 360
 

Similaire à Building REST APIs that don't suck for modern day SPAs (20)

INTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API FirstINTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API First
 
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
apidays LIVE Helsinki & North 2022_How to Win Friends and Influence People wi...
 
Api design part 1
Api design part 1Api design part 1
Api design part 1
 
A_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdfA_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdf
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIs
 
Your API is not a Website!
Your API is not a Website!Your API is not a Website!
Your API is not a Website!
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best Practices
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
Accidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new APIAccidental API developer - the 12 month pregnancy to create new API
Accidental API developer - the 12 month pregnancy to create new API
 
Rebooting APIs at scale
Rebooting APIs at scaleRebooting APIs at scale
Rebooting APIs at scale
 
Things you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationThings you must know on ruby on rails single page application
Things you must know on ruby on rails single page application
 
api_101
api_101api_101
api_101
 
The Next Step to Build Better APIs — Consistent Data Structure
The Next Step to Build Better APIs — Consistent Data StructureThe Next Step to Build Better APIs — Consistent Data Structure
The Next Step to Build Better APIs — Consistent Data Structure
 
6 Best OpenAPI Documentation Tools that You must Know
6 Best OpenAPI Documentation Tools that You must Know6 Best OpenAPI Documentation Tools that You must Know
6 Best OpenAPI Documentation Tools that You must Know
 
Web API Design
Web API DesignWeb API Design
Web API Design
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
 

Plus de Abati Adewale

Web performance as rocket science
Web performance as rocket scienceWeb performance as rocket science
Web performance as rocket scienceAbati Adewale
 
World Festival - Reimagining web development in your browser.pdf
World Festival - Reimagining web development in your browser.pdfWorld Festival - Reimagining web development in your browser.pdf
World Festival - Reimagining web development in your browser.pdfAbati Adewale
 
Reimagining web development in your browser.pdf
Reimagining web development in your browser.pdfReimagining web development in your browser.pdf
Reimagining web development in your browser.pdfAbati Adewale
 
Supercharging your career with Social currency - OSCAFEST 2022.pdf
Supercharging your career with Social currency - OSCAFEST 2022.pdfSupercharging your career with Social currency - OSCAFEST 2022.pdf
Supercharging your career with Social currency - OSCAFEST 2022.pdfAbati Adewale
 
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox Abati Adewale
 
Improving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxImproving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxAbati Adewale
 
A look into open source in nigeria
A look into open source in nigeriaA look into open source in nigeria
A look into open source in nigeriaAbati Adewale
 
Introduction to Open Source - What, Why and How to Contribute
Introduction to Open Source - What, Why and How to ContributeIntroduction to Open Source - What, Why and How to Contribute
Introduction to Open Source - What, Why and How to ContributeAbati Adewale
 
Open source - An enabler for the next billion users
Open source - An enabler for the next billion usersOpen source - An enabler for the next billion users
Open source - An enabler for the next billion usersAbati Adewale
 
Finding your place - University of Ilorin
Finding your place - University of IlorinFinding your place - University of Ilorin
Finding your place - University of IlorinAbati Adewale
 
Gathered App Demo Slides
Gathered App Demo SlidesGathered App Demo Slides
Gathered App Demo SlidesAbati Adewale
 
Practical Approach To Contributing To Open Source - Forloop Ibadan
Practical Approach To Contributing To Open Source - Forloop IbadanPractical Approach To Contributing To Open Source - Forloop Ibadan
Practical Approach To Contributing To Open Source - Forloop IbadanAbati Adewale
 
Meet Alat.ng - Product Hunt Lagos
Meet Alat.ng - Product Hunt LagosMeet Alat.ng - Product Hunt Lagos
Meet Alat.ng - Product Hunt LagosAbati Adewale
 
Design Considerations For Side Projects - Product Hunt Lagos
Design Considerations For Side Projects - Product Hunt LagosDesign Considerations For Side Projects - Product Hunt Lagos
Design Considerations For Side Projects - Product Hunt LagosAbati Adewale
 
Ajo Africa - Product Hunt Lagos
Ajo Africa - Product Hunt LagosAjo Africa - Product Hunt Lagos
Ajo Africa - Product Hunt LagosAbati Adewale
 

Plus de Abati Adewale (15)

Web performance as rocket science
Web performance as rocket scienceWeb performance as rocket science
Web performance as rocket science
 
World Festival - Reimagining web development in your browser.pdf
World Festival - Reimagining web development in your browser.pdfWorld Festival - Reimagining web development in your browser.pdf
World Festival - Reimagining web development in your browser.pdf
 
Reimagining web development in your browser.pdf
Reimagining web development in your browser.pdfReimagining web development in your browser.pdf
Reimagining web development in your browser.pdf
 
Supercharging your career with Social currency - OSCAFEST 2022.pdf
Supercharging your career with Social currency - OSCAFEST 2022.pdfSupercharging your career with Social currency - OSCAFEST 2022.pdf
Supercharging your career with Social currency - OSCAFEST 2022.pdf
 
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
 
Improving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxImproving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandbox
 
A look into open source in nigeria
A look into open source in nigeriaA look into open source in nigeria
A look into open source in nigeria
 
Introduction to Open Source - What, Why and How to Contribute
Introduction to Open Source - What, Why and How to ContributeIntroduction to Open Source - What, Why and How to Contribute
Introduction to Open Source - What, Why and How to Contribute
 
Open source - An enabler for the next billion users
Open source - An enabler for the next billion usersOpen source - An enabler for the next billion users
Open source - An enabler for the next billion users
 
Finding your place - University of Ilorin
Finding your place - University of IlorinFinding your place - University of Ilorin
Finding your place - University of Ilorin
 
Gathered App Demo Slides
Gathered App Demo SlidesGathered App Demo Slides
Gathered App Demo Slides
 
Practical Approach To Contributing To Open Source - Forloop Ibadan
Practical Approach To Contributing To Open Source - Forloop IbadanPractical Approach To Contributing To Open Source - Forloop Ibadan
Practical Approach To Contributing To Open Source - Forloop Ibadan
 
Meet Alat.ng - Product Hunt Lagos
Meet Alat.ng - Product Hunt LagosMeet Alat.ng - Product Hunt Lagos
Meet Alat.ng - Product Hunt Lagos
 
Design Considerations For Side Projects - Product Hunt Lagos
Design Considerations For Side Projects - Product Hunt LagosDesign Considerations For Side Projects - Product Hunt Lagos
Design Considerations For Side Projects - Product Hunt Lagos
 
Ajo Africa - Product Hunt Lagos
Ajo Africa - Product Hunt LagosAjo Africa - Product Hunt Lagos
Ajo Africa - Product Hunt Lagos
 

Dernier

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 

Dernier (20)

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 

Building REST APIs that don't suck for modern day SPAs

  • 1. BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS Adewale Abati
  • 2. ABATI “ACEKYD” ADEWALE Web Engineer Community Manager & Developer Advocate @ Ingressive Open source Enthusiast YouTuber Gamer & Basketballer WHO AM I? @acekyd @ace_kyd
  • 3. BUILDING REST APIS THAT DON’T SUCK FOR MODERN DAY SPAS WHAT WE WOULD BE TALKING ABOUT What are Single Page Applications How do REST APIs come in Common Practices for REST API structures. API Accessibility tips Documentation tips Error handling and status codes tips Differences in building private APIs from experience.
  • 4. WHAT ARE SINGLE PAGE APPLICATIONS? A single page application also known as SPA is a web application or website that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server. It does not require page reloading during use by relying on the features and capabilities of modern web browsers.
  • 5. WHAT ARE SINGLE PAGE APPLICATIONS? SINGLE PAGE APPLICATIONS ARE AS A RESULT OF Modern browsers JavaScript becoming increasingly powerful HTML5 capabilities Heightened focus on user interfaces and experience
  • 6. COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPLICATIONS COMMON FRAMEWORKS FOR BUILDING SINGLE PAGE APPS …and many more…
  • 7. HOW DO REST APIS COME IN? A RESTful API is a standard pattern for APIs that use HTTP requests to GET, PUT, POST and DELETE data.
  • 8. HOW DO REST APIS COME IN? Source:https://msdn.microsoft.com/en-us/magazine/dn463786.aspx
  • 9. API ACCESSIBILITY TIPS BUILDING AN ACCESSIBLE API Users should be able to get up and running with a basic implementation of your API in about 15 minutes Think in resources for endpoints. Think nouns not verbs. Leave verbs to request methods. Same endpoint structure (plural endpoints) - Be consistent Avoid breaking changes to existing endpoints. Performance and speed are important.
  • 10. THINK IN RESOURCES FOR ENDPOINTS API ACCESSIBILITY TIPS
  • 11. NOUNS NOT VERBS. LEAVE VERBS FOR REQUEST METHODS API ACCESSIBILITY TIPS
  • 12. AVOID BREAKING CHANGES API ACCESSIBILITY TIPS
  • 13. DOCUMENTATION BEST PRACTICES First entry point for users Include a tutorial or summary of what can be done with the API Include example requests and responses Use generators or tools to create nice documentation. Provide information on each endpoint. DOCUMENTATION BEST PRACTICES
  • 14. DOCUMENTATION BEST PRACTICES INCLUDE SUMMARY FOR API The Twilio REST API quickly highlights all the things you can do with their API. Giving you an idea of the features available to you at a glance.
  • 15. DOCUMENTATION BEST PRACTICES INCLUDE TUTORIALS WHERE POSSIBLE FOR API
  • 16. DOCUMENTATION BEST PRACTICES INCLUDE TUTORIALS WHERE POSSIBLE FOR API
  • 17. DOCUMENTATION BEST PRACTICES EXAMPLE REQUESTS AND RESPONSES
  • 18. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES APIDOCjs.com
  • 19. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES swagger.io
  • 20. COMMON TOOLS FOR MAKING API DOCUMENTATION DOCUMENTATION BEST PRACTICES https://spectrum.chat/slate
  • 21. HANDLING ERRORS, RESPONSES & STATUS CODES HANDLING ERRORS, RESPONSES & STATUS CODES Validation - Validate everything Be consistent with your response format. Use common status codes with responses 2xx (Success category) - 200 Ok, 201 Created, 204 No content 3xx (Redirection category) - 304 Not Modified 4xx (Client Error category) - 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found 5xx (Server Error category) - 500 Internal Server Error, 503 Service Unavailable.
  • 22. PRIVATE API BUILDING A PRIVATE API Look at UI designs before implementing API Recommended to have an understanding of how the frontend app works to better know how to present data Start with authentication before going deep into the API features when necessary. Maintain good documentation.