views:

23

answers:

2

I'm creating an application which uses a DI Container for injecting strategies into it. When deployed, if I require those strategies to change, is it a valid deployment strategy to deploy a new assembly with the new strategies and ammend the configuration file for instructing the DI container of which strategy to use?

My concern is that Versioning of the application on a machine then becomes a bit fuzzy as different dlls would have different version numbers.

+1  A: 

One of the best feature of a DI is Modular Application and easy extensibility.Which i think you doing correctly by using configuration file and let the DI load your strategies.

For Versioing Problem , you can think of ClickOnce Deployment. Which can reduce this version problem.

saurabh
+2  A: 

This is totally valid, this even is one of the great benefits of Dependency injection: It allows for modular development - and therefore also deployment: you don't have to deploy all of your application, but only the modified assembly (with the new strategies in your case).

As for the versioning issue: It's common practice that an application consists of many software modules (vulgo: assemblies), which have a different version number. That's the rule, not something exceptional. Therefore, a list of version numbers for all DLLs is crucial...

Thomas

Thomas Weller