Isn't COM a natural technology for plugins?  Load a module, lookup the query 
interface interface, then probe for known interfaces.  If one is found, it 
identifies both the formal interface and, by implication, the type of plugin.

By definition, COM interfaces are immutable, so there is not question of 
forward or backward compatibility.  On the other hand, a COM object can support 
number of interfaces, so extensions can be implemented as new interfaces 
leaving older interfaces active for backwards compatibility.  And since a COM 
interface "just happens" to be a C++ class, COM object/plugins are almost 
trivial to code.  This eliminates all sorts of version numbering issues, 
problems with calling methods that don't actually exist, etc.

And, of course, it completely eliminates any need for a roll-your-own erzatz 
vtable.

COM, incidentally, was not invented by Microsoft but by Apollo computer (which, 
incidentally, bootstraped Interbase) and was a adopted by the consortium that 
eventually launched the Open Software Foundation (OSF-1 anyone?).

I don't think COM is even a candidate for a client API, but it is a great 
choice for plugins.




------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to