views:

24

answers:

1

Situation overview.

We have several projects used in multifunctional system.

  1. objectAccessLibrary.dll (multiple versions)
  2. dispatcherHandler.dll (v.1.0) (dependency: version independent part of objectAccessLibrary.dll)
  3. Event handlers: handler_01.dll, handler_02.dll, handler_03.dll. Dependencies: dispatcherHandler.dll (v.1.0), objectAccessLibrary.dll (particular version for each handler_xx.dll)
  4. DispatcherService (dependency: particular version of objectAccessLibrary.dll). Dynamically loads handlers and using its functionality in order to dispatch events.

The problem

objectAccessLibrary.dll is under development along with core system. It is exposed some interfaces / objects which can be changed from version to version. Therefore dispatcherHandler.dll and DispatcherService should be recompiled and retested with old handlers each time we need to add new handler because it MUST use the newest version of objectAccessLibrary.dll. But from other side DispatcherService MUST be running while hanlder_xx.dll's are dynamically loaded.

The current version working fine if new handlers not using new objectAccessLibrary.dll features. In general case we need to load different versions of objectAccessLibrary.dll and share some objects between them and dispatcherHandler.dll. How to do this?

A: 

I would recommend looking into some kind of IoC container such as StructureMap or Castle Windsor. Both are pretty mature and will allow you to dynamically load dependencies into your projects. There are many other containers out there as well that may also suit your requirements.

phreak3eb