On Wed, Mar 14, 2012 at 12:52 PM, Afkham Azeez <[email protected]> wrote:
> In any case, I think it is fine to add a new method to the interface. If
> people upgrade to a new version, they should simply be able to add an empty
> implementation method, and nothing should break, ideally. For example, when
> I upgraded Tomcat Tribes from 6.x to 7.x, they had added some new interface
> methods, but I just had to put an empty implementation method, and
> everything works fine. If you can maintain that kind of backward
> compatibility, it should be sufficient. Adding a new API method is a bit
> different from changing an existing API method. If you are planning on
> changing an API method, you should retain the old method, possibly deprecate
> it but make sure that there is backward compatibility, and add a new API
> method.

Thanks !!, will do accordingly.

- AmilaJ

>
>
> On Wed, Mar 14, 2012 at 12:47 PM, Amila Jayasekara <[email protected]> wrote:
>>
>> On Wed, Mar 14, 2012 at 12:27 PM, Afkham Azeez <[email protected]> wrote:
>> > If this interface is only used by WSO2 code, I would just add the new
>> > method
>> > to the interface.
>>
>> Hi Azeez,
>>
>> This interface is not only used by WSO2 code.
>>
>> Thanks
>> AmilaJ
>>
>> >
>> > 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
>> >
>> >
>> >
>> >
>> > --
>> > Afkham Azeez
>> > Director of Architecture; WSO2, Inc.; http://wso2.com
>> > Member; Apache Software Foundation; http://www.apache.org/
>> >
>> > email: [email protected] cell: +94 77 3320919
>> > blog: http://blog.afkham.org
>> > twitter: http://twitter.com/afkham_azeez
>> > linked-in: http://lk.linkedin.com/in/afkhamazeez
>> >
>> > Lean . Enterprise . Middleware
>> >
>>
>>
>>
>> --
>> Mobile : +94773330538
>
>
>
>
> --
> Afkham Azeez
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
>
> email: [email protected] cell: +94 77 3320919
> blog: http://blog.afkham.org
> twitter: http://twitter.com/afkham_azeez
> linked-in: http://lk.linkedin.com/in/afkhamazeez
>
> Lean . Enterprise . Middleware
>



-- 
Mobile : +94773330538
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to