Recently I have studied the ucenter framework and used unity dependency injection. Today I have collected and read someArticleFinally, I understand what this thing is.
From sleep worm: http://www.cnblogs.com/liujian969/archive/2009/01/17/1377446.html
Description
Unity ApplicationProgramUnity is a lightweight and scalable dependency injection container that supports constructor, attribute, and method call injection. It provides developers with the following benefits:
- This simplifies object creation, especially hierarchical object structures and dependencies.
- Allows developers to specify dependency requirement abstraction during runtime or configuration, and simplifies management of cross-concern.
- Service positioning allows customersCodeSave or cache the container. This is particularly useful when developers can persistently send containers to ASP. NET sessions or ASP. NET web applications in applications.
Common scenarios
In addition to the components that independently address cross-cutting concerns such as logs, authentication, authorization, caching, and exception handling, modern Business systems generally consist of custom business objects and components that complete special or general tasks in applications.
The key to successfully building such an application is to obtain a decoupled or extremely loosely coupled design. Loosely Coupled applications are more flexible and easy to maintain. At the same time, tests can be conducted during development to simulate the object's pile (implementation of lightweight simulation), which enhances the Actual dependency. For example, database connection, network connection, ERP connection, and rich user interface components.
Dependency injection is a major technique used to build loosely coupled applications. It provides methods to process dependencies between objects. For example, an object that processes user information may depend on other objects that access data storage, verify information, and check whether the user is authorized to execute updates. The dependency Injection Technology ensures that the user class correctly initializes and assembles all these objects, especially the dependency is abstract.
Using containers can have many advantages, but it will change the design method of the application, especially for Component-Based Development. Friends can choose to use it.
First, I would like to provide a few links to a good article:
Unity Application Block official website http://www.codeplex.com/unity
[Object Builder application block] http://www.cnblogs.com/zhenyulu/articles/641728.html organized by Lu Zhenyu
Lu Zhenyu [Do you really understand IOC and AOP?] Http://www.cnblogs.com/zhenyulu/articles/233966.html
[Inversion of control containers and the dependency injection pattern] http://www.cnblogs.com/me-sa/archive/2008/07/30/IocDI.html
Kids kids [unity series] http://www.cnblogs.com/kebixisimba/archive/2008/05/19/1202467.html
Nee's [unity configuration: Use of typeconverter] http://www.cnblogs.com/nickyao/archive/2008/05/04/1181804.html
Warmth & chilliness's [unity -- native IOC framework under. net, let some people use it first] http://www.cnblogs.com/think8848/archive/2008/10/25/1319616.html
Unity Application Block 1.2 learning notes http://www.cnblogs.com/yjmyzz/archive/2009/06/02/1494449.html