You are previewing Enterprise Solution Patterns Using Microsoft® .NET.
O'Reilly logo
Enterprise Solution Patterns Using Microsoft® .NET

Book Description

Get expert guidance on patterns—simple mechanisms by which software professionals can share important architectural tradeoffs and design decisions—and help reduce the complexity of building high-performance, enterprise-class solutions.

Table of Contents

  1. Enterprise Solution Patterns Using Microsoft .NET: Version 2.0 patterns & practices
  2. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  3. Foreword
  4. Preface
    1. Who Should Read This Book
    2. How This Book Is Organized
    3. Documentation Conventions
    4. Community
    5. Feedback and Support
    6. Acknowledgments
  5. 1. Patterns for Building Enterprise Solutions
    1. Patterns Document Simple Mechanisms
      1. Patterns as Problem-Solution Pairs
      2. Patterns at Different Levels
      3. Simple Refinement
    2. Common Vocabulary
      1. Concise Solution Description
    3. Summary
  6. 2. Organizing Patterns
    1. Pattern of Patterns
    2. Pattern Clusters
    3. Different Levels of Abstraction
      1. Architecture Patterns
      2. Design Patterns
      3. Implementation Patterns
    4. Viewpoints
    5. The Pattern Frame
    6. Constraints
    7. Pattlets
    8. Pattern Language for Solutions
    9. Summary
  7. 3. Web Presentation Patterns
    1. Complexity and Redundancy
    2. Patterns Overview
      1. More Powerful Controllers
      2. Filters and Caching
    3. Web Presentation Patterns
    4. Model-View-Controller
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Variations
      5. Example
      6. Testing Considerations
      7. Resulting Context
        1. Benefits
        2. Liabilities
      8. Variants
      9. Related Patterns
      10. Acknowledgments
    5. Implementing Model-View-Controller in ASP.NET
      1. Context
      2. Implementation Strategy
        1. Single ASP.NET Page
        2. Code-Behind Refactoring
          1. View
          2. Model-Controller
        3. Model-View-Controller Refactoring
          1. Model
          2. Controller
      3. Tests
      4. Resulting Context
        1. Benefits
        2. Liabilities
      5. Related Patterns
      6. Acknowledgments
    6. Page Controller
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Variants
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Testing Considerations
      8. Related Patterns
      9. Acknowledgments
    7. Implementing Page Controller in ASP.NET
      1. Context
      2. Implementation Strategy
        1. Page Life Cycle
        2. Simple Page Example
        3. Common Look and Feel Example
          1. BasePage.cs
          2. BasePage.inc
          3. DatabaseGateway.cs
          4. Page1.aspx
          5. Page1.aspx.cs
      3. Testing Considerations
      4. Resulting Context
        1. Benefits
        2. Liabilities
      5. Related Patterns
      6. Acknowledgments
    8. Front Controller
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Testing Considerations
      8. Related Patterns
      9. Acknowledgments
    9. Implementing Front Controller in ASP.NET Using HTTPHandler
      1. Context
      2. Background
        1. Changing Requirements
      3. Implementation Strategy
        1. Handler
          1. Handler.cs
          2. Command.cs
          3. CommandFactory.cs
          4. Configuring the Handler
        2. Commands
          1. RedirectingCommand.cs
          2. UrlMap.cs
          3. MicroSite.cs
          4. MacroSite.cs
          5. WebUsersDatabase.cs
          6. MacroUsersDatabase.cs
        3. Views
          1. BasePage.cs
          2. ActualPage1.aspx.cs and ActualPage2.aspx
      4. Testing Considerations
        1. CommandFixture.cs
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    10. Intercepting Filter
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Filter Chain
        2. Decorator
        3. Event-Driven Filters
      5. Variations
      6. Example
      7. Resulting Context
        1. Benefits
        2. Liabilities
        3. Intercepting Filter vs. Controller
      8. Related Patterns
      9. Acknowledgments
    11. Implementing Intercepting Filter in ASP.NET Using HTTP Module
      1. Context
      2. Implementation Strategy
        1. Events
      3. Examples
      4. Testing Considerations
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    12. Page Cache
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Structure
        2. Dynamics
        3. Implementation
          1. Page Storage
          2. Page Indexing
          3. Cache Refresh
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
    13. Implementing Page Cache in ASP.NET Using Absolute Expiration
      1. Context
      2. Implementation Strategy
      3. Testing Considerations
      4. Resulting Context
        1. Benefits
        2. Liabilities
      5. Variants
      6. Related Patterns
    14. Observer
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Propagating State Information
        2. When to Trigger an Update
        3. Observers Affecting State Change
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
      8. Acknowledgments
    15. Implementing Observer in .NET
      1. Context
      2. Background
        1. Album.cs
        2. BillingService.cs
        3. Client.cs
      3. Implementation Strategy
        1. Observer
          1. Observer.cs
          2. Subject.cs
          3. Album.cs
          4. BillingService.cs
          5. Client.cs
        2. Modified Observer
          1. Subject.cs
          2. SubjectHelper.cs
          3. Album.cs
          4. Client.cs
        3. Observer in .NET
          1. Album.cs
          2. BillingService.cs
          3. Client.cs
      4. Testing Considerations
        1. AlbumFixture.cs
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
  8. 4. Deployment Patterns
    1. Bringing Teams Together
    2. Patterns Overview
      1. Application Patterns
      2. Infrastructure Patterns
      3. Bringing Applications and Infrastructure Together
    3. Deployment Patterns
    4. Layered Application
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Structure
        2. Dynamics
        3. Implementation
          1. Creating Your Own Layering Scheme
          2. Reusing an Existing Layering Scheme
        4. Testing Considerations
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Acknowledgments
    5. Three-Layered Services Application
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Presentation Layer
          1. User Interface Components
          2. User Interface Process Components
        2. Business Layer
          1. Business Components
          2. Business Workflows
          3. Business Entities
          4. Service Interfaces
        3. Data Layer
          1. Data Access Components
          2. Service Gateways
        4. Foundation Services
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Acknowledgments
    6. Tiered Distribution
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Example
        1. Single-Tiered Solution
        2. Two-Tiered Solution
        3. Three-Tiered Solution
        4. Four-Tiered Solution
        5. Summary
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
      8. Acknowledgments
    7. Three-Tiered Distribution
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Client Tier
          1. Hardware
          2. Software
          3. Security
        2. Application Tier
          1. Hardware
          2. Software
          3. Security
        3. Data Tier
          1. Hardware
          2. Software
          3. Security
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    8. Deployment Plan
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Simple Web Application
        2. Complex Web Application
        3. Extended Enterprise Application
        4. Smart Client Application
      5. Resulting Context
  9. 5. Distributed Systems Patterns
    1. Instance-Based vs. Service-Based Collaboration
    2. Near Links vs. Far Links
    3. Distributed Computing Challenges
    4. Using Layered Application
    5. Patterns Overview
      1. Remote Invocation
      2. Local Copy
        1. Server-Activated Objects
      3. Client-Activated Objects
      4. Coarse-Grained Interfaces
      5. Data Transfer Object
    6. Distributed Systems Patterns
    7. Broker
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Server Look-Up
        2. Broker as Intermediary
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Security Considerations
      8. Related Patterns
      9. Acknowledgments
    8. Implementing Broker with .NET Remoting Using Server-Activated Objects
      1. Context
      2. Background on .NET Remoting
        1. Server Activation
        2. Choosing a Protocol and Serialization Mechanism
      3. Implementation Strategy
        1. Server Object
          1. RecordingsManager.cs
          2. IRecordingsManager.cs
          3. RecordingsManager.cs (Remote-Enabled)
        2. HttpChannel: SOAP Serialization
          1. HttpServer.cs
          2. HttpClient.cs
        3. TcpChannel: Binary Serialization
          1. TcpServer.cs
          2. TcpClient.cs
      4. Deployment Considerations
      5. Tests
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Security Considerations
      8. Operational Considerations
      9. Related Patterns
      10. Acknowledgments
    9. Implementing Broker with .NET Remoting Using Client-Activated Objects
      1. Context
      2. Implementation Strategy
        1. Client-Activated Object Implementation
          1. RecordingsManager.cs
          2. HttpServer.cs
          3. HttpClient.cs
        2. Hybrid Approach
          1. IRecordingsManager.cs
          2. IRecordingsFactory.cs
          3. RecordingsFactory.cs
          4. RecordingsManager.cs
          5. HttpServer.cs
          6. HttpClient.cs
      3. Resulting Context
        1. Benefits
        2. Liabilities
      4. Security Considerations
      5. Operational Considerations
      6. Related Patterns
      7. Acknowledgments
    10. Data Transfer Object
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Example
      6. Testing Considerations
      7. Security Considerations
      8. Resulting Context
        1. Benefits
        2. Liabilities
      9. Related Patterns
      10. Acknowledgments
    11. Implementing Data Transfer Object in .NET with a DataSet
      1. Context
      2. Background
        1. Database Schema
        2. Implementing a DTO
      3. Implementation Strategy
        1. Filling a DataSet from the Database
        2. Assembler.cs
        3. Using a DataSet in an ASP.NET Page
      4. Tests
        1. RecordingAssemblerFixture.cs
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    12. Implementing Data Transfer Object in .NET with a Typed DataSet
      1. Context
      2. Background
        1. Database Schema
        2. Implementing a DTO
      3. Implementation Strategy
        1. Creating a Typed DataSet
          1. RecordingDto.xsd
        2. Filling a Typed DataSet from the Database
          1. Assembler.cs
        3. Using a Typed DataSet in an ASP.NET Page
      4. Tests
        1. AssemblerFixture.cs
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    13. Singleton
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
      8. Acknowledgments
    14. Implementing Singleton in C#
      1. Context
      2. Implementation Strategy
        1. Singleton
        2. Static Initialization
        3. Multithreaded Singleton
      3. Resulting Context
        1. Benefits
        2. Liabilities
      4. Acknowledgments
  10. 6. Services Patterns
    1. Collaboration Concepts
      1. Service-Based Collaboration
      2. Service-Oriented Architecture
      3. Service Contracts
    2. Web Services
      1. Communication Contract
        1. Common Communications Channel
        2. Data Representation and Message Schemas
          1. Data Representation Format
          2. Message Schema
          3. Message Binding
      2. Interoperability
        1. Open Standards
        2. Service Repository
        3. UDDI
    3. Patterns Overview
    4. Services Patterns
    5. Service Interface
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Service Interface
        2. Minimizing the Number of Service Interfaces
      5. Example
      6. Testing Considerations
      7. Resulting Context
        1. Benefits
        2. Liabilities
      8. Related Patterns
      9. Acknowledgments
    6. Implementing Service Interface in .NET
      1. Context
      2. Background
      3. Implementation Strategy
        1. Service Interface Implementation
          1. Contract
          2. Recording.xsd
          3. Recording.cs
          4. RecordingCatalog.asmx.cs
          5. RecordingAssembler.cs
        2. Application Logic
          1. RecordingGateway.cs
      4. Tests
        1. RecordingGatewayFixture
          1. RecordingAssemblerFixture
          2. AcceptanceTest.cs
      5. Resulting Context
        1. Benefits
        2. Liabilities
      6. Related Patterns
      7. Acknowledgments
    7. Service Gateway
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Example
      6. Testing Considerations
      7. Resulting Context
        1. Benefits
        2. Liabilities
      8. Related Patterns
      9. Acknowledgments
    8. Implementing Service Gateway in .NET
      1. Context
      2. Implementation Strategy
        1. Example Overview
        2. WSDL Description
        3. Service Gateway Implementation
          1. RecordingCatalog.cs
          2. Recording Data Transfer Object
          3. Track Data Transfer Object
        4. Application Implementation
          1. RetrievalForm.aspx
          2. RetrievalForm.apsx.cs
          3. RecordingDisplayAdapter.cs
          4. TrackDisplayAdapter.cs
      3. Tests
      4. Resulting Context
        1. Benefits
        2. Liabilities
      5. Related Patterns
      6. Acknowledgments
  11. 7. Performance and Reliability Patterns
    1. Meeting Operational Requirements
      1. Scalability
        1. Scaling Up
        2. Scaling Out
      2. Availability
    2. Patterns Overview
      1. Load-Balanced Cluster
      2. Failover Cluster
    3. Performance and Reliability Patterns
    4. Server Clustering
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Asymmetric Clusters
        2. Symmetric Clusters
      5. Example
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
      8. Acknowledgments
    5. Load-Balanced Cluster
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Session State Management
        2. Implementation
      5. Example
        1. Non-Load-Balanced Tier
        2. Load-Balanced Tier
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
      8. Acknowledgments
    6. Failover Cluster
      1. Context
      2. Problem
      3. Forces
      4. Solution
        1. Detecting Failure
        2. Synchronizing State
        3. Determining the Active Server
        4. Scaling Failover Cluster Servers
      5. Example
        1. Non-Failover Solution
        2. Failover Cluster Solution
      6. Resulting Context
        1. Benefits
        2. Liabilities
      7. Related Patterns
  12. A. Pattlets
  13. Bibliography
  14. Index
  15. About the Author
  16. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  17. Copyright