Skip to main content

Questions tagged [ioc-containers]

3 votes
4 answers
340 views

I get that IOC containers can be useful to help break dependencies and allow you to test a class in isolation. I don't wish to focus on that right now, instead, I'm trying to understand some of the ...
Scotty Jamison's user avatar
0 votes
6 answers
1k views

Okay, first of all I understand the concept of IoC container! It's used to implement automatic dependency injection so you won't have to manually inject dependencies to class. It can automatically ...
Jhe's user avatar
  • 17
4 votes
4 answers
1k views

I have some components which require some asynchronous calls to be finished before those components are fully initialized and ready for work. I do not want dependant objects to know about these ...
Anton Petrov's user avatar
-1 votes
1 answer
183 views

Curious how containers are portable across development/testing/cloud environments with no worry needed about the underlying infrastructure. Does the Docker Engine essentially standardize operating ...
CloudQuestions's user avatar
2 votes
2 answers
1k views

The fifth concept in the SOLID principle is the dependency inversion principle. It is heavily related to dependency injection, and Inversion of control, and when any of these concepts are mentioned, ...
Christian Findlay's user avatar
0 votes
2 answers
2k views

I've recently "discovered" the IoC realm, and decided to refactor a project I'm working on to use such a container. To be specific - I'm using autofac in C#, in a .NET Core console application. The ...
Timor Gruber's user avatar
123 votes
5 answers
15k views

I understand that directly instantiating dependencies inside a class is considered bad practise. This makes sense as doing so tightly couples everything which in turn makes testing very hard. Almost ...
tom6025222's user avatar
  • 1,014
1 vote
3 answers
669 views

I was watching a presentation by Uncle Bob. In the end of that presentation (last 10 min), He argued that we should abstract everything (Even frameworks) from our business logic. JAVA EE does a great ...
Mr.Q's user avatar
  • 121
9 votes
1 answer
6k views

Our team had recently a big struggle of deciding whether it is a good practice or not for the .NET Core class libraries to register their own implementations by the fact of providing a ...
Radek Strugalski's user avatar
1 vote
2 answers
282 views

Right now I construct all objects of my application in the root class manually. Since it is getting ugly now, I want to switch to an IoC-Container like Autofac. Now I have to register each interface ...
user avatar
0 votes
1 answer
504 views

I have several apps witch build from one code base (using common modules). And my question: how to write composition root in this case? Let's imagine simple dependency graph: ClassBase --> ...
dartNNN's user avatar
3 votes
4 answers
3k views

While I do see the benefits of IoC containers (as I've used them a fair bit), I don't see how they can be incorporated within TDD unit tests (note, I'm only interested in unit tests here, not ...
Ash's user avatar
  • 219
18 votes
2 answers
2k views

Notwithstanding its popularity, is there any empirical evidence that shows that Dependency Injection (and/or using a DI container) helps with, say, reducing bug counts, improving maintainability, or ...
NMrt's user avatar
  • 487
1 vote
2 answers
163 views

We're wondering what the best practise for registering types in a IoC-Container is. What would be arguments for and against the following principles: Principle 1: Only one Assembly my.project....
xeraphim's user avatar
  • 339
6 votes
4 answers
3k views

I'm working with a project that our architect has decided to use dependency injection for almost everything. We use an IoC container. One of the main issues that I keep coming across when using this ...
Jacob Brown's user avatar

15 30 50 per page