You are previewing Microsoft® Application Architecture Guide, 2nd Edition.
O'Reilly logo
Microsoft® Application Architecture Guide, 2nd Edition

Book Description

The definitive guide from the Microsoft patterns & practices team on designing applications for the Microsoft application platform

Table of Contents

  1. Microsoft® Application Architecture Guide, 2nd Edition
  2. Foreword by S. Somasegar
  3. Foreword by Scott Guthrie
  4. Preface by David Hill
  5. Introducing the Guide
    1. Audience
    2. How to Use This Guide
    3. Feedback and Support
      1. Technical Support
      2. Community and Newsgroup Support
    4. The Team Who Brought You This Guide
      1. Contributors and Reviewers
    5. Tell Us About Your Success
  6. I. Software Architecture and Design
    1. 1. What Is Software Architecture?
      1. Why Is Architecture Important?
      2. The Goals of Architecture
        1. The Architectural Landscape
      3. The Principles of Architecture Design
        1. Key Architecture Principles
        2. Additional Resources
    2. 2. Key Principles of Software Architecture
      1. Overview
      2. Key Design Principles
      3. Key Design Considerations
        1. Determine the Application Type
        2. Determine the Deployment Strategy
        3. Determine the Appropriate Technologies
        4. Determine the Quality Attributes
        5. Determine the Crosscutting Concerns
    3. 3. Architectural Patterns and Styles
      1. Overview
      2. What Is an Architectural Style?
      3. Summary of Key Architectural Styles
        1. Combining Architectural Styles
      4. Client/Server Architectural Style
      5. Component-Based Architectural Style
      6. Domain Driven Design Architectural Style
      7. Layered Architectural Style
      8. Message Bus Architectural Style
      9. N-Tier / 3-Tier Architectural Style
      10. Object-Oriented Architectural Style
      11. Service-Oriented Architectural Style
      12. Additional Resources
  7. II. Design Fundamentals
    1. 4. A Technique for Architecture and Design
      1. Overview
      2. Inputs, Ouyputs, and Design Steps
      3. Identify Architecture Objectives
        1. Scope and Time
      4. Key Scenarios
        1. Architecturally Significant Use Cases
      5. Application Overview
        1. Relevant Technologies
        2. Whiteboard Your Architecture
      6. Key Issues
        1. Quality Attributes
        2. Crosscutting Concerns
        3. Designing for Issue Mitigation
      7. Candidate Solutions
        1. Baseline and Candidate Architectures
        2. Architectural Spikes
      8. What to Do Next
      9. Reviewing Your Architecture
        1. Scenario-Based Evaluations
      10. Representing and Communicating Your Architecture Design
        1. Additional Resources
    2. 5. Layered Application Guidelines
      1. Overview
      2. Logical Layered Design
        1. Presentation, Business, and Data Layers
      3. Services and Layers
        1. Services Layer
      4. Design Steps for a Layered Structure
        1. Step 1 – Choose Your Layering Strategy
        2. Step 2 – Determine the Layers You Require
        3. Step 3 – Decide How to Distribute Layers and Components
        4. Step 4 – Determine If You Need to Collapse Layers
        5. Step 5 – Determine Rules for Interaction Between Layers
        6. Step 6 – Identify Cross Cutting Concerns
        7. Step 7 – Define the Interfaces between Layers
        8. Step 8 – Choose Your Deployment Strategy
        9. Step 9 – Choose Communication Protocols
    3. 6. Presentation Layer Guidelines
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Caching
        2. Communication
        3. Composition
        4. Exception Management
        5. Navigation
        6. User Experience
        7. User Interface
        8. Validation
      4. Technology Considerations
        1. Mobile Applications
        2. Rich Client Applications
        3. Rich Internet Applications
        4. Web Applications
      5. Performance Considerations
      6. Design Steps for the Presentation Layer
      7. Relevant Design Patterns
      8. patterns & practices Offerings
      9. Additional Resources
    4. 7. Business Layer Guidelines
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Authentication
        2. Authorization
        3. Caching
        4. Coupling and Cohesion
        5. Exception Management
        6. Logging, Auditing, and Instrumentation
        7. Validation
      4. Deployment Considerations
      5. Design Steps for the Business Layer
      6. Relevant Design Patterns
      7. patterns & practices Offerings
      8. Additional Resources
    5. 8. Data Layer Guidelines
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Batching
        2. Binary Large Objects
        3. Connections
        4. Data Format
        5. Exception Management
        6. Object Relational Mapping
        7. Queries
        8. Stored Procedures
        9. Stored Procedures vs. Dynamic SQL
        10. Transactions
        11. Validation
        12. XML
      4. Technology Considerations
      5. Performance Considerations
      6. Security Considerations
      7. Deployment Considerations
      8. Design Steps for the Data Layer
      9. Relevant Design Patterns
      10. Additional Resources
    6. 9. Service Layer Guidelines
      1. Overview
      2. Design Considerations
      3. Specific Design Issues
        1. Authentication
        2. Authorization
        3. Communication
        4. Exception Management
        5. Messaging Channels
        6. Message Construction
        7. Message Endpoint
        8. Message Protection
        9. Message Routing
        10. Message Transformation
        11. Service Interface
        12. Validation
      4. REST and SOAP
        1. Design Considerations for REST
        2. Design Considerations for SOAP
      5. Technology Considerations
      6. Deployment Considerations
      7. Design Steps for the Service Layer
      8. Relevant Design Patterns
      9. Additional Resources
    7. 10. Component Guidelines
      1. Overview
      2. General Guidelines for Component Design
      3. Layered Component Distribution
      4. Presentation Layer Components
      5. Services Layer Components
      6. Business Layer Components
      7. Data Layer Components
      8. Crosscutting Components
      9. Relevant Design Patterns
      10. patterns & practices Offerings
      11. Additional Resources
    8. 11. Designing Presentation Components
      1. Overview
      2. Step 1 – Understand the UI Requirements
      3. Step 2 – Determine the UI Type Required
      4. Step 3 – Choose the UI Technology
      5. Step 4 – Design the Presentation Components
        1. User Interface Components
        2. Presentation Logic Components
        3. Presentation Model Components
          1. Presentation Entities
      6. Step 5 – Determine the Binding Requirements
      7. Step 6 – Determine the Error Handling Strategy
      8. Step 7 – Determine the Validation Strategy
      9. patterns & practices Offerings
      10. Additional Resources
    9. 12. Designing Business Components
      1. Overview
      2. Step 1 – Identify Business Components Your Application Will Use
      3. Step 2 – Make Key Decisions for Business Components
      4. Step 3 – Choose Appropriate Transaction Support
      5. Step 4 – Identify How Business Rules Are Handled
      6. Step 5 – Identify Patterns That Fit the Requirements
      7. Additional Resources
    10. 13. Designing Business Entities
      1. Overview
      2. Step 1 – Choose the Representation
      3. Step 2 – Choose a Design for Business Entities
      4. Step 3 – Determine Serialization Support
      5. Domain Driven Design
      6. Additional Resources
    11. 14. Designing Workflow Components
      1. Overview
      2. Step 1 – Identify the Workflow Style Using Scenarios
      3. Step 2 – Choose an Authoring Mode
      4. Step 3 – Determine How Rules Will Be Handled
      5. Step 4 – Choose a Workflow Solution
      6. Step 5 – Design Business Components to Support Workflow
        1. Windows Workflow Foundation
        2. BizTalk Server
        3. BizTalk with ESB
        4. Using Windows Workflow Foundation and BizTalk Together
      7. Additional Resources
    12. 15. Designing Data Components
      1. Overview
      2. Step 1 – Choose a Data Access Technology
      3. Step 2 – Choose How to Retrieve and Persist Business Objects from the Data Store
      4. Step 3 – Determine How to Connect to the Data Source
        1. Connections
        2. Connection Pooling
        3. Transactions and Concurrency
      5. Step 4 – Determine Strategies for Handling Data Source Errors
        1. Exceptions
        2. Retry Logic
        3. Timeouts
      6. Step 5 – Design Service Agent Objects (Optional)
      7. Additional Resources
    13. 16. Quality Attributes
      1. Overview
      2. Common Quality Attributes
        1. Availability
        2. Conceptual Integrity
        3. Interoperability
        4. Maintainability
        5. Manageability
        6. Performance
        7. Reliability
        8. Reusability
        9. Scalability
        10. Security
        11. Supportability
        12. Testability
        13. User Experience / Usability
      3. Additional Resources
    14. 17. Crosscutting Concerns
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Authentication
        2. Authorization
        3. Caching
        4. Communication
        5. Configuration Management
        6. Exception Management
        7. Logging and Instrumentation
        8. State Management
        9. Validation
      4. Design Steps for Caching
        1. Step 1 – Determine the Data to Cache
        2. Step 2 – Determine Where to Cache Data
        3. Step 3 – Determine the Format of Your Data to Cache
        4. Step 4 – Determine a Suitable Cache Management Strategy
        5. Step 5 – Determine How to Load the Cache Data
      5. Design Steps for Exception Management
        1. Step 1 – Identify Exceptions That You Want to Handle
        2. Step 2 – Determine Your Exception Detection Strategy
        3. Step 3 – Determine Your Exception Propagation Strategy
        4. Step 4 – Determine Your Custom Exception Strategy
        5. Step 5 – Determine Appropriate Information to Gather
        6. Step 6 – Determine Your Exception Logging Strategy
        7. Step 7 – Determine Your Exception Notification Strategy
        8. Step 8 – Determine How to Handle Unhandled Exceptions
      6. Design Steps for Validating Input and Data
        1. Step 1 – Identify your Trust Boundaries
        2. Step 2 – Identify Key Scenarios
        3. Step 3 – Determine Where to Validate
        4. Step 4 – Identify Validation Strategies
      7. Relevant Design Patterns
      8. patterns & practices Solution Assets
      9. Additional Resources
    15. 18. Communication and Messaging
      1. Overview
      2. General Design Guidelines
      3. Message-Based Communication Guidelines
        1. Asynchronous vs. Synchronous Communication
        2. Coupling and Cohesion
        3. Data Formats
        4. Interoperability
        5. Performance
        6. State Management
      4. Contract First Design
      5. Security Considerations
        1. Transport Security
        2. Message Security
      6. Technology Options
        1. WCF Technology Options
        2. ASMX Technology Options
      7. Additional Resources
    16. 19. Physical Tiers and Deployment
      1. Overview
      2. Distributed and Nondistributed Deployment
        1. Nondistributed Deployment
        2. Distributed Deployment
        3. Performance and Design Considerations for Distributed Environments
        4. Recommendations for Locating Components within a Distributed Deployment
      3. Distributed Deployment Patterns
        1. Client-Server Deployment
        2. n-Tier Deployment
        3. 2-Tier Deployment
        4. 3-Tier Deployment
        5. 4-Tier Deployment
        6. Web Application Deployment
        7. Rich Internet Application Deployment
        8. Rich Client Application Deployment
      4. Performance Patterns
        1. Load-balanced Cluster
        2. Affinity and User Sessions
        3. Application Farms
      5. Reliability Patterns
        1. Failover Cluster
      6. Security Patterns
        1. Impersonation/Delegation
        2. Trusted Subsystem
        3. Multiple Trusted Service Identities
      7. Scale Up and Scale Out
        1. Considerations for Scaling Up
        2. Designing to Support Scale Out
        3. Design Implications and Tradeoffs
        4. Stateless Components
        5. Data and Database Partitioning
      8. Network Infrastructure Security Considerations
      9. Manageability Considerations
      10. Relevant Design Patterns
      11. Additional Resources
  8. III. Application Archetypes
    1. 20. Choosing an Application Type
      1. Overview
      2. Application Archetypes Summary
        1. Application Type Considerations
      3. Mobile Application Archetype
      4. Rich Client Application Archetype
      5. Rich Internet Application Archetype
      6. Service Archetype
      7. Web Application Archetype
    2. 21. Designing Web Applications
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Application Request Processing
        2. Authentication
        3. Authorization
        4. Caching
        5. Exception Management
        6. Logging and Instrumentation
        7. Navigation
        8. Page Layout
        9. Page Rendering
        10. Session Management
        11. Validation
      4. Design Considerations for Layers
        1. Presentation Layer
        2. Business Layer
        3. Data Layer
        4. Service Layer
      5. Testing and Testability Considerations
      6. Technology Considerations
      7. Deployment Considerations
        1. Nondistributed Deployment
        2. Distributed Deployment
        3. Load Balancing
      8. Relevant Design Patterns
      9. Additional Resources
    3. 22. Designing Rich Client Applications
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Business Layer
        2. Communication
        3. Composition
        4. Configuration Management
        5. Data Access
        6. Exception Management
        7. Maintainability
        8. Presentation Layer
        9. State Management
        10. Workflow
      4. Security Considerations
      5. Data Handling Considerations
        1. Caching Data
        2. Data Concurrency
        3. Data Binding
      6. Offline/Occasionally Connected Considerations
      7. Technology Considerations
      8. Deployment Considerations
        1. Stand-alone Deployment
        2. Client/Server Deployment
        3. N-Tier Deployment
        4. Deployment Technologies
      9. Relevant Design Patterns
      10. Additional Resources
    4. 23. Designing Rich Internet Applications
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Business Layer
        2. Caching
        3. Communication
        4. Composition
        5. Data Access
        6. Exception Management
        7. Logging
        8. Media and Graphics
        9. Mobile
        10. Portability
        11. Presentation
        12. State Management
        13. Validation
      4. Security Considerations
      5. Data Handling Considerations
      6. Technology Considerations
      7. Deployment Considerations
        1. Installation of the RIA Plug-In
        2. Distributed Deployment
        3. Load Balancing
        4. Web Farm Considerations
      8. Relevant Design Patterns
      9. Additional Resources
    5. 24. Designing Mobile Applications
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Authentication and Authorization
        2. Caching
        3. Communication
        4. Configuration Management
        5. Data Access
        6. Device Specifics
        7. Exception Management
        8. Logging
        9. Porting Applications
        10. Power Management
        11. Synchronization
        12. Testing
        13. User Interface
        14. Validation
      4. Technology Considerations
        1. Microsoft Silverlight for Mobile
        2. .NET Compact Framework
        3. Windows Mobile
        4. Windows Embedded
      5. Deployment Considerations
      6. Relevant Design Patterns
      7. Additional Resources
    6. 25. Designing Service Applications
      1. Overview
      2. General Design Considerations
      3. Specific Design Issues
        1. Authentication
        2. Authorization
        3. Business Layer
        4. Communication
        5. Data Layer
        6. Exception Management
        7. Message Construction
        8. Message Endpoint
        9. Message Protection
        10. Message Transformation
        11. Message Exchange Patterns
        12. Representational State Transfer
        13. Service Layer
        14. SOAP
        15. Validation
        16. Technology Considerations
      4. Deployment Considerations
      5. Relevant Design Patterns
      6. Additional Resources
    7. 26. Designing Hosted and Cloud Services
      1. Overview
        1. Cloud Computing
        2. Common Vocabulary for Hosted and Cloud Services
      2. Benefits of Cloud Applications
        1. Benefits for ISVs and Service Hosts
        2. Benefits for Enterprise Service Consumers
      3. Design Issues
        1. Data Isolation and Sharing
        2. Data Security
          1. Data Security Patterns
        3. Data Storage and Extensibility
        4. Identity Management
        5. Multi-tenancy
        6. On-premises or Off-premises, Build or Buy
        7. Performance
        8. Service Composition
        9. Service Integration
        10. Service Management
      4. Relevant Design Patterns
      5. Additional Resources
    8. 27. Designing Office Business Applications
      1. Overview
        1. Components of an Office Business Application
      2. Key Scenarios for Office Business Applications
        1. Enterprise Content Management
        2. Business Intelligence
        3. Unified Messaging
      3. Common OBA Patterns
        1. Extended Reach Channel
          1. Direct Integration Pattern
          2. Mediated Integration Pattern
        2. Document Integration
          1. Application Generated Documents Pattern
          2. Intelligent Documents/Embedded LOB Information Pattern
          3. Intelligent Documents/Embedded LOB Template Pattern
          4. Intelligent Documents/LOB Information Recognizer Pattern
        3. Document Workflow
        4. Composite UI
        5. Data Consolidation (Discovery Navigation)
          1. Data Consolidation Pattern
          2. Launching a LOB Process
        6. Collaboration
        7. Notifications and Tasks
      4. General Design Considerations
      5. Security Considerations
      6. Deployment Considerations
      7. Relevant Design Patterns
      8. Additional Resources
    9. 28. Designing SharePoint LOB Applications
      1. Overview
        1. Logical Layers of a SharePoint LOB Application
        2. Physical Tier Deployment
      2. Key Scenarios and Features
      3. General Design Considerations
      4. Specific Design Issues
        1. Business Data Catalog
        2. Document and Content Storage
        3. Excel Services
        4. InfoPath Form Services
        5. SharePoint Object Model
        6. Web Parts
        7. Workflow
      5. Technology Considerations
      6. Deployment Considerations
      7. Relevant Design Patterns
      8. Additional Resources
  9. IV. Appendices
    1. A. The Microsoft Application Platform
      1. Overview
      2. Finding Information and Resources
        1. How Microsoft Organizes Technical Information on the Web
        2. Microsoft Developer Network
        3. Microsoft TechNet
      3. The .NET Framework
      4. Common Language Runtime
      5. Data Access
      6. Mobile Applications
      7. Rich Client
      8. Rich Internet Application
      9. Services
      10. Workflow
      11. Web Applications
      12. Web Server – Internet Information Services
      13. Database Server – SQL Server
      14. Visual Studio Development Environment
      15. Other Tools and Libraries
        1. patterns & practices Solution Assets
      16. Additional Resources
    2. B. Presentation Technology Matrix
      1. Overview
      2. Presentation Technologies Summary
        1. Mobile Applications
        2. Rich Client Applications
        3. Rich Internet Applications
        4. Web Applications
      3. Benefits and Considerations Matrix
        1. Mobile Applications
        2. Rich Client Applications
        3. Rich Internet Applications
        4. Web Applications
      4. Common Scenarios and Solutions
        1. Mobile Applications
        2. Rich Client Applications
        3. Rich Internet Applications
        4. Web Applications
      5. Additional Resources
    3. C. Data Access Technology Matrix
      1. Overview
      2. Data Access Technologies Summary
      3. Benefits and Considerations Matrix
        1. Object-Relational Data Access
        2. Disconnected and Offline
        3. SOA/Service Scenarios
        4. N-Tier and General
      4. General Recommendations
      5. Common Scenarios and Solutions
      6. LINQ to SQL Considerations
      7. Mobile Considerations
      8. Additional Resources
    4. D. Integration Technology Matrix
      1. Overview
      2. Integration Technologies Summary
      3. Benefits and Considerations Matrix
      4. Common Scenarios and Solutions
      5. Additional Resources
    5. E. Workflow Technology Matrix
      1. Overview
      2. Workflow Technologies Summary
      3. Human Workflow vs. System Workflow
      4. Benefits and Considerations Matrix
      5. Common Scenarios and Solutions
      6. Additional Resources
    6. F. patterns & practices Enterprise Library
      1. Overview
      2. Goals of Enterprise Library
      3. What's Included in Enterprise Library
        1. Application Blocks
      4. Caching Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      5. Cryptography Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      6. Data Access Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      7. Exception Handling Application Block
        1. Key Scenarios
        2. When to Use
      8. Logging Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      9. Policy Injection Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      10. Security Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      11. Unity Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      12. Validation Application Block
        1. Key Scenarios
        2. When to Use
        3. Considerations
      13. Additional Resources
    7. G. patterns & practices Pattern Catalog
      1. Composite Application Guidance for WPF and Silverlight
      2. Data Movement Patterns
      3. Enterprise Solution Patterns
      4. Integration Patterns
      5. Web Services Security Patterns
      6. Additional Resources
  10. Index
  11. Copyright