dependency injection - Adding Ninject to Legacy Project C# -


i have inherited legacy c# & vb.net project have maintain , augment how.

there no interfaces , no dependency injection.

the first thing thinking of doing creating interfaces , adding ninject, make possible unit test project eventually.

is idea or should leave alone ?

what best practices implementing di when comes legacy projects.

thanks

i don't think there's set best practice, other use common sense - it's kind of case case scenario. few important questions ask yourself:

  • how effort going required create interfaces current classes?

  • how additional effort going required write proper unit tests? these unit tests add more value time spent?

  • how long legacy system going maintained? there's nothing worse doing huge upgrade (requiring testing not development staff, product user) replace in 18 months.

  • also, how long has legacy system been in place without issue? there's no reason invent work if appears stable , has low maintenance.

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -