Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long before a deprecated feature is removed from an API?

Tags:

deprecated

api

When the developer of an API, e.g., Microsoft, Apple or me, announces a feature of the API is being deprecated, how long should the API developer wait before removing the feature from the API?

From the other point of view, how long should a user of an API expect to have to refactor code after an API feature is marked as deprecated?

like image 299
tlatkovich Avatar asked Nov 04 '22 03:11

tlatkovich


2 Answers

If you move from version A to B, you should directly remove deprecated methods. Unless you know that you won't need later upgraded version then you may keep what's working. But as every problem, the sooner you take them on, the easier it'll be.

It's usually easy enough to change deprecated code from version A to B, but if you cumulate modifications, it'll be a nightmare

like image 130
Michael Laffargue Avatar answered Nov 15 '22 13:11

Michael Laffargue


Once you discover APIs that are marked as deprecated, you should start looking to update your software to replace them with non-deprecated methods. If you continue to use them, you run the risk of your software not working on newer versions. This is fine if you never plan on upgrading, as evidenced by the multitude of Win 3.1 software still in use. However, if you are going to be supporting the software or releasing new versions, you should update as soon as feasible.

like image 25
John Haager Avatar answered Nov 15 '22 13:11

John Haager