ArticleDirectory
Today, unity Application Block is released in advance. Let's take a look at my documents on Castle.
Open-source framework
: Castle This helps you understand and use the unity Application Block.
Original article: http://msdn2.microsoft.com/en-us/library/cc468366.aspx
Summary
Unity Application Block (Unity) is a lightweight and scalable dependency injection container.
Download
Unity Application Block-constraint l 2008
Unity Application Block documentation for Visual Studio 2008
Unity Application Block documentation for Visual Studio 2005
Community
Www.codeplex.com/unity
License
End user licensing agreement (EULA) (Note: the protocol used is a MS-PL, that isCodeIs released based on open-source protocols)
Summary
Unity Application Block (Unity) is a lightweight, scalable dependency injection container. It helps build loosely coupled applications.ProgramIt provides developers with the following convenience:
- Simplify object creation, especially when hierarchical object structures and dependencies
- It supports abstraction of requirements, which allows developers to specify dependencies at runtime or in the configuration file to simplify management of cross-concern (crosscutting concerns)
- It adds flexibility by pushing component configurations to containers.
- Service positioning capability; this allows the client to store or cache containers
Introduction to unity contains a series of short sections to help you determine whether the unity Application Block matches your needs.
Developing applications using unity describes how to configure containers to execute specific tasks and how to use unity to create and build instance objects.
To learn how to extend its functions, see extending and modifying the unity Application Block.
For detailed deployment methods, see deployment and operations.
Common scenarios
Each scenario explains the corresponding work, describes the actual situation of this work, and contains code to demonstrate how to use unity Application Block to complete this work. The scenario is as follows:
- Setting up the unity container
- Resolving an object by type
- Resolving an object by type and Registration Name
- Resolving all objects of a particle type
- Using buildup to wire up objects not created by the container
- Annotating objects for Constructor Injection
- Annotating objects for property (setter) Injection
- Annotating objects for method call Injection
Reader requirements
. NET programming knowledge is required (Translator's note: Basic. NET programming knowledge should be available ).
System Requirements
The following are the minimum system requirements of Unity:
- Microsoft Windows XP Professional, Windows Server 2003, Windows Server 2008, or Windows Vista operating system
- Microsoft. NET Framework 2.0, 3.0, or 3.5
- Microsoft Visual Studio 2005 or Visual Studio 2008 Development System (Any of the following editions ):
- Standard Edition
- Professional Edition
- Team edition for software developers
- Team edition for Software testers
- Team edition for software release TS
- Team suite
The Unity Application Block solution and project files are both in Visual Studio 2005 format. You can use Visual Studio 2005 to open and modify them. The binary assembly of the Application Block is. NET Framework 2.0. However, you can reference a binary assembly in an application created in Visual Studio 2008.
You can use Visual Studio 2008 to modify and extend the unity Application Block. When you use Visual Studio 2008 to open the solution, Visual Studio 2008 will upgrade the project to the vs2008 format and use.. NET Framework 3.5. net Framework 2.0 to compile, you need to do more work ). With vs2008, there is no way to convert the project to the Visual Studio 2005 format. So keep the original solution and project.
Design Objectives
Unity Application Block achieves the following goals:
- Promote modular design through positive decoupling
- Provides people with the maximum testability to consider when designing applications.
- Provides a fast and lightweight injection container for creating new object instances and managing existing object instances
- Provides a compact and intuitive API for programmers to use containers
- Supports a wide range of code languages, and languages support methods that accept generic parameters.
- Supports Attribute-driven constructor injection, attribute injection, and
Methods of target objects
(How can I translate this)
- Provides scalability through custom and third-party container extensions
- Provide the performance required by the enterprise business line (LOB)
For more information about unity design, see design of the Unity Application Block.
Getting started
For more information about dependency injection, see Martin flower's article inversion of control containers and the dependency injection pattern.
For details about the main features of Unity Application Block, refer to unity quickstarts. This document on the main features of unity is a good starting point for getting started with unity.
Community
Unity Application Block, like many released models and practices, has a community site in this community site. You can submit your questions and provide feedback, or share your thoughts with other users. community members can help Microsoft plan and test features released by unity, and download additional content such as container extensions and training materials.
Feedback and support
Question? Comment? Suggestion? For feedback about the unity Application Block or for help, visit the unity community site. the community website message board is the preferred channel for feedback and support because it allows you to share your thoughts, problems, and solutions throughout the Community. Unity Application Block is a guiding product designed to be reusable, customizable, and scalable. The code is published according to "as is" and is not guaranteed. You can get support through Microsoft premier support services (note: the fee is required, that is, not a free service), but Microsoft support personnel think that the code is written by the user.
Author and contributor
The Unity Application Block is completed:
- Product Manager: Grigori MELNIK (Microsoft Corporation)
- Project Manager: Scott Densmore and William loeffler (Microsoft Corporation)
- Architect: Chris TAVARES (Microsoft Corporation)
- Developers: Chris TAVARES (Microsoft Corporation), Fernando simonazzi (Clarius consulting), and Nicolas botto (digit factory)
- Test team: Hanz Zhang and Carlos farre (Microsoft Corporation); Naveen guda, Pooja parate, Pravin Pawar, ronita Acharya, sai pasumari, and venkata appaji sirangi (Tata Consultancy Services ); and Vijaya janakiraman (solutions IQ)
- Documentation: Alex Homer (content master Ltd );
- Edit team: Nelly Delgado and roann corbisier (Microsoft Corporation), Tina burden mcgrayne (tinatech, Inc .)
Special thanks to the members of the Industry Advisory Committee:
- Brian button (asynchrony solutions)
- Daniel piessential S (Red prairie)
- Francois Tanguay (nventive)
- Keenan Newton (Microsoft Corporation)
- Kyle Huntley (avanade)
- Lenny Fenster (Microsoft Corporation)
- Rinat shagisultanov (neudesic)
- Tom Hollander (Microsoft Corporation)
Thanks to the following code checks and meaningful feedback for Unity:
- Ade Miller, Blaine wastell, Bob Brumfield, Brad Wilson, Glenn Block, Michael puleio, Francis Cheung (Microsoft Corporation)
Related Topics