[Product-Developers] Providing backward compatibility for a zope component

Marcos Romero marcos.romero at inter-cultura.com
Tue May 10 09:39:45 UTC 2011


Thanks David

That's my problem: I don't know if it is important to provide that
compatibility because I don't know if anyone is using it or, in case
they are, if they are using those methods directly.

Another option would be to write upgrade notes to tell how to use
those methods from now on. Or keep in the the methods in the browser
view with a deprecation warning.

This is the first time I'm through this and I don't know the best approach.

Regards

-- 
Marcos F. Romero
Responsable de Desarrollo
Inter-Cultura

marcos.romero at inter-cultura.com
www.inter-cultura.com
+54 11 4542-8299



On Tue, May 10, 2011 at 2:16 AM, David Glick <dglick at gmail.com> wrote:
>
>
> On Mon, May 9, 2011 at 12:27 PM, Marcos Romero
> <marcos.romero at inter-cultura.com> wrote:
>>
>> I'm working on a new release of collective.imagetags
>> (pypi.python.org/pypi/collective.imagetags) in which all the
>> functionality that was carried by a browser view (@@imagetags-manage)
>> is now moved to a new adapter (not commited yet) which provides almost
>> the same interface that the browser view::
>>
>> class IManageTags(Interface):
>>    """
>>    imagetags-manage view interface
>>    Tag management browser view
>>    """
>>
>>    def get_tag(id, create_on_fail=True):
>>        """ Gets / creates a specific tag """
>>
>>    def get_tags():
>>        """ Gets all the tags for the object """
>>
>>    def get_sorted_tags():
>>        """ Sorted list of tags
>>        """
>>
>>    def save_tag(data):
>>        """ Saves a tag with the passed data """
>>
>> I really don't know if anybody is using this product in a project,
>> however, I think it would be a sensible idea to provide some backward
>> compatibility mechanism, in case anyone is using the browser view
>> methods outside the out-of-the-box functionalities.
>>
>> What should I do? Keep the interface for the browser view with stub
>> methods that relay on the new adapter? Any suggestion?
>
> That sounds like a reasonable way to provide backwards compatibility if it
> is important.
>


More information about the Product-Developers mailing list