By pointing my application at
- http://api.stackoverflow.com/n.n/...
- or possibly http://api.stackoverflow.com/latest/...
I could keep up with all the version changes released.
Alternate forms to stay within major version might be:
By pointing my application at
I could keep up with all the version changes released.
Alternate forms to stay within major version might be:
I guarantee that if we did this, a large chunk of the developed apps would rely on /latest
and break horrendously every time we rev'ed the API. The end user experience would be bad, developers would be frustrated (as their code literally just stopped working one afternoon), and we'd have to deal with a bunch of erroneous bug reports ("/some/method stopped blah blah" - "no, its been updated to instead blah blah").
Even limiting 'latest' behavior to within a major version is a bad idea. Consider what could be allowed to change while still only being a 'minor' revision.
Enum.Parse
(or equivalent) is going to be a very common way of dealing with *_type
fields, and that would breakThe only thing we could maybe safely do is add new methods.
But what's the point of that? You'd have to recompile your code to take advantage of the new methods anyway, might as well kick up the version number while you're in there.
Note that all of these problems become infinitely worse once you consider libraries. Now apps stop working because of some code the developer doesn't know, and may have no control over.
*As an aside, The Old New Thing will make you very paranoid about application compatibility. Consider that a recommendation.
If you are thinking about creating a full fledged application that could be open to users, I highly suggest against using a latest version API call. This is because even though you want to keep up with the latest version, it would be horrible for your application to break, and your users to have to wait until you dealt with the changes to the API to be able to use your service again.
The only place I can see this being viable is possibly a development area, but do you really want to go to sleep, and then wake up the next morning to a bunch of error messages? I think it would be far better to simply keep up with the changes on the site, and then update the version you use when you are ready.
If you insist on creating a latest version API, I would make sure that users are strongly cautioned when using it.