Enterprise Library 3.0: What’s New?. The Story So Far…  Application Blocks are reusable, extensible source-code components that provide guidance for.

Slides:



Advertisements
Similar presentations
Introducing the Policy Injection Application Block
Advertisements

Enterprise Library 3.0: Overview. Context  Reusable components are important Address common development challenges consistently across applications 
Enterprise development reference architecture (EDRA) -Deepti Seelamsetti.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Leveraging Enterprise Library in Your Applications Keith Elder Quicken Loans Manager, Sr. Software Engineer Microsoft MVP Keith a t keithelder dot net.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 14: Windows Server 2003 Security Features.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Tom Hollander Solution Architect Solutions Development Centre Microsoft Australia ARC307.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Patterns & practices Enterprise Library Brian Button Consultant/Developer patterns & practices.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Lesson 18: Configuring Application Restriction Policies
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
SQL Reporting Services Overview SSRS includes all the development and management pieces necessary to publish end user reports in  HTML  PDF 
Using Microsoft SharePoint to Develop Workflow and Business Process Automation Ted Perrotte National Practice Manager, Quilogy, Microsoft Office SharePoint.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
UNIT-V The MVC architecture and Struts Framework.
Students: Nadia Goshmir, Yulia Koretsky Supervisor: Shai Rozenrauch Industrial Project Advanced Tool for Automatic Testing Final Presentation.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
9.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
MCTS Guide to Configuring Microsoft Windows Server 2008 Active Directory Chapter 3: Introducing Active Directory.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Crystal Hoyer Program Manager IIS Team Preview of features that will be announced at MIX09 Please do not blog, take pictures or video of session.
Java Beans.
Introducing the Validation Application Block. Agenda  Enterprise Library 3.0 Introduction  Validation Application Block Overview  Applying, using and.
Doing Something Useful with Enterprise Library 3.0 Benjamin Day Level: Intermediate.
Module 1: Introduction to C# Module 2: Variables and Data Types
Session 1 - Introduction and Data Access Layer
Understanding Code Compilation and Deployment Lesson 4.
Enterprise Library for.NET Framework 2.0: Overview.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
Module 7: Fundamentals of Administering Windows Server 2008.
.NET Framework Danish Sami UG Lead.NetFoundry
Module 9 Designing and Implementing Stored Procedures.
© 2008 IBM Corporation ® IBM Cognos Business Viewpoint Miguel Garcia - Solutions Architect.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Five Managing Addresses.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 14: Windows Server 2003 Security Features.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Enterprise Library Caching Application Block Peter Provost Software Design Engineer Ron Jacobs Product Manager Scott Densmore Software Design Engineer.
34 Copyright © 2007, Oracle. All rights reserved. Module 34: Siebel Business Services Siebel 8.0 Essentials.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Packaging Design and Architecture Guidance for Visual Studio Tom Hollander Wojtek Kozaczynski Harry Pierson Microsoft.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
A Web Service Software Factory Introduction Don Smith Product Manager patterns & practices.
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
SQL Database Management
Architecture Review 10/11/2004
Building Enterprise Applications Using Visual Studio®
ASP.NET Programming with C# and SQL Server First Edition
What’s New in SQL Server 2016 Master Data Services
Enterprise Library Overview
Partnership.
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
ASP.NET MVC Imran Rashid CTO at ManiWeber Technologies.
Objectives In this lesson, you will learn about:
Presentation transcript:

Enterprise Library 3.0: What’s New?

The Story So Far…  Application Blocks are reusable, extensible source-code components that provide guidance for common development challenges  Enterprise Library is a collection of general purpose application blocks Caching, Configuration, Cryptography, Data Access, Exception Handling, Logging, Security Emphasis on Consistency, Extensibility, Ease of Use and Integration Originally designed for.NET Framework 1.1 (January/June 2005 releases) and updated for.NET Framework 2.0 (January 2006 release)  Enterprise Library has become a standard for.NET development and is often used as a basis for custom frameworks

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

Enterprise Library 3.0 – New Features At a Glance  New application blocks Validation Application Block Policy Injection Application Block  Improvements to existing application blocks Data Access Application Block Logging Application Block .NET Framework 3.0 integration Logging, Exception Handling and Validation Application Blocks  Configuration improvements Visual Studio-integrated configuration tool Environmental Overrides Manageable Configuration Source  Automation Application Block Software Factory Strong Naming Guidance Package

CachingCaching SecuritySecurity DataAccessDataAccessLoggingLogging ExceptionHandlingExceptionHandling Enterprise Library 3.0 – Application Blocks Plug-in ConfigHelpers & Design ConfigHelpers Instrumen- tation Object Builder CryptographyCryptography Core Policy Injection ValidationValidation

New Application Blocks

