Microsoft Enterprise Library 5.0 series Huang Cong: Enterprise Library Series articles directory Abstract: Enterprise
Library Series Article Directory Haha. This is the first time I have written a series of articles. I did not expect to write this article without knowing it.
What functional modules are available in 5.0? I have made a directory for your reference here. I also hope you will give me some suggestions. In the future, I will write some articles to share my learning achievements. \ (^
^) Directory 1. Microsoft Enterprise Library 5.0 series (1) caching Application Block
(Elementary) 2. Microsoft Enterprise Library 5.0 series (I) caching Application Block
(Advanced) 3. microsoft full-text post ed @ 2010-06-08 all read by Xiao congzai (7117) | comment (27) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (10) configuration application block Abstract:
So far, the modules we use are all in the same configuration file, which is obviously not flexible. We hope that each functional module can be reflected independently in a configuration file, this is not only easy to manage, but also easy to expand
Enterprise Library, of course, takes this issue into consideration and provides solutions. This chapter describes how to use the configuration application
Block to separate each module into an independent configuration file. As before, we first raise the requirement and then use an instance to explain it. This is more vivid:
1) create a project that uses the data access module and log processing module of the enterprise database.
2) The configurations of the two modules are saved in different configuration files (data. config and log. config). 3) Program To call these two modules. read the full text posted @ 2010-06-08 everything read Xiao congzai (3893) | comment (12) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (9) Policy injection Application Block Abstract: proxy
Objects) are located through the handler chain to the real object, and the policy is injected into the proxy object and the real object. Entire Process
My personal policy injection Application
Block uses the following idea: the user first creates a proxy and uses this proxy to indirectly manipulate the entity. when calling the object method or member attribute, a set of handler (such
Log, authentication, etc.), and you only need to modify the corresponding configuration file to quickly change the handler chain (because it is a personal opinion, it may not be accurate, the official explanation here
Tips @ 2010-06-06 read everything about Xiao congzai (3516) | comment (12) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (8) Unity dependency injection and interception Abstract: dependency injection container unity: the structure of unity is similar to the IOC in Castle (control Inversion
Or dependency injection. We use abstract interfaces to isolate dependencies between users and specific implementations. However, no matter how abstracted, we still need to create instances for specific implementation classes, specific implementation of such Creation
Class instance object will cause dependencies on the specific implementation, in order to eliminate this
To create dependencies, you need to remove the Dependencies from the outside of the program (such as the configuration file ). After dependency injection is used, these classes are completely written based on abstract interfaces, so they can adapt to the changes as much as possible.
There are three forms of dependency injection: constructor injection and setter
Injection) and interface injection (interface inject read the full text posted @ 2010-06-05 Xiao congzai read everything (3616) | comment (4) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (7) exception Handling Application Block summary:
Advantages of using the Enterprise Library Exception Handling application module: it supports Exception Handling across the application architecture layer, not limited to the boundaries of service interfaces. It allows the exception handling policy to be defined and maintained at the management layer.
To allow decision makers (possibly system administrators and developers) to define how to handle exceptions. They can maintain and modify the rule set that controls exception handling without changing the block application. Code . It provides
Common exception handling functions, such as recording exception information, replacing the original exception
This function is used to hide sensitive information by packaging the original exception to another exception and to add the context information of the exception. These functions are encapsulated in
In the. NET class of handlers. It can combine multiple exception handling programs to generate the response required for an exception. For example, record abnormal messages first. Read the full text posted @ 2010-06-04 all the readings of Xiao congzai (4394) | comment (15) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (6) Security Application Block Abstract:
Developers often write applications that require security features. These applications usually need to perform a series of different security operations, and they are often different from different basic security providers (such
Microsoft Active Directory directory service, authorization manager, Active Directory Application Mode (Adam)
And user-defined databases.
Security Application blocks simplify the work of developers by collecting many of the most common security tasks that developers must perform. Each task is processed in a consistent manner, and the application is abstracted from a specific security provider.
Program code and use best practices. You can even change the basic application code by changing the configuration. Shows the functional framework of the Application Block:
Several Basic Concepts: (1) Reading tic full text posted @ 2010-06-03 Xiao congzai (3520) | comment (12) edited by Huang Cong: Microsoft Enterprise Library 5.0 series (5) data Access Application Block summary:
Through the abstract factory mode, the enterprise database access module allows users to select different databases as program data sources through simple configuration, which greatly solves the trouble caused by database switching.
SQL Server
2005, so here only SQL demo, need to study friends can visit the following website: http://msdn.microsoft.com/en-us
/Library/ff664408% 28 v = pandp.50 % 29. Several major features of the aspx enterprise database access module: 1. The simplest feature, through
Executenonquery. Execute the SQL statement. 2. Execute executedataset and return the dataset of dataset type. 3. Execute
Executescalar, get the full text of the returned first read: posted @ 2010-06-02 Xiao congzai all read (5787) | comment (20) edited by Huang Cong: Microsoft Enterprise Library 5.0 series (4) logging Application Block Abstract: schematic diagram of the enterprise database log application module:
We can see the working principle of the Enterprise Library log application module, including logfilter, trace source, trace listener, log
The formatter information can be reflected in the category configuration file. by calling the writer method of the logwriter class through the configuration file, you can
The logentry object of information is written to the specified device in the category configuration file. The Enterprise Library diary application module provides the following recording methods: The Event Log
An e-mail message a database a message queue a text file a Windows & # read the full text posted @ 2010-06-01 Xiao congzai's reading (4951) | comment (23) EDIT Huang Cong: microsoft Enterprise Library 5.0 series (iii) Validation Application Block (advanced) Abstract:
Configuration File mode of the Enterprise Library Verification Application Module: 1. Create a console application and create a customer class. The Code is as follows: Code
Highlighting produced by actipro codehighlighter
(Freeware) http://www.CodeHighlighter.com/--> using system; using
System. Collections. Generic; using system. LINQ; using system. Text; using
Microsoft. practices. enterpriselibrary. validation. vali read the full text posted @ 2010-05-31 all read Xiao congzai (3841) | comment (14) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (3) Validation Application Block (preliminary) Abstract:
The enterprise database provides a powerful verification application module. It features that you can define a rule set by configuring a specific class in your program. is the public attribute of your class, that is, the attribute opened to the outside for verification
. Advantages of using the Enterprise Library to verify the application module: helps maintain consistent verification methods. Includes most standard verifications, including. NET data type validation. It allows you to have multiple rule sets with the same class
And members of this class. It allows you to apply for one or more rule sets, the object you are verifying. The Enterprise Library verification application module provides the following verification methods: and
Compositevalidator containscharacters validator date time rangevalidator
Domain validator Enum Conv read the full text posted @ 2010-05-30 all read Xiao congzai (3897) | comment (4) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (2) cryptography Application Block (advanced) abstract:
This chapter describes how to configure the key file for symmetric encryption in the enterprise database encryption application module cryptographyproviders: Create a New
Key: Use a string as the key and save it to a key file through encryption. Use an existing dpapi-protected key
File: use an existing key file to configure. Import a password-protected key file:
Encrypt the exported key files again with a password. Let's talk about it. Now let's take a look at how to use them: 1. Create a new key
1.run entlibconfig.exe and select blocks to read the full text posted @ 2010-05-29 xiaocongzai (3329) | comment (8) EDIT Huang Cong: Microsoft Enterprise Library 5.0 series (2) cryptography Application Block (Elementary) Abstract:
The enterprise database encryption application module provides two ways for users to protect their data: hashingproviders: discrete encryption,
Simply put, you store your information in the memory and use a discrete value to represent it and return it to the program. In this way, you can only see discrete values instead of plaintext values in the program, which achieves simple encryption.
La. cryptographyproviders: key encryption method.
Data is encrypted using symmetric encryption (asymmetric encryption is not yet supported ). advantages of using the Enterprise Library to encrypt the application module: reduces the template code to be written and executes standard tasks, which can be used to solve common problems.
See application encryption. This helps maintain data transmission encryption within an application and across enterprises. allows administrators to encrypt configurations, including using group policies.
Scalable and supports custom encryption technology. the following is an example of posted @ 2010-05-28 all read by Xiao congzai (4618) | comment (12) edited by Huang Cong: Microsoft Enterprise Library 5.0 series (1): caching Application Block (beginner) abstract: For more information about this article, see the following link:
Http://msdn.microsoft.com/en-us/library/ff664753%28v=PandP.50%29.aspxMicrosoftEnterprise
Repository 5.0:
Http://www.microsoft.com/downloads/details.aspx? Familyid = bcb166f7-dd16-448b-a152-9845760d9b4c & displaylang = enmicrosoftenterprise
Library 5.0 documentation: http://entlib.c