As per REST, the URLs should make use of HTTP verbs to expose their REST based services via HTTP. (i.e GET/PUT/POST/DELETE). But in a real life complex application, we are faced with exposing many services such as approve, reject where it becomes inevitable to add verbs to the URL. What should we do? Should we just have the URLs like ../foods/1/approve ? What would go wrong if we use verbs in REST URL? Whether there is some rationale behind it or it just REST dogma. Are there any “REST guidelines”?
In this session, we will explore how to model our services so that we follow the RESTful way adhering to HTTP specifications. But most importantly we will try to understand why should we do that. What will go wrong and what would be the benefits?
We would be going through HTTP Specifications and browser caching capabilities. I will next discuss a use case on how to handle the scenarios of accepting/rejecting friend requests using pure REST urls.
Take away for audience : Learn how to model services in RESTful manner and more importantly should understand why would they so and what would fail. The session is designed mindful of the fact that most of the audience would be aware of basic REST theory. So the session focuses on how to address real world problems faced while modelling REST application.
This talk was delivered at the IndicThreads Conference 2013 at Delhi NCR, India.
Speaker: Anirudh Bhatnagar has been working with Java/J2EE based technologies for last 6 years. He is an avid blogger and agile enthusiast who believes in writing clean and well tested code. Anirudh has previously presented at several occasions including AgileNCR2013, BeingAgile2013, etc. on the topics related to Java, J2ee, Liferay, Hadoop, Cloud and Agile. Currently he is working as a Senior Consultant with Xebia India for past 2 years.