Enterprise Library 3.1 Introduction

Source: Internet
Author: User
Tags documentation time interval
Enterprise Library 3.1 is a new release of the Microsoft patterns & practices Enterprise Library. The Enterprise Library is a collection of application blocks. These reusable software components are designed to help developers address the challenges of common enterprise development. This Enterprise Library release includes two new application blocks, a software factory for creating application blocks and providers, and new performance and enhancements.

Advantages

The application block helps solve common problems that developers face from one project to the next. They are designed to encapsulate the best practices recommended by Microsoft for. NET applications. can also be quickly and easily added to. NET application. For example, a data Access Application Block provides access to the most commonly used ado.net features, exposing them through easy-to-use classes. In some cases, the application block also adds functionality that is not directly supported by the base Class library.

Target

The Enterprise Library is a collection of application blocks to be used by developers who create complex enterprise-level applications. These applications are often deployed widely and are interdependent with other applications and systems. In addition, they often have stringent security, reliability, and performance requirements.

The objectives of the Enterprise Library are as follows: Consistency。 All application blocks have consistent design patterns and implementation methods. Extensibility。 All application blocks define extension points that allow developers to add their own code to customize the behavior of the application block. Easy to use。 The Enterprise Library offers a number of ease-of-use improvements, including graphical configuration tools, simple installation procedures, and clear and more complete documentation and examples. Integrated。 The Enterprise Library is designed to work well together and is tested to confirm that they can be done. Of course, it is also possible to use application blocks alone.
Reader needs

This guide is intended for software architects and software developers. To get the most out of this guide, you need to understand the following knowledge: Microsoft Visual C # or the Microsoft Visual Basic. NET Microsoft. NET Framework
System Requirements

To develop applications using the Enterprise Library, you need the following systems: Microsoft Windows XP Professional, Windows Server 2003, or Windows Vista operating sy Stem Microsoft. NET Framework 2.0 or 3.0. The following modules require. NET Framework 3.0: Application Block Software Factory validation application Block Windows Communication Foundation (WCF) Adapter exception Handling Application Block Windows Communication F Oundation (WCF) exception protection Microsoft Visual Studio 2005 development system (any of the following versions): Microsoft Visual Studio Standard Edition Microsoft Visual Studio Professional Edition Microsoft Visual Studio Edition for Software developers Microsoft Visual Studio Edition for Software testers Microsoft Visual Studio????? Edition for Software architects Microsoft The Visual Studio Team Suite needs to be aware that the Enterprise Library contains binary and source code for unit tests and requires one of the Visual Studio Edition or NUnit 2.2 To run the unit tests. For instructions on how to use unit tests, see unit Tests. If you modify the source code for the unit test, you will need to recompile, as well as Visual Studio team Edition or NUnit 2.2. To use the Application Block software factory and the strong name guidance package, Microsoft Guidance Automation Extensions (GAX) is required. To modify and compile these guidance packs, you need the Microsoft guidance Automation Toolkit (GAT). To use a data Access Application block, you need a database server that runs a database supported by the. NET Framework 2.0 data provider. This includes SQL Server 2000 or update, SQL Server Compact Edition, Oracle 9i, or update. The database server can also run databases that are supported by the. NET Framework 2.0 data Provider for OLE DB or ODBC.
The content of this publication

Enterprise Library 3.1 contains the following: Binary System。 The Enterprise Library contains precompiled, strongly named assemblies of all source code. For more information, refer to using the Enterprise Library binary. Source Code。 The Enterprise Library contains the application Block's source code, guidance packs, configuration tools, unit tests, and QuickStart. Unit Test。 The Enterprise Library contains unit tests that were created by the application Block at development time. For more information, see Unit Tests. Quick Start。 The Enterprise Library is an example of a concise, Easy-to-understand key Application Block feature. Each application block includes one or more QuickStart. Document。 The Enterprise Library includes documents that can be viewed by the Visual Studio Help system. Documentation includes instructions on how to use the Enterprise library and class library references.
upgrading from previous versions

In general, a program built with the Enterprise library for the. NET Framework 2.0 has the same functionality as Enterprise Library 3.1 and does not require any changes to the source code. Only the reference to the new assembly needs to be changed, and the configuration file reference to the correct assembly version is modified. For an upgrade from an earlier Enterprise Library, refer to the additional guide for each application Block document.

This Enterprise Library release consists of two new application blocks (validation application blocks and policy injection application blocks), two wizard packages, and configuration editors integrated with Visual Studio. There is also an increase in the functionality of the data Access Application block and the log application block. These and other changes in this release are discussed in the following sections.

affect changes to all application blocks

