Unity (2): What is unity?

Source: Internet
Author: User

Previous Unity (1): This article introduces the underlying framework of unity, objcetbuilder, from objectbuilder. At the same time, I also mentioned a little: They (patterns & Practices) once again committed a long-running old problem (to be honest, this problem is most prominent among the Enterprise Library Team ). Unexpectedly, today we saw Grigori, the head of unity, saying: Unity release date is moved to limit L 7. You have to wait again :)

I really don't want to introduce the current unstable version, but I am afraid that the version of March 12 has changed a lot from the CTP version a month ago! I don't want to wait until the official version is released.CodeCompile n multiple errors-if it is not completely modified. Here is an articleArticleIntroduced the changes between the two versions: IOC container, unity and breaking changes galore. Huh! Previously, terrylee also introduced the following article: dependency injection container unity Application Block (1): Quick Start for the CTP in February. Well, that's right, the APIs used in his sample code have now changed...

However, it is appropriate to make some general introductions at this time. After all, the general direction will not change. Well, at least I think so...

 

What is unity?

Unity is a lightweight and scalable dependency injection container developed by the patterns & Practices Team. It has the following features:

1. It provides a mechanism for creating (or assembling) object instances. These object instances may also contain other dependent object instances.

2. Unity allows you to inject pre-configured objects into the class to implement the inversion of control (IOC) function. In unity, constructor injection, property setter injection, and method call injection are supported ). PS: The method injection here is slightly different from the interface injection defined by Martin Fowler.

3. Support the container architecture. A container can have sub-containers, allowing you to locate and query objects from sub-containers to parent containers.

4. You can use the configuration file to prepare and configure the container.

5. The class definition will not be affected (except for Property setting value injection and method injection), which is also a manifestation of lightweight containers.

6. Supports custom container extensions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.