Is it likely that an interface change on the platform is required to implement a new feature or fix a bug?
Yes, if this error is an accidental interruption of backward compatibility and if you have released several versions (X + 1 ... X + N) of the product before you discover this gap. Thus, one part of your customers depends on the old version of X, but another part of your customers depends on X + 1 ... X + N broken versions. And if you fix this error, new clients (X + 1 ... X + N) will be broken.
Is it a good idea to create a new interface that extends the original with a new method?
Perhaps, but you will probably have a problem with naming these interfaces and compiling the documentation. I recommend that you delay such features and terminate the API every 3 years, providing a detailed explanation of how to change old clients.
Of course, platform calls should now check the type of listener, if it is a new interface with a new method, then a new method will be called or nothing will be done.
There are 3 types of backward compatibility: binary (starting old clients), source (recompiling old clients) and behavioral . If you need to add a new method to an interface, you can only break the initial compatibility, but maintain binary compatibility by checking the version of the interface used (final String VERSION = "N") and calling the new method only for compatible versions. So, if some old client needs a new function, then it needs to be changed and recompiled.
source share