Validation Application Block – Goals  Specify your validation rules once In configuration Using attributes Programmatically  Easily validate data from anywhere in your application Programmatically Integrated into Windows Forms, ASP.NET or WCF  Composable validation logic Built-in library of common primitive validation rules Combine validation rules on type members and using Boolean logic Apply multiple validation rule sets to the same types

Supplied Validation Rules  Validation Application Block includes the following rules: Not Null (value must not be null) Contains Characters (e.g. does not contain any of /\?<>”:) Regular Expression (e.g. value is a valid address) Range (e.g. must be from or 1/1/1950 to 12/31/1999) Relative DateTime (e.g. birth date is more than 18 years ago) String Length (e.g. string is at least 8 characters long) Domain (e.g. must be one of {John, Paul, George, Ringo}) Enum Conversion (e.g. string can be converted to a value in the Color enum type) Type Conversion (e.g. string can be converted to a DateTime) Property Comparison (e.g. MaxDate > MinDate)  All validation rules can be negated E.g String Length must not be between 5 and 10 characters

Composing Validation Rules  You can build complex validation rule sets by combining multiple primitive rules Combining rules with Boolean AND / OR logic Assigning different validators to different members of a type Specifying how nested objects or collections are to be validated  A single type may have multiple rule sets that can be used in different contexts For example, Valid for displaying or Valid for persisting For example, Valid Customer or Preferred Customer

Specifying Validation Rules using Attributes  Attributes allow you to specify validation rules directly within the type being validated  Validation logic cannot be changed without recompiling  You must own the source code of the type [StringLengthValidator(1, 50, Ruleset="RuleSetA", MessageTemplate="Last Name must be 1-50 characters")] public string LastName { get { return lastName; } set { lastName = value; } } MessageTemplate="Invalid address", Ruleset="RuleSetA")] public string { get { return ; } set { = value; } } [ObjectValidator("RuleSetA", Ruleset="RuleSetA")] public Address Address { get { return address; } set { address = value; } } [StringLengthValidator(1, 50, Ruleset="RuleSetA", MessageTemplate="Last Name must be 1-50 characters")] public string LastName { get { return lastName; } set { lastName = value; } } MessageTemplate="Invalid address", Ruleset="RuleSetA")] public string { get { return ; } set { = value; } } [ObjectValidator("RuleSetA", Ruleset="RuleSetA")] public Address Address { get { return address; } set { address = value; } }

Specifying Validation Rules using Configuration  Validation rules are stored in XML and can be edited with the Enterprise Library configuration tool  Validation logic can be changed without recompiling  You don’t need to own the source code of the type

