Original Post
I normally ask these kinds of questions on #gamedev so I have near-immediate turn around, but my current internet access solution doesn't appear to free port 6667, and as I've taken a Facebook hiatus for now, I can't put the question to the regulars that way. (Yes, they're all my FB friends - Promit, Washu, Superpig, jpetrie, benryves and many more. You guys rock!) [smile] (Hush, Washu, you'll get your articles/reviews when I get my freedom from West Africa! LOL)
I have an application which currently has a primitive plugin API. We're looking to make it considerably more robust, which has me thinking about how to best structure the application-plugin data bridge, particularly for rich types with associated behaviors. In a previous incarnation of the application, a dynamic link library containing the object code for all "core" types had to be linked against each plugin, guaranteeing the availability of all implementations. This... smelled to me, for lack of a more detailed technical objection, and I refactored that out. However, that introduced a number of constraints on the nature of the application-plugin bridge: now plugins could only be defined in terms of pure abstract types, necessitating some reworking of various types within the application core to express the correct interfaces. Is this wise? Is this idiomatic? Does this potentially introduce more problems than it solves? What is the most robust strategy for implementing a plugin architecture with the ability to communicate reasonably rich (POD) types? Our application is built on Qt, and all plugins must link against Qt anyway so we can use a number of Qt types with value semantics (and/or pointers to them) for data exchange; is it that much better than linking against our own DLL/SO and directly using our rich types? What do the SDKs for plugins to, say, Photoshop or Office do, if any of you know? I'm starting to think that removing the "core types" DLL was a mistake, which I have no problem admitting if so. Any insights, pointers and advice are all very welcome. Thanks.
I have an application which currently has a primitive plugin API. We're looking to make it considerably more robust, which has me thinking about how to best structure the application-plugin data bridge, particularly for rich types with associated behaviors. In a previous incarnation of the application, a dynamic link library containing the object code for all "core" types had to be linked against each plugin, guaranteeing the availability of all implementations. This... smelled to me, for lack of a more detailed technical objection, and I refactored that out. However, that introduced a number of constraints on the nature of the application-plugin bridge: now plugins could only be defined in terms of pure abstract types, necessitating some reworking of various types within the application core to express the correct interfaces. Is this wise? Is this idiomatic? Does this potentially introduce more problems than it solves? What is the most robust strategy for implementing a plugin architecture with the ability to communicate reasonably rich (POD) types? Our application is built on Qt, and all plugins must link against Qt anyway so we can use a number of Qt types with value semantics (and/or pointers to them) for data exchange; is it that much better than linking against our own DLL/SO and directly using our rich types? What do the SDKs for plugins to, say, Photoshop or Office do, if any of you know? I'm starting to think that removing the "core types" DLL was a mistake, which I have no problem admitting if so. Any insights, pointers and advice are all very welcome. Thanks.