I started working in a project around 3 months ago and since I joined I saw so many mistakes in the whole design - the architecture is completely dysfunctional and badly implemented and a lot of used concepts like Inversion of Control are implemented in a way which completely goes against any proper conventions. People have different opinions, knowledge, experience and it's completely fine to solve a problem using different approaches the problem is when things are implemented in a very wrong way. Given that there are so many issues with the current design I will describe one as an example.
We have a good few components and each is defined by a set of different projects (we are using C#) like so:
- Company.Product.Services.IoC (ServicesIoCManager)
In the IoC project we have a couple of windsor castle installers to configure the dependencies for that specific component, so given the example above we would have two installers one per each component
Now let's say that the Services component has an indirect dependency on the Repositories - which is a typical setup - in our case the Services project has a direct reference to the Repositories project and calls a static method in the RepositoriesIoCManager type to initiate the IoC installer. This setup only works because we have a single product/region and no CI, and it would easily break in case we had different Repository implementations for the same interface, you just could not swap the different DLLs during the build/package/deploy process cause everything is statically referenced.
Among other issues, this just makes the use of IoC completely unnecessary, because we don't even have unit tests, so there's nothing to mock.
I tried to explain the guy how the concept is broken, that IoC is used among other things to allow loose coupling between components, which is the opposite we have here but every time I do so, I'm told I am not flexibly and that pattern X is just like any other pattern and I just can't find any more arguments. What would you do in this case? make a demo project and try to get people see what problems IoC solves and how it should be properly implemented or just accept that this is yet another "custom" way of implementing IoC?