Validating Data – Programmatically  Regardless of how you specify rules, objects are validated in the same way  If validation fails, you get a collection of ValidationResult objects  Each result includes a message, tag, references to the object and property being validated, and a reference to the original validator. Validator validator = ValidationFactory.CreateValidator ("Ruleset"); ValidationResults results = validator.Validate(customer); if (!results.IsValid) { foreach (ValidationResult result in results) { Console.WriteLine("Message={0}, Key={1}, "Tag={2}", result.Message, result.Key.ToString(), result.Tag == null ? "null" : "\"" + result.Tag.ToString() + "\""); } Validator validator = ValidationFactory.CreateValidator ("Ruleset"); ValidationResults results = validator.Validate(customer); if (!results.IsValid) { foreach (ValidationResult result in results) { Console.WriteLine("Message={0}, Key={1}, "Tag={2}", result.Message, result.Key.ToString(), result.Tag == null ? "null" : "\"" + result.Tag.ToString() + "\""); }

Integrating with WinForms, ASP.NET or WCF  Supplied “Integration Adapters” make it easier to validate data in UI layers and service boundaries  Windows Forms and ASP.NET integration allow you to associate a control with the validation rules for a particular type and member Validation failures are displayed alongside the control being validated Includes events for converting user input to the correct type for validation  WCF integration implemented as a WCF Behavior that validates data at the service interface layer Rules are defined within data contract types or using attributes on the service contract

Policy Injection Application Block - Goals  Separate cross-cutting concerns from business logic Use interception and injection to apply policies at runtime Allow policies to be defined using configuration or attributes  Include matching rules for common scenarios Applies policies at fine-grained level (searching for specific members or attributes) or coarse-grained (all types in a namespace or assembly)  Include handlers that integrate with Enterprise Library to implement common cross-cutting concerns Validation, Logging, Authorization, Exception Handling, Caching, Performance Counters  Allow users to use custom interception mechanisms

Policy Injection Application Block – Basics  Policy Injection Application Block provides a factory for creating or wrapping policy-enabled objects  If policies are defined in attributes or configuration, a proxy is returned in lieu of the real object  When calling policy-enabled members, a handler pipeline is executed before and after the real member is called  Each handler can read and manipulate the data going in and out of the call

Defining Policies  Policies defined in configuration consist of a set of matching rules and the definition of the handler pipeline  Matching rules are predicates that specify which members the policy should apply to  Handlers can also be applied directly to types and members using attributes [ValidationCallHandler] public void Deposit( [RangeValidator(typeof(Decimal), "0.0", RangeBoundaryType.Exclusive, "0.0", RangeBoundaryType.Ignore)] decimal depositAmount) { balance += depositAmount; } [ValidationCallHandler] public void Deposit( [RangeValidator(typeof(Decimal), "0.0", RangeBoundaryType.Exclusive, "0.0", RangeBoundaryType.Ignore)] decimal depositAmount) { balance += depositAmount; }

Supplied Handlers  Validation Handler Validates parameters to a method using validation rules defined for the types or as attributes attached to the parameters. If validation fails, an exception is returned and the method is not called.  Logging Handler Logs before and/or after the method is called, optionally including the call stack, parameter values, return values, exceptions and call execution time  Authorization Handler Uses the specified Authorization provider to check if the current user (thread principal) is authorized to perform the operation. If authorization fails, an exception is returned and the method is not called.

Supplied Handlers (continued)  Exception Handling Handler If the method throws an exception, the exception is processed using the Exception Handling Application Block and the returned exception is sent back to the called  Caching Handler Checks if the method has recently been called, and if so, returns the cached return value instead of calling the method. If not, the method is called and the return value is cached for future use  Performance Counter Handler Increments a number of performance counters to measure the number of times the method is called, the rate at which it is called, the average call duration and the number of exceptions thrown

Improvements to Existing Application Blocks

Data Access Application Block  SQL Server Compact Edition provider New SqlCeDatabase class that integrates with the SQL CE managed provider  TransactionScope integration Prevents escalation to DTC when multiple updates are made to the same database within a TransactionScope context  Batch updates UpdateDataset now supports an updateBatch size parameter

Logging Application Block  Rolling Flat File Trace Listener Automatically creates a new file based on file size or date/time  Improved Text Formatter Reflected Property Token, to retrieve data out of custom LogEntry types Display timestamps in local or UTC time

.NET Framework 3.0 Integration

WCF Integration  Exception Handling Application Block ExceptionShieldingBehavior can be specified on a service contract Calls the Exception Handling Application Block to shield exceptions from the caller  Logging Application Block EntLibLoggingProxyTraceListener can be configured to enable the Logging Application Block to process WCF trace events XmlTraceListener can be used with the block to output events in the format consumable by WCF diagnostics tools  Validation Application Block ValidationBehavior can be specified on a service contract to enable validation of data contracts

Configuration Improvements

Visual Studio-integrated Configuration Tool  Edit configuration from within the IDE  Launched from.config files in the Solution Explorer  Can be configured to point to different sets of assemblies

Environmental Overrides  Simplifies management of configuration files across multiple environments  Separates master configuration files from environment-specific delta files  Specify which settings to override on a node-by- node basis  Merge configuration files using the configuration tool or a command-line tool

Manageable Configuration Source  Configuration Source designed to make it easier to build more manageable applications  Based on the FileConfigurationSource, allowing applications to read configuration from any.config file, plus: Administrators may publish changes to applications’ configuration using Group Policy The resulting merged configuration is published using WMI to enable querying through operations tools such as Microsoft Operations Manager  No code changes required by developers to support this!

Automation

Application Block Software Factory  Enterprise Library 3.0 includes a new software factory for building your own application blocks and extensions to existing application blocks  Features include: Code generation in either C# or Visual Basic.NET Solution templates for Application Blocks and Provider Libraries Recipes to create custom providers for Enterprise Library application blocks Including Validators, Trace Listeners, Exception Handlers and Authorization Providers Strongly-typed or property bag-based configuration Recipes to create new factories, provider bases and providers for your own blocks Recipes to create design-time configuration code from runtime configuration classes

Application Block Software Factory

Strong Naming Guidance Package  Strong-naming Enterprise Library is recommended, but complex 90+ projects, including design-time and tests Use of [InternalsVisibleTo] attribute for testing  Strong Naming Guidance Package automates: Generating strong-name key pairs Specifying that projects should be strong-named Updating [InternalsVisibleTo] to include public key  Can be run on Enterprise Library or any other solution  Enterprise Library 3.0 also ships with pre-built, strong- named assemblies which you can use if you don’t want to modify the code.

finally {

Migration from previous versions  This release is 100% API compatible with the previous January 2006 release of Enterprise Library  Configuration formats for existing blocks are unchanged, but assembly version numbers and possibly public key tokens will need to be changed  Multiple versions of Enterprise Library can be installed on the same machine, but cannot be used together in the same application  Enterprise Library 3.0 can be used with either.NET Framework 2.0 or.NET Framework 3.0 installed WCF-specific functionality requires.NET Framework 3.0

Resources  Download Enterprise Library and related resources from:  Join the Enterprise Library Community at:  Read blogs from the Enterprise Library team at: