work hard and rest
TRANSCRIPT
![Page 1: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/1.jpg)
Work hard and REST CSABA CSORDAS
![Page 2: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/2.jpg)
Mobile challanges
![Page 3: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/3.jpg)
Great SDK's that makes life easier but also limiting
us
![Page 4: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/4.jpg)
You used a few set of API's you think you are ready to design one?
![Page 5: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/5.jpg)
Where to start?
![Page 6: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/6.jpg)
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
![Page 7: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/7.jpg)
Richardson Maturity Model
Developed by Leonard Richardson
http://martinfowler.com/articles/richardsonMaturityModel.html http://shop.oreilly.com/product/0636920028468.do
![Page 8: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/8.jpg)
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
![Page 9: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/9.jpg)
POST? GET? PUT? Query parameter? Headers?
Links?
![Page 10: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/10.jpg)
Framework to help designing new API's
![Page 11: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/11.jpg)
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)
![Page 12: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/12.jpg)
USE CASE
Requirement (user story, application flow)
![Page 13: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/13.jpg)
REST API
Adding new resources is easy but what about modifying? - versioning, backward compatibility
![Page 14: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/14.jpg)
CLIENT IMPLEMENTATION
How client side apps will consume your API's
• Data structure • Session / Caching • API usage
![Page 15: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/15.jpg)
ERROR CASES
Error handling Examples or error domains and http codes
![Page 16: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/16.jpg)
Document your API's specs using tools that also helps to try them straight away.
APIBlueprint Swagger
![Page 17: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/17.jpg)
SECURE YOUR API’s
![Page 18: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/18.jpg)
API vulnerability
17 month between contacting the provider and publishing the security breach online without action
http://www.ifc0nfig.com/moonpig-vulnerability/
![Page 20: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/20.jpg)
Learn from what others are doing.
Facebook, Twitter, Google
![Page 21: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/21.jpg)
Use tools like Charles to understand how the magic
works behind those great SDK's
![Page 22: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/22.jpg)
Try yourself And let me know how it
goes.
@cscsordas
![Page 23: Work hard and REST](https://reader034.vdocuments.site/reader034/viewer/2022042723/58ef182e1a28abd15e8b45ff/html5/thumbnails/23.jpg)
Thank you!