You are previewing Analysis Patterns: Reusable Object Models.
O'Reilly logo
Analysis Patterns: Reusable Object Models

Book Description

This innovative book recognizes the need within the object-oriented community for a book that goes beyond the tools and techniques of the typical methodology book. In Analysis Patterns: Reusable Object Models, Martin Fowler focuses on the end result of object-oriented analysis and design—the models themselves. He shares with you his wealth of object modeling experience and his keen eye for identifying repeating problems and transforming them into reusable models. Analysis Patterns provides a catalogue of patterns that have emerged in a wide range of domains including trading, measurement, accounting and organizational relationships.

Recognizing that conceptual patterns cannot exist in isolation, the author also presents a series of "support patterns" that discuss how to turn conceptual models into software that in turn fits into an architecture for a large information system. Included in each pattern is the reasoning behind their design, rules for when they should and should not be used, and tips for implementation. The examples presented in this book comprise a cookbook of useful models and insight into the skill of reuse that will improve analysis, modeling and implementation.

Table of Contents

  1. About This eBook
  2. Title Page
  3. Copyright Page
  4. The Addison-Wesley Object Technology Series
  5. Foreword by Ralph Johnson
  6. Foreword by Ward Cunningham
  7. Contents
  8. Preface
    1. Structure of this Book
    2. How to Read this Book
    3. Who Should Read this Book
    4. A Living Book
    5. Acknowledgments
    6. References
  9. 1. Introduction
    1. 1.1 Conceptual Models
    2. 1.2 The World of Patterns
      1. 1.2.1 Christopher Alexander
      2. 1.2.2 The Literary Form
      3. 1.2.3 The Author’s Level of Abstraction
    3. 1.3 The Patterns in this Book
      1. 1.3.1 Examples for Modeling
      2. 1.3.2 Origins of the Patterns
      3. 1.3.3 Patterns Across Domains
    4. 1.4 Conceptual Models and Business Process Reengineering
    5. 1.5 Patterns and Frameworks
    6. 1.6 Using the Patterns
    7. References
  10. Part 1: Analysis Patterns
    1. 2. Accountability
      1. 2.1 Party
      2. 2.2 Organization Hierarchies
      3. 2.3 Organization Structure
      4. 2.4 Accountability
      5. 2.5 Accountability Knowledge Level
      6. 2.6 Party Type Generalizations
      7. 2.7 Hierarchic Accountability
      8. 2.8 Operating Scopes
      9. 2.9 Post
      10. References
    2. 3. Observations and Measurements
      1. 3.1 Quantity
      2. 3.2 Conversion Ratio
      3. 3.3 Compound Units
      4. 3.4 Measurement
      5. 3.5 Observation
      6. 3.6 Subtyping Observation Concepts
      7. 3.7 Protocol
      8. 3.8 Dual Time Record
      9. 3.9 Rejected Observation
      10. 3.10 Active Observation, Hypothesis, and Projection
      11. 3.11 Associated Observation
      12. 3.12 Process of Observation
      13. References
    3. 4. Observations for Corporate Finance
      1. 4.1 Enterprise Segment
        1. 4.1.1 Defining the Dimensions
        2. 4.1.2 Properties of Dimensions and Enterprise Segments
      2. 4.2 Measurement Protocol
        1. 4.2.1 Holding the Calculations
        2. 4.2.2 Comparative and Causal Measurements Protocols
        3. 4.2.3 Status Type: Defining Planned and Actual Status
        4. 4.2.4 Creating a Measurement
        5. 4.2.5 Dimension Combinations
      3. 4.3 Range
      4. 4.4 Phenomenon with Range
        1. 4.4.1 Phenomenon with Range Attribute
        2. 4.4.2 Range Function
      5. 4.5 Using the Resulting Framework
      6. References
    4. 5. Referring to Objects
      1. 5.1 Name
      2. 5.2 Identification Scheme
      3. 5.3 Object Merge
        1. 5.3.1 Copy and Replace
        2. 5.3.2 Superseding
        3. 5.3.3 Essence/Appearance
      4. 5.4 Object Equivalence
      5. References
    5. 6. Inventory and Accounting
      1. 6.1 Account
      2. 6.2 Transactions
        1. 6.2.1 Multilegged Transactions
      3. 6.3 Summary Account
      4. 6.4 Memo Account
      5. 6.5 Posting Rules
        1. 6.5.1 Reversibility
        2. 6.5.2 Abandoning Transactions
      6. 6.6 Individual Instance Method
        1. 6.6.1 Implementation with a Singleton Class
        2. 6.6.2 Implementation with the Strategy Pattern
        3. 6.6.3 Implementation with an Internal Case Statement
        4. 6.6.4 Implementation with a Parameterized Method
        5. 6.6.5 Implementation with an Interpreter
        6. 6.6.6 Choosing an Implementation
      7. 6.7 Posting Rule Execution
        1. 6.7.1 Eager Firing
        2. 6.7.2 Account-based Firing
        3. 6.7.3 Posting-rule-based Firing
        4. 6.7.4 Backward-chained Firing
        5. 6.7.5 Comparing the Firing Approaches
      8. 6.8 Posting Rules for Many Accounts
      9. 6.9 Choosing Entries
      10. 6.10 Accounting Practice
      11. 6.11 Sources of an Entry
      12. 6.12 Balance Sheet and Income Statement
      13. 6.13 Corresponding Account
      14. 6.14 Specialized Account Model
      15. 6.15 Booking Entries to Multiple Accounts
        1. 6.15.1 Using Memo Entries
        2. 6.15.2 Derived Accounts
      16. Further Reading
      17. References
    6. 7. Using the Accounting Models
      1. 7.1 Structural Models
      2. 7.2 Implementing the Structure
      3. 7.3 Setting Up New Phone Services
      4. 7.4 Setting Up Calls
      5. 7.5 Implementing Account-based Firing
      6. 7.6 Separating Calls into Day and Evening
      7. 7.7 Charging for Time
      8. 7.8 Calculating the Tax
      9. 7.9 Concluding Thoughts
        1. 7.9.1 The Structure of the Posting Rules
        2. 7.9.2 When Not to Use the Framework
        3. 7.9.3 Accounting Practice Diagrams
      10. References
    7. 8. Planning
      1. 8.1 Proposed and Implemented Action
      2. 8.2 Completed and Abandoned Actions
      3. 8.3 Suspension
      4. 8.4 Plan
      5. 8.5 Protocol
        1. 8.5.1 Plans and Protocols as Graphs
      6. 8.6 Resource Allocation
      7. 8.7 Outcome and Start Functions
      8. References
    8. 9. Trading
      1. 9.1 Contract
      2. 9.2 Portfolio
      3. 9.3 Quote
      4. 9.4 Scenario
        1. 9.4.1 Defining How to Build a Scenario
      5. References
    9. 10. Derivative Contracts
      1. 10.1 Forward Contracts
      2. 10.2 Options
        1. 10.2.1 Longs, Shorts, Calls, and Puts: Representing a Tricky Vocabulary
        2. 10.2.2 To Subtype or Not to Subtype
      3. 10.3 Product
        1. 10.3.1 Should a Product Always Be There?
      4. 10.4 Subtype State Machines
        1. 10.4.1 Ensuring Conformance of State Charts
        2. 10.4.2 The Problems with Using Conformance
      5. 10.5 Parallel Application and Domain Hierarchies
        1. 10.5.1 Type Checking in the Application Facade
        2. 10.5.2 Giving the Supertype an Encompassing Interface
        3. 10.5.3 Using a Run-Time Attribute
        4. 10.5.4 Making the Application Facade Visible to the Domain Model
        5. 10.5.5 Using Exception Handling
      6. References
    10. 11. Trading Packages
      1. 11.1 Multiple Access Levels to a Package
      2. 11.2 Mutual Visibility
      3. 11.3 Subtyping Packages
      4. 11.4 Concluding Thoughts
      5. References
  11. Part 2: Support Patterns
    1. 12. Layered Architecture for Information Systems
      1. 12.1 Two-Tier Architecture
      2. 12.2 Three-Tier Architecture
        1. 12.2.1 The Location of the Domain Tier
      3. 12.3 Presentation and Application Logic
        1. 12.3.1 Advantages of the Presentation/Application Logic Split
        2. 12.3.2 Stretching Facades in Client/Server Environments
      4. 12.4 Database Interaction
        1. 12.4.1 Linking the Domain Tier to Data Sources
        2. 12.4.2 Database Interface Tier
      5. 12.5 Concluding Thoughts
      6. References
    2. 13. Application Facades
      1. 13.1 A Health Care Example
      2. 13.2 Contents of a Facade
        1. 13.2.1 Types of Methods
        2. 13.2.2 Sample Methods
      3. 13.3 Common Methods
      4. 13.4 Operations
      5. 13.5 Type Conversions
      6. 13.6 Multiple Facades
      7. References
    3. 14. Patterns for Type Model Design Templates
      1. 14.1 Implementing Associations
        1. 14.1.1 Bidirectional and Unidirectional Associations
        2. 14.1.2 Interface for Associations
        3. 14.1.3 Fundamental Types
        4. 14.1.4 Implementing a Unidirectional Association
        5. 14.1.5 Bidirectional Implementation by Pointers in Both Directions
        6. 14.1.6 Bidirectional Implementation by Pointers in One Direction
        7. 14.1.7 Bidirectional Implementation by Association Objects
        8. 14.1.8 Comparison of Bidirectional Implementations
        9. 14.1.9 Derived Mappings
        10. 14.1.10 Nonset Mappings
      2. 14.2 Implementing Generalization
        1. 14.2.1 Implementation by Inheritance
        2. 14.2.2 Implementation by Multiple Inheritance Combination Classes
        3. 14.2.3 Implementation by Flags
        4. 14.2.4 Implementation by Delegation to a Hidden Class
        5. 14.2.5 Implementation by Creating a Replacement
        6. 14.2.6 Interface for Generalization
        7. 14.2.7 Implementing the hasType Operation
      3. 14.3 Object Creation
        1. 14.3.1 Interface for Creation
        2. 14.3.2 Implementation for Creation
      4. 14.4 Object Destruction
        1. 14.4.1 Interface for Destruction
        2. 14.4.2 Implementation for Destruction
      5. 14.5 Entry Point
        1. 14.5.1 Interface for Finding Objects
        2. 14.5.2 Implementation of Find Operations
        3. 14.5.3 Using Classes or Registrar Objects
      6. 14.6 Implementing Constraints
      7. 14.7 Design Templates for Other Techniques
      8. References
    4. 15. Association Patterns
      1. 15.1 Associative Type
      2. 15.2 Keyed Mapping
      3. 15.3 Historic Mapping
        1. 15.3.1 Two-Dimensional History
      4. References
    5. 16. Afterword
      1. References
  12. Part 3: Appendix
    1. A. Techniques and Notations
      1. A.1 Type Diagrams
        1. A.1.1 Type and Class
        2. A.1.2 Associations, Attributes, and Aggregation
        3. A.1.3 Generalization
        4. A.1.4 Rules and Semantic Statements
        5. A.1.5 Fundamental Types
      2. A.2 Interaction Diagrams
      3. A.3 Event Diagrams
      4. A.4 State Diagrams
      5. A.5 Package Diagrams
      6. References
    2. B. Table of Patterns
  13. Index
  14. Code Snippets