Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enterprise Library Overview Tom Hollander Product Manager Microsoft Edward Jezierski ArchitectMicrosoft Kyle Huntley Architect Avanade Ron Jacobs Product.

Similar presentations


Presentation on theme: "Enterprise Library Overview Tom Hollander Product Manager Microsoft Edward Jezierski ArchitectMicrosoft Kyle Huntley Architect Avanade Ron Jacobs Product."— Presentation transcript:

1 Enterprise Library Overview Tom Hollander Product Manager Microsoft Edward Jezierski ArchitectMicrosoft Kyle Huntley Architect Avanade Ron Jacobs Product Manager Microsoft

2 Agenda Architectural Guidance from patterns & practices Application Blocks Enterprise Library Vision Enterprise Library Application Blocks ConfigurationCryptography Data Access SecurityDemonstrationQuestions Logging & Instrumentation Exception Handling Caching

3 patterns & practices Architecture Guidance for the Enterprise Reference Architectures Application Blocks Guides Guidance for broad horizontal topics such as security, performance, deployment and operations Patterns DADI A D I DADI A D I Atomic solutions to recurring problems Sub-system-level guidance for common services System-level guidance for common customer scenarios DADI A D I Available online : http://www.microsoft.com/practices Books available: http://www.amazon.com/practices http://www.amazon.com/practices Proven Based on field experience Authoritative Offer the best advice available Accurate Technically validated and tested Actionable Provide the steps to success Relevant Address real-world problems based on customer scenarios

4 Sound familiar? Writing a component to make it simpler to call stored procedures Building a component that allows you to log errors to different sources Building framework / infrastructure components to generally simplify app development Searching on the internet thinking Most applications need something like this People must have written hundreds of things like this I wish I could find a solution for this that I could reuse …wishing Microsoft had done some of this for you?

5 App Block History Application blocks have been around for a couple of years The block program evolved over time with many different teams Blocks range from very simple helpers like the original data access block to powerful frameworks like UIP It’s a good start but you can always do better...and you have been telling us what you want

6 Application Block Feedback Make blocks consistent Make blocks work well together Minimize dependencies On other blocks On infrastructure Make it easier to configure blocks Make evaluation and understanding of blocks easier Make using blocks easier

7 Enterprise Library Philosophy Consistency Apply consistent design patterns and implementation approaches Extensibility Include extensibility points allowing developers to customize the behavior of the blocks by plugging in their own code or customize by directly modifying source code Ease of Use Leverage a graphical configuration tool Provide a simpler installation procedure Include clear and complete documentation and samples Integration Application blocks should be designed to work well together and tested to make sure that they do. But it should also be possible to use the application blocks individually

8 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

9 p&p Enterprise Library Enterprise Library Vision Partner blocks Customer blocks Community blocks p&p blocks Partner X library Customer Y library Customer Z library Block Specification

10 Enterprise Library 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

11 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

12 Configuration Scenarios Application needs to read and/or write complex configuration data at runtime Application which must store sensitive data (password) in configuration Application or block with design time support in the form of property pages, wizards and validation to assist developers in getting configuration right Administrator deploying an application needs to change configuration and you want to provide a better experience than using notepad to edit XML configuration files

13 Configuration Application Block Configuration Application Block (Runtime) Improves integration Supports pluggable storage providers and transformations Improves ease of use Read & Write Model Supports object graphs Notifications when config store changes Improves Security Supports Encryption Configuration Tool (Design- time) Uses Configuration Application Block Improves ease of use Wizards Property Sheets Validation Improves Security Supports Encryption Masking   Provides a general purpose configuration runtime which allows applications to easily read and write configuration data from configurable storage locations

14 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

15 Cryptography Scenarios You need to encrypt sensitive data using a symmetric key before storing in the database and decrypt when reading You need to encrypt information (without using keys) for use on a single machine You need to create a hash of a password to store in a database and be able to compare that hash with a user supplied hash to see if you have a match without storing the user password

16 Cryptography Application Block Improves Security Provides a simplified approach to implementing common cryptography scenarios Improves Ease Of Use Provides operations on both strings and byte streams CreateHashCompareHashEncryptSymmetricDecryptSymmetric Improves Integration Supports all.NET crypto algorithms out of the box, or implement your own Supports DPAPI for keyless crypto on a single machine Algorithms and keys can be managed through the configuration tool

17 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

18 Data Access Needs A simple and efficient way of working with commonly used databases Transparency when developing for multiple types of databases A way to place an indirection between a logical database instance and a physical database instance An easy way to adjust and validate the database configuration settings

19 Data Access Application Block Provides access to the most often used features of ADO.NET with applied best practices Improve Consistency Write code that works against multiple database brands (caveats apply!) Improve Security Leverages the crypto block and configuration system to securely store connection strings Improve ease of use Easily call a stored procedure with one line of code

