Unity (ii): What is Unity?

Source: Internet
Author: User
Tags constructor

Before Unity (i): From the ObjectBuilder, introduced the unity of the bottom frame objcetbuilder. At the same time, I said a little: they (patterns & practices) Once again made the old habit of stalling (to be fair, this problem is one of the Enterprise Library team most prominent). Unexpectedly, today see Unity's Masters Grigori said: Unity Release the date is moved to April 7. Also have to wait:)

Really do not want to introduce the current unstable version, mainly to see the version of March 12 than one months ago the CTP has a lot of changes, afraid! Do not want to wait for the official version, the current introduction of the code to compile the N-many errors-if not completely change the words. Here is an article about the changes between these two versions: IoC Container, Unity and breaking Changes galore. huh! Before Terrylee also had an article on the introduction: The Unity Application Block (1): Quick Start, is for the February CTP, well, yes, his sample code used in the API is now changed ...

However, at this time to do some general introduction or appropriate, after all, the big direction has not changed. Well, at least that's what I thought ...

What is Unity?

Unity is a lightweight, scalable, dependency injection container developed by the patterns & practices team with the following characteristics:

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

2. Unity allows a pre-configured object to be injected into the class, enabling the inversion of control (IoC) functionality. In unity, support is constructor injection (constructor injection), property setter Injection (attribute set value injection), and method call injection (methods injection). PS: The method injection here is similar to the interface injection defined by Martin Fowler and slightly different.

3. Support the architecture of the container. A container can have child containers that allow you to locate queries from child containers to the parent container's object.

4. You can prepare and configure the container through a configuration file.

5. It does not affect the definition of the class (except for attribute set value injection and method injection), which is also a manifestation of lightweight containers.

6. Support for 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.