Work hard and REST
-
Upload
csaba-csordas -
Category
Engineering
-
view
196 -
download
0
Transcript of Work hard and REST
Work hard and REST CSABA CSORDAS
Mobile challanges
Great SDK's that makes life easier but also limiting
us
You used a few set of API's you think you are ready to design one?
Where to start?
Roy Thomas Fielding 2000
Architectural Styles and the Design of Network-based Software Architectures
Chapter 5 - Representational State Transfer https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
Richardson Maturity Model
Developed by Leonard Richardson
http://martinfowler.com/articles/richardsonMaturityModel.html http://shop.oreilly.com/product/0636920028468.do
Level 0 - Single URI and a single Verb
Level 1- Multiple URI with single verbs
Level 2- Multiple URI resources and verbs
Level 3- HATEOAS
POST? GET? PUT? Query parameter? Headers?
Links?
Framework to help designing new API's
USE CASE REST API
CLIENT IMPLEMENATION ERRORS
• Requirement (user story, application flow)
• New web service? • Modification on existing service
• Backward compatibility • Service and Data provider
• Data structure • Session / Caching • API usage
• HTTP errors • Service errors (Error domain definition)
USE CASE
Requirement (user story, application flow)
REST API
Adding new resources is easy but what about modifying? - versioning, backward compatibility
CLIENT IMPLEMENTATION
How client side apps will consume your API's
• Data structure • Session / Caching • API usage
ERROR CASES
Error handling Examples or error domains and http codes
Document your API's specs using tools that also helps to try them straight away.
APIBlueprint Swagger
SECURE YOUR API’s
API vulnerability
17 month between contacting the provider and publishing the security breach online without action
http://www.ifc0nfig.com/moonpig-vulnerability/
Learn from what others are doing.
Facebook, Twitter, Google
Use tools like Charles to understand how the magic
works behind those great SDK's
Try yourself And let me know how it
goes.
@cscsordas
Thank you!