The changes to the Enterprise library that affect all application blocks are as follows: This version of the Enterprise library includes precompiled strong-named assemblies for all source code. For more information, see Using the Enterprise Library binary. A separate Microsoft Windows installation package (. msi file) now provides the source code for the Enterprise Library. This Windows Installer package is installed by the main. msi file. The source. msi file allows you to release a copy of the source code and place it in a file directory that you have repeatedly wanted to specify. Partial-trust patch 2554 for the Enterprise Library. January 2006 has been merged into the Enterprise Library core. An administrative extension for the Enterprise Library. January 2006 has been merged into the Enterprise Library core. You can now use Visual Studio to create and modify configuration files. This configuration tool is called the configuration Editor. The configuration editor has the same functionality as a stand-alone configuration console, but it uses the Visual Studio Properties window to display the properties of the application block with an error list to display configuration errors. Overall, both the configuration editor and the standalone configuration console are configuration tools. More information can be viewed in the Enterprise Library Configuration tool. The following descriptions of some of the configuration tool activities will help you use the Configuration tool: You can use the configuration tools to create, modify, and configure the. NET Framework sections. For more information, see Configuration. You can use the Configuration tool to adjust the configuration of the application block to a specific run-time environment. For more information, see Customizing Run-time settings. You can use the Configuration tool to encrypt and decrypt data in a configuration section. For more information, see Encrypting Configuration section Data.
changes to individual application blocks

Important changes to individual application blocks are presented in the following sections. They discuss changes in data access, exception handling, and log application blocks.

Data Access Application Block

The May 2007 data Access Application Block includes the following enhancements: Includes a new class sqlcedatabase that allows you to use SQL Server CE. This is a lightweight, internal process (in-process) version of SQL Server that contains the basic functionality of the relevant database. Includes an overload of a database.updatedatabase method with updatebatchsize parameters. Setting the UpdateBatchSize parameter to a positive integer causes the DataAdapter object to be sent to the database in a block of a specified size. This reduces the number of database postbacks.
For more information, see Data Access Application Block documentation.

Exception Handling Application Block

The exception Handling Application block, released in May 2007, includes the following improvements:

The exception handling application block can be used to implement an exception mask on the service interface of a Windows communication Foundation (WCF) application. Exceptionshieldingattribute can be defined on a service implementation class to invoke exceptions that are deployed on the service boundary. Faultcontractexceptionhandler can be used to map an exception to a failed contract to prevent the return of sensitive information to an untrusted caller. The Exceptionpolicy.handleexception method has a new overload that invokes the exception handling policy and returns the result exception in an output parameter instead of throwing the result exception. The Wrap and Replace exception handlers contain an additional configuration attribute that allows you to specify exception information in external resources rather than directly in the configuration file. This feature can be used for localization of exception information.
For more information, see the Exception Handling Application Block documentation.

Log Application Block

The exception Handling Application block, released in May 2007, includes the following improvements: now includes a rolling Flat File Trace Listener. This trace listener creates a new log file when the current log file exceeds the predefined time or size. Now includes a WCF adapter that allows you to log WCF messages. Now includes an improved version of the Timestamptoken class. Earlier versions of the log Application block allow only time intervals to be recorded as Coprocessor (UTC). In this release, the time interval token currently supports a local: prefix to indicate that the time interval is displayed locally. For more information, see Tracking listener properties. Includes a Reflectedpropertytoken class. This release of the log Application Block supports a new format token that allows custom attributes to be recorded on a custom class, derived from the LogEntry class, or modified. For more information, see Extending and modifying log application blocks.
For more information, see the Log Application Block documentation.

Add to Enterprise Library

Enterprise Library 3.1 includes two new application blocks, two wizard packages, and a configuration editor integrated into Visual Studio. They are described below: Validating the Application Block

The validation application Block allows developers to generate validation rules for their applications. It provides the following benefits: it provides a common way to define validation rules for business objects to allow them to be used across tiers in the application. It provides a common set of validation rule types, and the ability to make it easy for developers to define their own rule types. Provides a technology adapter that makes it easy to integrate validation application blocks into ASP.net, Windows forms, and WCF.
For more information, see Validating Application Block documentation.

Policy Injection Application Block

The policy injection Application Block allows developers to specify the crosscutting (corsscutting) behavior of objects in a policy set entry. Crosscutting relationships are common tasks, features, or processes that span multiple objects. such as logging, authorization, validation, and metrics. A policy is a combination of a series of handlers that the handler performs when the client code invokes the class's method and executes with a property-based exception policy, and a series of configuration methods select Classes and Class members (methods and properties) to add handlers to the application block. The purpose of the policy injection Application block is to isolate core and crosscutting relationships and minimize potential problems associated with implementing common features.

The Policy injection Application Block provides a ready-built solution that is easy to implement in new or existing applications, especially in applications that have been using the Enterprise Library. Together with the pre-built handlers for these application blocks, it accelerates the development of using the Enterprise Library while helping to manage crosscutting relationships. Developers can also create their own handlers and policies to implement almost any required interception of methods and properties for their objects.

For more information, see Introduction to Policy injection.

Strong-Named Wizard package

This release of the Enterprise Library includes a new strong-named Wizard package that integrates with visual Studio. It automates the strong named set processing of the project, or it can modify any InternalsVisibleTo property to include a public key.

For more information, see Strong-named Enerprise Library assembly.

Application Block Software Factory

An automated, written wizard provided by the Application Block software factory, which simplifies the process of building custom application blocks and Application Block provider classes. The Application Block Software Factory includes a wizard Automation method for different tasks. For example, create a new application Block create a new provider library create a typed or Enterprise provider for the library application block create a new typed or no type provider (generic) transform a type-free provider for a typed Create a new provider factory and base class to create a new design-time provider base node to create a point that provides the program design


For more information, see the Application Block Software factory documentation


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.