5 ms·
(Author of the article here) That's a great point! But, wouldn't you need to update your code anyways when migrating to a newer API version? The idea is that y
by thecodemonkey 13y ago
(Author of the article here)
That's a great point!
But, wouldn't you need to update your code anyways when migrating to a newer API version? The idea is that you only release a new API version for backwards-incompatible changes. E.g. when we launched fields for Geocodio[1], all you needed to do was append a "&fields=x" parameter to your query string, so that didn't require a new API version.
So I'm not sure what the exact purpose of getting the version number as a resource would be?
[1] http://geocod.io/blog/2014/04/02/fields/ http://geocod.io/blog/2014/04/02/fields/
- arethuza 13y agoI guess I just like the elegance of it - but thinking about it a bit more, it means that it is easier to configure a client. If I install a client application where there are multiple implementations of the same service (not the case with SFDC) I just want to have to know the URL for their service not to have to work out which version of the service this particular application works with and which are available - the application should be able to do that.
- abrichr 13y agoThis doesn't seem like a particularly scalable solution, since your traffic increases proportionally to the number of versions you support.
- arethuza 13y agoI would suggest that if it works for Salesforce then it probably does scale...
- abrichr 13y agoPerhaps, but I would prefer to see some evidence rather than rely on an appeal to authority. If the size of your resource is e.g. 100KB, and you have 10 different versions, then your responses are 1MB each -- 9 times larger than they have to be. This can result in significant bandwidth costs, depending on your number of users and their behaviour.
- arethuza 13y agoI think you are misunderstanding how it works - you don't get every possible response format, that would indeed be silly. You get the response type specific to that version of the interface - which is pretty normal versioning. All I was saying is that if you do run multiple versions of the same interface on different URLs then it's quite nice to have these versions themselves treated as resources you can find out about through the interface. That's what Salesforce do and, in my experience, I think it is simple and elegant.
- abrichr 13y agoAh, now I understand. Yes, I agree that discoverability is an extremely useful feature.