Unity 1.0 Chinese Documents: Unity profile

Source: Internet
Author: User
Tags exception handling extend

Unity Application Block (Unity) is a lightweight, extensible, dependency injection container that supports constructors, properties, and method invocation injection. It has the following advantages:

simplifies the creation of objects, especially hierarchical object structures and dependencies, and simplifies application code.

Support abstraction of requirements, which allows developers to specify dependencies at run time or configuration, and simplifies management of crosscutting concerns.

Increase flexibility by delaying the assembly of configurations into containers.

The service locator feature allows the client code to save or cache the container. This is particularly useful in asp.net Web applications where developers can persist containers to asp.net sessions or application.

This topic contains a series of useful chapters that provide information that helps determine whether the Unity Application block meets the requirements. The sections of this topic are as follows:

Common scenes

Sample application code

The highlights of the Unity application Block

Determining when to use the Unity application Block

In addition to this introductory material, the documentation includes the following topics:

Use the Unity Application block to develop an application. This topic explains how to use the Unity application block in your application. It lists the system requirements, explains how to configure the application block to accomplish common tasks, and shows how to add application code to where the application block is needed. The properties of the program block are also listed.

Key scenarios. This topic demonstrates how to use the application block to accomplish the most common operations.

Unity Application Block design. This topic explains the application block design considerations as well as other relevant considerations.

Extend and modify the Unity Application block. This topic explains how to extend the application block and how to modify the source code.

Deployment and operations. This topic explains how to deploy and update the assembly of the Application block, and take advantage of the metrics exposed by the program block.

Unity Quick Start. This topic roams through a quick start application that demonstrates how to perform common operations in your application.

Common scenes

The Unity Application Block solves the problems faced by developers who are busy with component-based software engineering. In addition to addressing cross-cutting concerns such as logging, authentication, authorization, caching, and exception handling components, modern business systems consist of custom business objects and components that perform special or generic tasks in the application.

The key to successfully building such an application is to get decoupled or extremely loosely coupled designs. Loosely coupled applications are more flexible and easier to maintain. It is also easy to test during development. Can simulate a strong substance dependent on the object of the pile (lightweight simulation of the implementation). For example, database connections, network connections, ERP connections, and rich user interface components.

Dependency injection is a major technique for building loosely coupled applications. It provides a way to handle dependencies between objects. For example, an object that processes user information may depend on other objects that access the data store, verify the information, and check whether the user is authorized to perform the update. Dependency injection technology ensures that the user class correctly initializes and assembles all of these objects, especially where they are dependent on abstraction.

The following design patterns define the architecture and development approach for simplifying processing:

Control reversal (IoC) mode, a generic pattern that describes the techniques used to support a plug-in architecture that enables objects to "find" instances of other objects that they need.

Dependency Injection (DI) mode, which is a special case of the IOC model, is an interface programming technique that is based on changing the behavior of the object without altering the class's interior. The developer writes the class code that implements the interface, and uses the container to inject the dependent object instance into the class based on the interface or object type. The techniques used to inject object instances are interface injection, constructor injection, property (Setup) Injection, and method invocation injection.

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.