These rules can be followed as a complete set or a la carte.
I absolutely loved this book!
This book explores all aspects of restful API design through an exhaustive set of concise, unambiguous rules that challenge you to think carefully and deeply about your choices.Take that last one, as an example - choosing the correct the Content-Type header value.I enjoyed reading it, and it seemed to me to have the same level of "this is what you're supposed to do".It has definitely made me question a lot of the choices that I've made in restful API design; and, it has me wanting to think more deeply and carefully about my choices going forward.
(Page 23 of 186 after this disclaimer, Masse goes on to bring a level of clarity and consciousness to all aspects of restful API design.
This concise book presents a set of API design rules, drawn primarily from best practices that stick close to the Webs rest architectural style.
In the past, when I've returned json content, I've gone with any one of the following: text/json application/json application/x-json, i don't actually know which one is right - I just copy others; but, as Masse explains, there doesn't have to be any guesswork involved.While I absolutely love the way this book is presented, I don't necessarily see myself adopting all of the concepts Masse describes.The rules are here to help you design rest APIs with consistency that can be leveraged by the clients that use them.I also found it to be a bit convoluted.In a world where so many computer science questions are answered with, ".I suppose it is intended to allow the Client to be able to programmaticaly respond to changes in the API (as opposed swokowski calculus solution manual to versioning the API or hardcoding values in the client code).It depends or, " there's no 'right' answer Masse comes through with a book that says, No, these are the rules - this is how you design a restful API.I haven't seen that Cookbook, I'll check it out!Along with rules for URI design and http use, youll learn guidelines for media types and representational forms.Rest APIs are ubiquitous, but few of them follow a consistent design methodology.