It's no harm to add new methods into interfaces and that
will preserve backward and binary compatible.

If we want  to change an existing API, first mark it
as deprecated introduce the new API and remove the deprecated one in a
future release.

Once a API is released to public there is no guarantee only WSO2 uses it.
So we should not break others code.

Rajika

On Wed, Mar 14, 2012 at 12:21 PM, Amila Jayasekara <[email protected]> wrote:

> Hi All,
>
> In-order to solve [1] I need to add a new method to
> CarbonUIAuthenticator interface. But adding a new method to this
> interface will break existing ui authenticators. So I am wondering
> what is the best way to change an existing API. This is not a question
> specific to [1] but in generally what is the best way to change an
> existing API ?
>
> I am planning to do following.
> 1. Create a new interface (say X) with all methods in
> CarbonUIAuthenticator + the method which i want to add.
> 2. Extend CarbonUIAuthenticator from X and remove all methods in
> CarbonUIAuthenticator
> 3. Deprecate CarbonUIAuthenticator
> 4. In the framework check which instance is being called and implement
> logic accordingly.
>
> Is there a more better way of doing this ? Appreciate feedback.
>
> [1] https://wso2.org/jira/browse/CARBON-12378
>
> Thanks
> AmilaJ
> --
> Mobile : +94773330538
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to