Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First of all, "IoC" means "<a href="http://en.wikipedia.org/wiki/Inversion_of_control" rel="nofollow noreferrer">inversion of control</a>" and it is a <em>concept</em> (not a concrete software component) that is highly related to <em><a href="http://en.wikipedia.org/wiki/Dependency_injection" rel="nofollow noreferrer">dependency injection</a></em>. The <em>container</em> (which <em>is</em> a software component) is a <em>dependency injection container</em>. So not only are "IoC" and "container" two entities that cannot be compared, they are also inside the same "camp" so to speak.</p> <p>Therefore the question could better be phrased as "should I use a DI container for my application?".</p> <p>There are several DI containers you can choose from: Microsoft Unity, Castle Windsor and NInject are a few of the more well-known ones (I was unaware of Autofac until now). Pick one and go ahead with it; there will be no practical difference in your case and you can always switch relatively easily to another one if the need arises.</p> <p>Further, a major selling point of containers is that <em>you do not need</em> to wire them up to construct classes with deep dependency trees. The container resolves and injects the dependencies automatically; you only need to help if you need object construction to happen with specific values passed to a constructor.</p> <p>Finally, there is no relation between a DI container and the command pattern or anything like that. If you want to get the active document, then simply store what the active document is in a variable whenever it changes and read that variable when you need. The container does not come into it at all.</p> <p><strong>Update:</strong> Adding a link to the highly relevant question <a href="https://stackoverflow.com/q/21288/50079">Which .NET Dependency Injection frameworks are worth looking into?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload