« Return to Thread: Re: Dependency injection

Re: Re: Dependency injection

by Serhat Özgel :: Rate this Message:

| View in Thread

In my case, we have a web app that has lots of modules. A business layer
class has 5-6 dependencies on the average. We try to follow solid strictly,
not perfect but almost there. The problem is, we have hundreds of classes
that we register into our ioc container and it is growing. The registrations
alone take nearly 10 seconds on app init. How would you deal with such a
situation? Is it ok to have  hundreds or thousands of registrations in an
app?

On Wed, Feb 16, 2011 at 11:15 PM, Dotan N. <dipidi@...> wrote:

>
>
> I'm saying, once you unit test / integration test properly, you'll discover
> the parts that are too sticky. It'll force you into more modular design, and
> then you'll see how the modules grow apart.
> These modules will depend upon each other in various ways, and it'll be the
> DI's job to inject the dependencies.
>
>
> On Wed, Feb 16, 2011 at 11:12 PM, kogerbnz <kogerbnz@...> wrote:
>
>>
>>
>> > unit/integration testing will show you the sweet spot
>> >
>> So are you saying that I should really only be using DI as seams for
>> tests?
>>
>>
>  
>

 « Return to Thread: Re: Dependency injection