111ceca083b3660d70a980bf6b15bf3d.ppt
- Количество слайдов: 43
Enterprise Library 3. 0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division
Agenda Introduction Core Architecture Configuration Tool Application Blocks + Demo Summary
What Is Enterprise Library A Set of general purpose software components Developed by the Patterns & Practices (P&P) group in MS Not specific to application type or architectural style Can be extended easily Open Source Fully configurable Fully documented
What Is Enterprise Library – Cont. Provides software components for: Data Access Caching Logging Exception Handling Security Cryptography Validation Policy Injection
What Is Enterprise Library – Cont. Fully modular Should be used as the base libraries of the application Became the De-Facto standard for. NET applications
What Is Enterprise Library – Cont. Customer Y library p&p Enterprise Library Customer Z library p&p blocks Partner blocks Customer blocks Community blocks
What Is Enterprise Library – Cont. Enterprise Library is… A library of application blocks which solve common challenges A set of helper classes which work in any architectural style Architectural guidance embodied in code which ships with full source allowing you to modify and extend Available as a free download Enterprise Library is not… A part of the. NET Framework An application framework that imposes an architectural style A Microsoft product with support, compatibility and localization For sale
The Need For Enterprise Library Typical applications contain common tasks Data Access Caching Logging You get the point… Instead of writing again and again the components for those tasks… Use prebuilt, debugged, tested and configurable components
The Need For Enterprise Library – Cont. Often the common tasks should be customized Enterprise Library can be extended easily The source code is fully accessible Great for an application starting point
History Of Enterprise Library The P&P (Patterns and Practices) group was founded at 2002 It started to release guides for many development-oriented tasks: Capacity Planning Performance Tuning UI Implementation And more…
History Of Enterprise Library – Cont. First Application Blocks released: Data Access Application Block Caching Application Block And more… On January 2005 Enterprise Library 1. 0 was released Contained all the application blocks in one, modular package On June 2005 version 1. 1 was out Some minor maintenance fixes
History Of Enterprise Library – Cont. Version 1. x targeted. NET v 1. 1 Contained the following Application Blocks: Caching Configuration Cryptography Data Access Exception Handling Logging and Instrumentation Security
History Of Enterprise Library – Cont. One of the purposes of P&P group was to “Bridge the Gap” between methodology and the. NET Framework Many components of the Enterprise Library has become part of the. NET Framework P&P is now part of the Dev Division in MS
History Of Enterprise Library – Cont. Version 2. 0, targeted for. NET 2. 0, released in January 2006 Configuration Block removed Security Block is much thinner Version 3. 0, targeted for. NET 3. 0, released in April 2007 … followed by v 3. 1 in May 2007 New Validation Block New Policy Injection Block
Goals of Enterprise Library 3. 0 Address top feedback received for existing application blocks Provide new application blocks to support additional development challenges Support integration with relevant features of. NET Framework 3. 0 Improve the experience around key development activities Simplify the development of new application blocks and extensions Retain compatibility with Enterprise Library 2. 0
Application Blocks Concept Enterprise Library contains software components for the various tasks Each component is called Application Block (AB) Each AB is: Stand alone Configurable Extendable Can be integrated with other, relevant, AB’s
Agenda Introduction Core Architecture Configuration Tool Application Blocks + Demo Summary
Core Architecture Data Access Caching Logging Core Cryptography Config Helpers & Design Instrumentation Exception Handling Object Builder Security Policy Injection Validation
Core Architecture Every Application Block uses the Core services And only them There is no other dependency an Application Block must use Some Application Blocks can optionally use other Application Blocks
Core Architecture Core Services provides services for: Configuration Instrumentation Object Builder
Core Architecture - Configuration Every Application Block can be configured Configuration Information can be stored in XML files or other configuration source Application Blocks can function without configuration file Configuration can be set per environment Configuration Console can be used to manage the configuration information From within Visual Studio or as an external program
Core Architecture – Instrumentation Every Application Block can be instrumented using: Event Log events Performance Counters WMI Events Very helpful in debugging and testing the code Turned Off by default Instrumentation code can be reused by external components
Core Architecture – Object Builder Responsible for building objects inside Application Blocks Uses object factory to instantiate the object Executes Strategies on the object as it is instantiated / destructed Can be used as a “Smart” singleton Leveraged heavily by the Policy Injection Application Block
Agenda Introduction Core Architecture Configuration Tool Application Blocks + Demo Summary
Configuration Tool for managing the configuration files of the various Application Blocks Integrated into Visual Studio, or can be launched as external program Provides easy and intuitive UI Can be used easily by non-programmers
Agenda Introduction Core Architecture Configuration Tool Application Blocks + Demo Summary
Logging Application Block Provides a simple, intuitive model for logging events Uses System. Diagnostics classes Extremely configurable: What will be logged Where will it be logged How will it be formatted And more…
Logging Application Block Logs can be sent to: Event Log E-Mail Database MSMQ Text File WMI Event Custom Locations
Demo Logging AB + Configuration
Exception Handling Application Block Answers an ancient question: What to do when an exception is thrown? Provides external mechanism to handle exception Sets policies for specific exception type Wrap the exception Replace the exception Log the exception And more…
Demo Exception Handling Application Block
Validation Application Block Helps validate values in objects and UI Enables validation in standard, structured way Validation rules can be specified In central, external configuration file Using attributes Programmatically Contains built-in rules for primitive validations Custom rules can be added easily
Demo Validation Application Block
Policy Injection Application Block Helps separating core business logic from cross cutting concerns in objects Such as Logging, Validation, Security etc. Provides factory for creating objects Uses interception and injection to apply policies on the object Policies can be specified declaratively or in code Can utilize other Application Blocks in the policies
Demo Policy Injection Application Block
Application Block Software Factory Helps creating: New Application Blocks for use within the Enterprise Library New providers for existing Application Blocks Contains Architectural Overviews, How-To Topics and Automated Guidance Packages Produces full blown AB, aligned with the best practices of the P&P team
Demo Application Block Software Factory
Agenda Introduction Core Architecture Configuration Tool Application Blocks + Demo Summary
Summary Enterprise Library can take care of the routine tasks almost every app faces Implements current best practices of software development Extremely configurable Extremely extendable Is here to stay
Resources Download Enterprise Library 3. 1 http: //www. microsoft. com/downloads/details. aspx? Family. ID=62 ef 5 f 79 -daf 2 -43 af-9897 -d 926 f 03 b 9 e 60&displaylang=en Enterprise Library Site http: //www. codeplex. com/entlib Patterns & Practices Team http: //msdn 2. microsoft. com/en-us/practices/default. aspx Guy Burstein’s Blog: http: //blogs. microsoft. co. il/blogs/bursteg
Questions?
Thanks!
111ceca083b3660d70a980bf6b15bf3d.ppt