I\'m working on an iPhone/iPad/Android app which communicates with a JSON API.
The first release of the version of the app is complete, and now additional phases of deve
I guess you already have a separation of concerns. I mean, getting the datas for your app is only done through the Model (for example).
So you only have to change the model.
What I suggest is that there is only one entry point: the "router" file. This file checks the API version needed, and loads the correct file. This way, you get different files for each API. The "router" file won't be very big, and each new API version will have its own file, so you're not mixing everything.
For example, in the "router" file:
function dispatch() {
switch (APIVersion) {
case 1:
use('file.1.ext');
break;
case 2:
use('file.2.ext');
break;
case 3:
use('file.3.ext');
break;
}
}