Skip to content
plajjan edited this page Jan 11, 2013 · 2 revisions

API return value

API calls that modify objects should return the object as opposed to just a boolean (true if all went well) or an integer (like the ID of the object). Returning the entire object increases the amount of data and on a slow network this might impact things but in general it does not. As the client application often requires the object, not returning the object but just an ID will result in another lookup to retrieve the object. Over a long network (high latency) this will increase the time it takes for the whole operation from one to two RTTs at a minimum.

Clone this wiki locally