0%

Book Description

Develop Enterprise applications using reusable software components of Microsoft Enterprise Library 5.0

  • Develop Enterprise Applications using the Enterprise Library Application Blocks

  • Set up the initial infrastructure configuration of the Application Blocks using the configuration editor

  • A step-by-step tutorial to gradually configure each Application Block and implement its functions to develop the required Enterprise Application

  • In Detail

    Microsoft Enterprise Library is a collection of reusable software components (also known as Application Blocks) that are designed to assist developers with common enterprise development challenges. Before using an Application block, you should have a good understanding of your application requirements and of the scenarios that the Application Block is designed to address.

    This book covers the fundamental elements of each Application Block so that you get a good understanding of its concepts. This is followed by referencing the required and optional assemblies and the initial configuration of that block using the configuration editor. Finally, leverage Application Block features to achieve goals of the enterprise application development.

    You will first get an overview of the different Application Blocks in Enterprise Library and their inter-dependencies. Then you will learn to install the Enterprise library and optionally the source code. Then you will learn about the individual functional Application Blocks: the Data Access Application Block, Logging Application Block, Exception Handling Application Block, Caching Application Block, Validation Application Block, Security Application Block, and Cryptography Application Block.

    In the Caching Application Block chapter you will learn to reference the required assemblies, configure the initial settings, cache, retrieve, remove, and flush cached data. You will also learn to configure and leverage encryption providers to encrypt cached data.

    In the Validation Application Block chapter you will be introduced to concepts such as Validators, ValidatorFactory, ValidationResults, and so on. You will learn to reference the required assemblies, set up the initial configuration, validate objects using attributes, validate values programmatically, validate using configuration, and also learn to integrate the Application block with Windows Forms and ASP.NET. Finally you will learn to implement a custom validator.

    In the Security Application Block chapter you will be introduced to Authorization Providers and the Security Cache Provider. You will then learn about referencing required assemblies, configure security settings, and learn to set up and validate based on the authorization rules. You will also learn to leverage the Security cache provider to cache user Identity, Principal, and Profile. Finally you will learn to implement a custom Authorization Provider.

    In the Cryptography Application Block chapter you will be introduced to Hashing and Cryptography providers; you will learn to reference required assemblies, set up the initial configuration, generate/compare hash values, and implement a custom hash provider. You will also learn to encrypt/decrypt data and also implement a custom symmetric cryptography provider.

    A step by step tutorial that guides you through the process of building Enterprise applications using the Application Blocks in Microsoft Enterprise Library 5.0.

    Table of Contents

    1. Microsoft Enterprise Library 5.0
      1. Microsoft Enterprise Library 5.0
      2. Credits
      3. About the Author
      4. Acknowledgement
      5. About the Reviewers
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Getting Started with Enterprise Library
        1. Introducing Enterprise Library
        2. Wiring Application Blocks
          1. Unity Application Block
          2. Policy Injection Application Block
        3. Functional Application Blocks
          1. Data Access Application Block
          2. Logging Application Block
          3. Exception Handling Application Block
          4. Caching Application Block
          5. Validation Application Block
          6. Security Application Block
          7. Cryptography Application Block
        4. Functional Application Block Dependency
        5. System requirements
        6. Installing Enterprise Library
          1. Enterprise Library Binaries
          2. Configuration Editor for Visual Studio
          3. Source Code of Enterprise Library
        7. Summary
      8. 2. Data Access Application Block
        1. Working of Data Access Application Block
        2. Developing an application
          1. Referencing the required assemblies
          2. Adding Data Access Settings
          3. Adding a namespace
          4. Understanding the Database class
            1. SqlDatabase class
            2. SqlCeDatabase class
            3. OracleDatabase class
            4. GenericDatabase class
          5. Creating a Database instance
            1. Using the DatabaseFactory class
            2. Using Unity service locator
            3. Using Unity container directly
        3. Retrieving records using ExecuteReader
        4. Retrieving records using DataSet
        5. Retrieving a record as an object
          1. Parameter mappers
          2. Output mappers
            1. Default row mappers
            2. Row mapping using MapBuilder
            3. Row mapping using IRowMapper<TResult>
            4. Result Set mappers
          3. Data Accessors
          4. Creating and executing Accessors
        6. Retrieving multiple records as an object collection
        7. Retrieving records as XML
        8. Executing a command using ExecuteNonQuery
        9. Retrieving scalar values
        10. Updating records using DataSet
        11. Working with transactions
        12. Summary
      9. 3. Logging Application Block
        1. Developing an application
          1. Referencing assemblies
          2. Adding Logging Settings
          3. Adding namespaces
          4. Writing a log message
        2. Exploring design elements
          1. LogEntry
          2. Logger
            1. Using Logger
          3. LogWriter
          4. Adding trace source categories
            1. Configuring special categories
            2. Configuring log categories
          5. Configuring trace listeners
            1. Configuring Event Log Trace Listener
            2. Configuring Flat File Trace Listener
            3. Configuring Rolling Flat File Trace Listener
            4. Configuring XML Trace Listener
            5. Configuring Database Trace Listener
            6. Configuring to send log messages to an e-mail address
            7. Configuring System Diagnostics Trace Listener
            8. Configuring Message Queuing Trace Listener
            9. Configuring WMI Trace Listener
            10. Configuring custom trace listeners
          6. Configuring log message formatters
          7. Configuring logging filters
            1. Adding a category filter
            2. Adding a logging enabled filter
            3. Adding a priority filter
          8. TraceManager and Tracer
            1. Tracing activities
          9. Customizing Logging block elements
            1. Implementing a custom trace listener
              1. Configuring the custom trace listener
            2. Implementing a custom log formatter
              1. Configuring the custom log formatter
            3. Implementing a custom log filter
              1. Configuring the custom log filter
        3. Summary
      10. 4. Exception Handling Application Block
        1. Developing an application
          1. Referencing required assemblies
          2. Adding initial Exception Handling settings
          3. Adding namespaces
          4. Understanding the Exception Handling block
            1. Exception policy
            2. Exception types
            3. Exception handler
            4. Exception Manager class
              1. HandleException method
              2. Process method
          5. Stitching together: Exception Policy/Type/Handler
          6. Creating an Exception Handling block object
            1. Using the ExceptionPolicy class
            2. Using Unity service locator
            3. Using Unity container directly
        2. Wrapping an exception using Wrap handler
          1. Configuring a Wrap exception handler
        3. Replacing an exception using Replace handler
          1. Configuring a Replace handler
        4. Logging an exception using Logging handler
          1. Configuring a Logging handler
        5. WCF fault contract exception handler
          1. Generic fault contract creation
          2. Configuring a fault contract exception handler
          3. Applying the ExceptionShielding attribute
          4. Exception handling: WCF Service consumer
        6. Implementing custom exception handler
          1. Configuring custom exception handler
        7. Summary
      11. 5. Caching Application Block
        1. Developing an application
          1. Referencing the required assemblies
          2. Adding the initial Caching Settings
          3. Adding namespaces
          4. Creating the CacheManager instance
            1. Using the static factory class
            2. Using the Unity Service Locator
            3. Using the Unity container directly
          5. Configuring the in-memory backing store
          6. Adding items to cache
            1. Understanding the expiration process
          7. Expiration policies
            1. Understanding the Scavenging process
          8. Reading cached items
          9. Removing cached items
          10. Flushing cached items
        2. Reloading expired items
        3. Configuring Isolated Cache Storage Backing Store
        4. Configuring Database Cache Storage
        5. Configuring and encrypting cached data
          1. Configuration steps
        6. Summary
      12. 6. Validation Application Block
        1. Validation Application Block features
        2. Developing an application
          1. Referencing the required assemblies
          2. Adding namespaces
        3. Understanding Validators
          1. Value Validators
          2. Object Validators
          3. Single Member Validators
          4. Composite Validators
        4. Understanding Rule Sets
        5. Understanding ValidatorFactory
        6. Understanding ValidationResults
        7. Validating objects using attributes
        8. Validating values programmatically
        9. Validating objects using self-validation
        10. Validating objects using configuration
        11. Integrating with Windows Forms-based applications
          1. Steps to leverage ValidationProvider
        12. Integrating the Validation block with ASP.NET
        13. Implementing a Custom Validator
        14. Summary
      13. 7. Security Application Block
        1. Developing an application
          1. Referencing required/optional assemblies
          2. Adding initial security settings
          3. Adding namespaces
          4. Creating security application block objects
            1. Using the static factory class
            2. Using Unity service locator
            3. Using Unity container directly
          5. Understanding Authorization Providers
            1. Authorization Rule Provider
              1. Authorizing using Authorization Rule Provider
            2. AzMan Authorization Provider
          6. Understanding Security Cache Provider
            1. CachingStoreProvider class
            2. Configuring Security Cache Provider
            3. Caching and generating a token for an authenticated user
          7. Associating a token with User Identity, Principal and Profile objects
            1. Retrieving User Identity, User Principal, and Profile objects
            2. Expiring User Identity, User Principal, and Profile objects
        2. Implementing a custom Authorization Provider
          1. Custom XML Authorization Provider
        3. Summary
      14. 8. Cryptography Application Block
        1. Developing an application
          1. Referencing required and optional assemblies
          2. Adding namespaces
          3. Adding initial cryptography settings
        2. Working of Hash Provider
          1. Creating CryptographyManager and IHashProvider instances
            1. Using the static facade
            2. Using Unity service locator
            3. Using Unity container directly
          2. Configuring Hash Provider
          3. Generating a hash value
          4. Comparing hash values
          5. Implementing a custom Hash Provider
            1. Configuring a Custom Hash Provider
        3. Working of symmetric cryptography providers
          1. Creating CryptographyManager and ISymmetricCryptoProvider instances
            1. Using the static facade
            2. Using Unity service locator
            3. Using Unity container directly
          2. Configuring the symmetric cryptography provider
          3. Exporting the key
          4. Encrypting data
          5. Decrypting data
          6. Implementing a custom symmetric provider
            1. Configuring the custom symmetric provider
        4. Summary
    18.189.170.134