Dependency Injection (DI): In what scenarios do we need to use the unity framework, in which not?
-
c#,unity 2.0,modularity,programming Related question:
-
Answer:
Unity is light-weight DI container with good performance. This is helpful component-based software designing. TI follows OO principles. You can create It provides simplicity, flexibility with run time configuration capabilities, can leverage, constructor, method, property call injection features. You can implement hierarichal dependencies, manage complex hierarchies. You can read more at http://www.codeproject.com/Articles/254091/Implementing-Microsoft-Unity-Design-Pattern
Anuradha Katiyar at Quora Visit the source
Other answers
You only need to use a DI container/framework in cases where you're letting something else control the lifecycle of your objects. You never, ever *need* to use a DI container/framework in cases where you retain total control over the lifecycle of your objects. In other words, as long as you keep control of when to call "new", you never need a DI container. Don't use a container/framework until something forces (really forces) you to do it. Reference: "Refactor Your Way to a Dependency Injection Container" http://blog.thecodewhisperer.com/2011/12/07/refactor-your-way-to-a-dependency-injection-container
J. B. Rainsberger
Related Q & A:
- If you were to start using a Wordpress framework today, which one would you use?Best solution by WordPress
- How to use GUI in c language?Which is best GUI for c?Best solution by Quora
- What paper do I need to use?Best solution by Yahoo! Answers
- What do I need to use an electric scooter?Best solution by Yahoo! Answers
- What do I need to use Xbox on my PC monitor?Best solution by superuser.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.