Client-Server API

      No Comments on Client-Server API

I will be shipping new iphone game soon. It is 2 players, turn-based strategy game. Client-server architecture. More information soon 😉 One question that came to my mind recently was: “How to handle app updates ?!”. Right now I use simple REST with http links like: “/move, /setup, etc…”. Potential problem will occur when new version will require different json response from “/move” link. In that situation either version 1 or 2.0 will not work… or I’ll have to support both versions under same link. This does not smell as a good solution. Image below shows the problem. client-server-api-screen1 After some research and thinking I came up with such a solution: client-server-api-screen2 For every new version I will provide different API set. By doing that old clients can still use the old API, since it is not changed. New clients use new API with new functions. One think before shipping version 1.0 is to setup links correctly on the client side. Instead of “/move” it would be better to use some naming pattern, eg.: “/api/v1/move”.

Follow me:

Leave a Reply

Your email address will not be published. Required fields are marked *