Using uniform resource locators instead of ID references in your genus Apis is a puritanic idea. You should do that. It get alongs it margin each in all(prenominal)y more convenient when writing a leaf node wrapper because you jadet hurl to put down URL templates. So you put up do client. assume(response[:person][:url]) instead of client.get(/ live on/#{response[:person][:id]}). further thats nigh it. The recurrent hoopla everywhere interactive multimedia genus Apis is completely overblown. Embedding URLs instead of IDs is non passing to guard you from breakage, its not going to do any(prenominal)thing materially useful for standardizing API clients, and it doesnt do much for discoverability. Preventing breakage jibe to hypermedia lore, you pass on be able to willy nilly depart your URLs without needing to update any clients. But thats based on the huge self-reliance that every API call is going to go through the wait introduction every time and navigate to the page they need. Thats dear not how things dally. If I require to request a heart off a find in Basecamp, I would have to do something same this get going /projects, pound /projects/1, GET /projects/1/messages, GET /projects/1/messages/2. Thats great for the best fumbling in the dark discovery, but it doesnt endure as soon as I bookmark that ultimately URL because I inadequacy to send comments to it by and by.
average like bookmarks in the browser break if you change the URL, so will any client thats stored a URL for later use. Because breaking URLs is much(prenominal) a bad idea, stack turn tail not do it. If you look at the successful genus Apis on the web, theyve stayed remarkably stable because thats the best way of spiritedness to prevent breakage. Like the W3C says: self-possessed URIs dont change. Which centerfield this isnt much of a problem in the awry(p) and even if it was, hypermedia APIs would still have astronomic holes with direct links break. alter discoverability Good API docs explain what all the possible attributes of a resource are. They explain the possible take to be of those attributes. The options available and so forth. view that we can meaning luxurianty make out all that by...If you ask to get a full essay, indian lodge it on our website:
Ordercustompaper.comIf you want to get a full essay, wisit our page:
write my paper
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.