20 Data Access - Example Public Function GetProductsInCategory(ByRef Category As Integer) As DataSet ' Create the Database object, using the default database service. The ' default database service is determined through configuration. Dim db As Database = DatabaseFactory.CreateDatabase() ' Invoke the stored procedure with one line of code! return db.ExecuteDataSet("GetProductsByCategory", Category) ' Note: connection was closed by ExecuteDataSet method call End Function

21 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

22 Security Scenarios You need to authenticate users Using one or more security systems or mechanisms You need to authorize users Using one or more security systems or mechanisms You need to determine which roles a user is in Using one or more security systems or mechanisms You need to store and retrieve user profile information Using one or more security systems or mechanisms You need to cache authentication or authorization data for the duration of a logon session

23 Security Application Block Encapsulate common application security tasks Present a standard, provider model for common security tasks Minimize the need for custom security- related code Incorporate best practices for application security

24 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

25 Logging Needs You need to log business and operations data to various destinations, which are externally configurable You need to provide tracing to support production debugging You need to provide auditing for increased security You need to be able to specify which messages go where, and how they are formatted You need to be able to log messages to a wide variety of destinations

26 Logging & Instrumentation Application Block Provides a simple model for logging events Replaces the Enterprise Instrumentation Framework and the existing Logging Application Block Configuration driven – you decide what messages are logged where at runtime. Sinks provided include Event Log Database Text File MSMQ EmailWMI Create your own…

27 Logging - Example Dim log As LogEntry = New LogEntry Dim log As LogEntry = New LogEntry log.Message = “Your message here…” log.Message = “Your message here…” log.Priority = 1 log.Priority = 1 log.EventId = 100 log.EventId = 100 log.Category = "Debug" log.Category = "Debug" Logger.Write(log) Logger.Write(log) // Or if you prefer one line... Customer cust = GetCustomer(123); // Log the customer – will call // cust.ToString() for the log entry Logger.Write(cust, Category, Priority);

28 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

29 Exception Handling Needs You need consistent exception handling behavior throughout your application You need to implement best practice guidance for exception handling Don’t inadvertently disclose security sensitive information to remote callers Add context to exceptions by wrapping or replacing exceptions with more relevant exceptions You need to make it simple to add exception management boilerplate code

30 Exception Handling Application Block Provides simple mechanism that allows you to consistently deal with exceptions throughout your application Define “Exception Policies” which link an exception to an action Exceptions of type ApplicationException should be logged Exceptions of type SqlClientException should be caught and wrapped with an exception of type DataLayerException and re- thrown Exceptions of type SecurityException should caught and replaced with an AccessDeniedException which will be thrown Actions provided include Logging Wrapping one exception with another Replacing one exception with an other Create your own actions…

31 Exception Handling - Example Try ' some code that may throw Catch Ex As Exception If ExceptionPolicy.HandleException(ex, “DataLayer”) _ Then Throw End Try

32 Security Crypto Configuration DataAccessLogging CachingExceptions Enterprise Library v1 Legend Dependency Plug-in ConfigTool

33 Caching Scenarios You are creating a smart client application that uses locally cached reference data to create requests and support offline operations You are creating a Windows Service or Console application which needs a cache to improve performance

34 Caching Application Block Provides a flexible and extensible caching mechanism that can be used at all layers of an application Supports backing stores that persist cache data into a database or isolated storage, so the data can survive app restarts Easy to use Easy to configure, using the Enterprise Library Configuration Tool Thread-safe Ensures that the states of the in-memory cache and the backing store remain synchronized.

35 Using Enterprise Library Enterprise Library is provided “as-is” You are free to extend or modify it to suit your needs Using Enterprise Library is no different than using code that you wrote yourself If you have used previous versions of application blocks you have some options Leave the code alone Add new functionality using Enterprise library and use it side by side with the old application blocks Rewrite to use the new application blocks, if they provide enough value to justify the extra development time

36 Announcing: Enterprise Library 1.0 http://www.microsoft.com/practices Download it Today!

37 Future plans We will continue to invest in blocks and block libraries Additional capabilities and scenarios New blocks, such as Validation Updating existing application blocks, such as UIP Scenarios such as Smart Client Enablement Visual Studio tooling and wizards Deeper community penetration.NET 2.0 / Visual Studio 2005 release Blocks revved to adhere to best practices of new platform Integration with new VS2005 experiences

38 http://www.microsoft.com/practices http://www.microsoft.com/practices Enterprise Library Community http://go.microsoft.com/fwlink/?linkid=39209&clcid=0x09 http://go.microsoft.com/fwlink/?linkid=39209&clcid=0x09 http://www.microsoft.com/practices http://go.microsoft.com/fwlink/?linkid=39209&clcid=0x09


Download ppt "Enterprise Library Overview Tom Hollander Product Manager Microsoft Edward Jezierski ArchitectMicrosoft Kyle Huntley Architect Avanade Ron Jacobs Product."

Similar presentations


Ads by Google