We are using XData to provide the REST-backend for a iOS, Android and Windows-application.
If I create a new method or change a model of the data structure in the existing XData-application we will have to make sure that both the REST-service, the different versions of the mobile and Windows apps are updated at the same time. Otherwise the request will fail in the apps.
But the problem is that we cannot be 100% sure that the mobile versions is updated all at once.
So the question is: How do we ensure backwards compatibility in these cases? How do we handle this in the most practical way?
The usual way is to have versioned APIs, so I guess you would need a new instance of the server, on a different port/path and run both instances until you knew that all clients were up to date.
Of course you have to ensure that the current version of the XData server plays nicely with any changes you make to the underlying entities and database. (Nullable<> is probably your friend).
The solution is to prefix the version number as we see in most API's? www.server.dk/myapp/v100/ and next www.server.dk/myapp/v101/ etc.
I think that will work!
Yes, that's an option. It's recommended to avoid such constant breaks in the API for distributed systems, exactly due to the problem you mentioned. Try to always keep backward compatibility for your API, and if not possible, version it as @Weetch_Russell mentioned.