Which plugin framework to use for native C++/Win32
- by Kerido
Hi everybody.
I have an extensible product that allows 3rd party developers to extend it. The aspects that can be extended are documented and interfaces are provided in the SDK. Currently, I'm using COM and I'm getting pretty comfortable with it. I especially like the ability to provide interface versioning in a unified manner. I consider it to be a requirement because you never know what you're gonna need in the future.
Just to be precise, here's an example. Let's suppose I have an interface representing a particular feature:
class IFeature
{
public:
virtual void DoFeatureTask() = 0;
};
Then after the interface is already documented (and someone may have used it in the plugin code) I'm realizing, I need more from this feature. Maybe, there is an option I need to provide. I just define the second version:
class IFeature2
{
public:
virtual void DoFeatureTask(int theOption) = 0;
};
I don't mean I intend to have lots of versions. But it just may happen. In COM, because every interface is associated with a GUID, I can query a preferred implementation, determine its presence, and, finally, fall back to a legacy one.
But after glancing through C++/COM-related questions, I noticed many recommendations against COM. So maybe it's not the best choice and I'm just too old-school. Can you advise on an alternative?