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

RESTfulness

Never ever keep state server side for a client. It complicates things to a point where it will be immensely difficult to scale and hinders developing new functionality due to the added complexity.

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