DIP benefitting .NET

4

4Space

As a company, we have a frightening amount of legacy code. A couple of years
ago, we started to move towards .NET, so ended up wrapping a lot of native
C++ libraries with managed code.

Now, one of .NET's cool things is the GAC (Global Assembly Cache). One of
the not so cool things about the GAC, is that things that go into it have to
have their dependencies in the GAC (hacks aside).

Recently, I've been weaving the dependency inversion principle into some
areas of our code base, and noticed the DIP actually lifts this problem, as
all the dependencies now run upwards into the managed code. How nice :)

All the lower level managed components no longer depend on things that
aren't GACable, the dependencies run upwards, into the managed code.

It will be interesting to see how far this goes, and if their are any traps
I've yet to fall into.

Cheers,

4Space
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top