Note that there are some explanatory texts on larger screens.

plurals
  1. POMEF: Loading parts (plug-ins) which have differing properties
    primarykey
    data
    text
    <p><strong>Brief Background:</strong></p> <p>My team has decided to use Microsoft's Managed Extensibility Framework (<strong>MEF</strong>) in order to provide an extensible model for adding new "providers" into our system.</p> <p>This allows for us to plug in new 3rd party providers with relative ease.</p> <p><em>Note: I was impressed by how simple MEF was to use and get up and running with.</em></p> <p><strong>My Question:</strong></p> <p>Since these providers <strong>commonly have different properties</strong> associated with them, when loading these providers into the system at run-time we need to access the providers data streams and properties.</p> <p>What approach should be taken in order to work with said provider plug-ins due to the differing properties? Noting they all do a similar job.</p> <p><strong>My Solution:</strong></p> <p>Create an interface which the providers must conform to, resulting in a "wrapper" being created around each of the 3rd party providers resulting in a consistent interface / programming model for working with each provider.</p> <p>Plug-in = 3rd party data source (provider) + Common interface implementation.</p> <p>+ve: No need for a more complex reflection based dynamic "plug" for said plug-ins.</p> <p>-ve: Have to write a wrapper for each provider. (We need to add the MEF Export tags regardless)</p> <p><strong>Further Note:</strong></p> <p>To me the interface / wrapper approach would be the simplest but I have been told to investigate a reflection based approach which <em>may</em> utilize reflection in order to discover the properties at run-time which can be exposed to the system.</p> <p>I am not in favor of any one solution over another, but I would be interested in hearing the thoughts of the community (most of which are more experienced than I).</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload