JCooney.NET

Joseph Cooney's Weblog

My Links

Blog Stats

News

I work for:


see also:
Dominic Cooney
Patrick Cooney

Archives

Image Galleries

My GotDotNet Samples

Exciting new approach to versioning interfaces (courtesy of the Biztalk Team) (reposted)

We installed Biztalk 2004 SP1 at work here today, and in the process I discovered an exciting new approach to versioning interfaces from the Biztalk team. Rather than going to the trouble of creating a brand-new interface, and the hassle of thinking up a new name (as suggested here), they decided to just go and ADD METHODS TO THE INTERFACE. They added the GetEventStream() method to the IPipelineContext interface (which lives in the Microsoft.BizTalk.Component.Interop namespace). Wow. Why haven't others thought of this simple and clean way of versioning interfaces?

(c'mon people - what do you think? was that too sarcastic?)

posted on Thursday, June 23, 2005 1:07 PM

Feedback

# Joseph: BizTalk Interface Versioning 7/28/2005 9:10 PM notgartner.com: Mitch Denny's Blog

# re: Exciting new approach to versioning interfaces (courtesy of the Biztalk Team) (reposted) 11/16/2005 12:03 PM JD


Not sarcastic enough.

This works in the forward direction if you control all the implementations, but not the backward. Someone compiled against the new method will have a nasty failure when running against the older version.

If you handle that problem in another manner, you run into the trouble of people who implemented the old interface and thus don't have an implementation for the new method. Again if this is COM-like where the interfaces really are only implemented by one developer then it may not be a concern, but if the interface was an extensibility point then you have issues.

In the .NET world, abstract classes seem to do a better job of handling the scenaris where this works, because you do indeed just add the method, and you can additionally provide a default implementation.

Title  
Name  
Url
Security Word (prevent comment spam)
Protected by FormShield
Comments