Are there any best practices to keep in mind while designing API's which ensures backward compatibility and new version releases. Any links to articles/blogs is appreciated.
You should check out this presentation about API design. It's from Google and pretty good. It also addresses backward compatibility and new releases.
keep both running, with version in the url. api.mysite.com/[version]/api/url/here
. Notify the users when a new version of the API arrives, and drop the old version after a while. Either when it isn't used anymore, or like 6 months insuring the users had enough time to change it.
Or keep it running forever, but don't deliver any new functionality for it.
The best way to do this to keep the old interface or class in new release with new interface and classes and marked them as deprecated (means those will be removed in future release).
Hear API designer keep in mind about difference between public interface and published interface.
来源:https://stackoverflow.com/questions/8907512/api-design-ensuring-backward-compatibility