Different API versions

  • Thread starter Thread starter bazad
  • Start date Start date
B

bazad

Let's say I have plug-in API. A number of assemblies implement
plug-in API version 1. Over time plug-in interface changes to version
2. How would you handle assemblies implementing old API?
 
Have the plug-in installed in the GAC. Then the version can coexist, that
is if you want to maintain legacy support.
 
Have the plug-in installed in the GAC. Then the version can coexist, that
is if you want to maintain legacy support.

There is no point to use GAC for a plug-in. Plug-in by definition has
only one version.

The real problem is that the same process with a newer version of the
framework will need to be able to load assemblies. Some of these
assemblies implement the current IPlugIn interface version and some of
the assemblies were not upgraded and implement older version of the
interface. How do you handle that?
 
bazad said:
There is no point to use GAC for a plug-in. Plug-in by definition has
only one version.

The real problem is that the same process with a newer version of the
framework will need to be able to load assemblies. Some of these
assemblies implement the current IPlugIn interface version and some of
the assemblies were not upgraded and implement older version of the
interface. How do you handle that?

Isn't that breaking one of the fundamental concepts of what an interface
provides. I always thought that once you release an interface you don't
change it...
 
Isn't that breaking one of the fundamental concepts of what an interface
provides. I always thought that once you release an interface you don't
change it...

You are correct. But what do you do when requirements change over time?
 
comments inline...

bazad said:
You are correct. But what do you do when requirements change over time?

We introduce a new interface that the main object implements (so it now
implements both the new and old interfaces). Old clients will be able to
use the old interface and new clients can simply attempt to cast to the new
interface. Everyone is happy.

 
Back
Top