| |
| |
| |
Introduction | |
| |
| |
| |
Object-Oriented Analysis and Design | |
| |
| |
| |
Applying UML, Patterns, and Object-Oriented Analysis and Design | |
| |
| |
| |
Assigning Responsibilities | |
| |
| |
| |
What is Analysis and Design? | |
| |
| |
| |
What is Object-Oriented Analysis and Design? | |
| |
| |
| |
An Analogy--Organizing the MicroChaos Business | |
| |
| |
| |
An Example of Object-Oriented Analysis and Design | |
| |
| |
| |
Object Versus Function-Oriented Analysis and Design | |
| |
| |
| |
Warning: "Analysis" and "Design" Can Lead to Terminology Wars | |
| |
| |
| |
The Unified Modeling Language | |
| |
| |
| |
Introduction to a Development Process | |
| |
| |
| |
Introduction | |
| |
| |
| |
The UML and Development Processes | |
| |
| |
| |
Macro-level Steps | |
| |
| |
| |
Interative Development | |
| |
| |
| |
The Plan and Elaborate Phase | |
| |
| |
| |
Build Phase--Development Cycles | |
| |
| |
| |
Choosing When to Create Artifacts | |
| |
| |
| |
Defining Models and Artifacts | |
| |
| |
| |
Introduction | |
| |
| |
| |
Modeling Systems | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Relationship Between Artifacts | |
| |
| |
| |
Plan and Elaborate Phase | |
| |
| |
| |
Case Study: Point-of-Sale | |
| |
| |
| |
The Point-of-Sale System | |
| |
| |
| |
Architectural Layers and Case Study Emphasis | |
| |
| |
| |
Our Strategy: Iterative Learning and Development | |
| |
| |
| |
Understanding Requirements | |
| |
| |
| |
Introduction | |
| |
| |
| |
Requirements | |
| |
| |
| |
Overview Statement | |
| |
| |
| |
Customers | |
| |
| |
| |
Goals | |
| |
| |
| |
System Functions | |
| |
| |
| |
System Attributes | |
| |
| |
| |
Other Requirements Phase Artifacts | |
| |
| |
| |
Use Cases: Describing Processes | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Use Cases | |
| |
| |
| |
Actors | |
| |
| |
| |
A Common Mistake with Use Cases | |
| |
| |
| |
Identifying Use Cases | |
| |
| |
| |
Use Case and Domain Processes | |
| |
| |
| |
Use Cases, System Functions, and Traceability | |
| |
| |
| |
Use Case Diagrams | |
| |
| |
| |
Use Case Formats | |
| |
| |
| |
Systems and their Boundaries | |
| |
| |
| |
Primary, Secondary, and Optional Use Cases | |
| |
| |
| |
Essential versus Real Use Cases | |
| |
| |
| |
Notational Points | |
| |
| |
| |
Use Cases Within a Development Process | |
| |
| |
| |
Process Steps for the Point-of-Sale System | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Ranking and Scheduling Use Cases | |
| |
| |
| |
Introduction | |
| |
| |
| |
Scheduling Use Cases to Development Cycles | |
| |
| |
| |
Ranking the Point-of-Sale Application Use Cases | |
| |
| |
| |
The "Start Up" Use Case | |
| |
| |
| |
Scheduling the Point-of-Sale Application Use Cases | |
| |
| |
| |
Use Case Versions of "Buy Items" | |
| |
| |
| |
Summary | |
| |
| |
| |
Starting a Development Cycle | |
| |
| |
| |
Starting a Development Cycle | |
| |
| |
| |
Analyze Phase (1) | |
| |
| |
| |
Building a Conceptual Model | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Conceptual Models | |
| |
| |
| |
Strategies to Identify Concepts | |
| |
| |
| |
Candidate Concepts for the Point-of-Sale Domain | |
| |
| |
| |
Conceptual Modeling Guidelines | |
| |
| |
| |
Resolving Similar Concepts--POST versus Register | |
| |
| |
| |
Modeling the Unreal World | |
| |
| |
| |
Specification or Description Concepts | |
| |
| |
| |
Defining Terms in the UML | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Conceptual Model--Adding Associations | |
| |
| |
| |
Introduction | |
| |
| |
| |
Associations | |
| |
| |
| |
The UML Association Notation | |
| |
| |
| |
Finding Associations--Common Associations List | |
| |
| |
| |
How Detailed Should Associations Be? | |
| |
| |
| |
Association Guidelines | |
| |
| |
| |
Roles | |
| |
| |
| |
Naming Associations | |
| |
| |
| |
Multiple Associations Between Two Types | |
| |
| |
| |
Associations and Implementation | |
| |
| |
| |
Point-of-Sale Domain Associations | |
| |
| |
| |
Point-of-Sale Conceptual Model | |
| |
| |
| |
Conceptual Model--Adding Attributes | |
| |
| |
| |
Introduction | |
| |
| |
| |
Attributes | |
| |
| |
| |
UML Attribute Notation | |
| |
| |
| |
Valid Attribute Types | |
| |
| |
| |
Non-primitive Attribute Types | |
| |
| |
| |
Modeling Attribute Quantities and Units | |
| |
| |
| |
Attributes for the Point-of-Sale System | |
| |
| |
| |
Attributes in the Point-of-Sale Model | |
| |
| |
| |
Multiplicity From SalesLineItem to Item | |
| |
| |
| |
Point-of-Sale Conceptual Model | |
| |
| |
| |
Conclusion | |
| |
| |
| |
Recording Terms in the Glossary | |
| |
| |
| |
Introduction | |
| |
| |
| |
Glossary | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Sample Point-of-Sale System Glossary | |
| |
| |
| |
System Behavior--System Sequence Diagrams | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
System Behavior | |
| |
| |
| |
System Sequence Diagrams | |
| |
| |
| |
Example of a System Sequence Diagram | |
| |
| |
| |
System Events and System Operations | |
| |
| |
| |
How to Make a System Sequence Diagram | |
| |
| |
| |
System Sequence Diagrams and other Artifacts | |
| |
| |
| |
System Events and the System Boundary | |
| |
| |
| |
Naming System Events and Operations | |
| |
| |
| |
Showing Use Case Text | |
| |
| |
| |
Sample Models | |
| |
| |
| |
System Behavior--Contracts | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
System Behavior | |
| |
| |
| |
Contracts | |
| |
| |
| |
Example contract--enterItem | |
| |
| |
| |
Contract Sections | |
| |
| |
| |
How to Make A Contract | |
| |
| |
| |
Post-conditions | |
| |
| |
| |
The Spirit of Post-conditions: the Stage and Curtain | |
| |
| |
| |
Discussion--enterItem Post-conditions | |
| |
| |
| |
How Complete Should Post-conditions Be? | |
| |
| |
| |
Describing Design Details and Algorithms--Notes | |
| |
| |
| |
Pre-conditions | |
| |
| |
| |
Advice on Writing Contracts | |
| |
| |
| |
Contracts for the Buy Items Use Case | |
| |
| |
| |
Contracts for the StartUp Use Case | |
| |
| |
| |
Changes to the Conceptual Model | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Design Phase (1) | |
| |
| |
| |
From Analysis to Design | |
| |
| |
| |
Analysis Phase Conclusion | |
| |
| |
| |
Design Phase Initiation | |
| |
| |
| |
Describing Real Use Cases | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Real Use Cases | |
| |
| |
| |
Example--Buy Items-Version 1 | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Collaboration Diagrams | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Interaction Diagrams | |
| |
| |
| |
Example Collaboration Diagram: makePayment | |
| |
| |
| |
Interaction Diagrams are a Valuable Artifact | |
| |
| |
| |
This is a Notation-Only Chapter | |
| |
| |
| |
Read the Following Chapters for Design Guidelines | |
| |
| |
| |
How to Make Collaboration Diagrams | |
| |
| |
| |
Basic Collaboration Diagram Notation | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Grasp: Patterns for Assigning Responsibilities | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
Well-Designed Interaction Diagrams are Valuable | |
| |
| |
| |
Responsibilities and Methods | |
| |
| |
| |
Responsibilities and Interaction Diagrams | |
| |
| |
| |
Patterns | |
| |
| |
| |
GRASP: Patterns of General Principles in Assigning Responsibilities | |
| |
| |
| |
The UML Class Diagram Notation | |
| |
| |
| |
Expert | |
| |
| |
| |
Creator | |
| |
| |
| |
Low Coupling | |
| |
| |
| |
High Cohesion | |
| |
| |
| |
Controller | |
| |
| |
| |
Responsibilities, Role Playing and CRC Cards | |
| |
| |
| |
Designing a Solution With Objects and Patterns | |
| |
| |
| |
Introduction | |
| |
| |
| |
Interaction Diagrams and Other Artifacts | |
| |
| |
| |
Point-of-Sale Conceptual Model | |
| |
| |
| |
Collaboration Diagrams for the POST Application | |
| |
| |
| |
Collaboration Diagram: enterItem | |
| |
| |
| |
Collaboration Diagram: endSale | |
| |
| |
| |
Collaboration Diagram: makePayment | |
| |
| |
| |
Collaboration Diagram: startUp | |
| |
| |
| |
Connecting the Presentation Layer to the Domain Layer | |
| |
| |
| |
Summary | |
| |
| |
| |
Determining Visibility | |
| |
| |
| |
Introduction | |
| |
| |
| |
Visibility Between Objects | |
| |
| |
| |
Visibility | |
| |
| |
| |
Illustrating Visibility in the UML | |
| |
| |
| |
Design Class Diagrams | |
| |
| |
| |
Introduction | |
| |
| |
| |
Activities and Dependencies | |
| |
| |
| |
When to Create Design Class Diagrams | |
| |
| |
| |
Example Design Class Diagram | |
| |
| |
| |
Design Class Diagrams | |
| |
| |
| |
How to Make a Design Class Diagram | |
| |
| |
| |
Conceptual Model versus Design Class Diagrams | |
| |
| |
| |
Creating the Point-of-Sale Design Class Diagrams | |
| |
| |
| |
Notation for Member Details | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Summary | |
| |
| |
| |
Issues in System Design | |
| |
| |
| |
Introduction | |
| |
| |
| |
Classic Three-Tier Architecture | |
| |
| |
| |
Multi-Tiered Object-Oriented Architectures | |
| |
| |
| |
Showing Architecture with UML Packages | |
| |
| |
| |
Identifying Packages | |
| |
| |
| |
Layers and Partitions | |
| |
| |
| |
Visibility Between Package Classes | |
| |
| |
| |
Service Packages Interface--The Facade Pattern | |
| |
| |
| |
No Direct Visibility to Windows--The Model-View Separation Pattern | |
| |
| |
| |
Indirect Communication in a System | |
| |
| |
| |
Application Coordinators | |
| |
| |
| |
Storage and Persistence | |
| |
| |
| |
Sample Models | |
| |
| |
| |
Construct Phase (1) | |
| |
| |
| |
Mapping Designs to Code | |
| |
| |
| |
Introduction | |
| |
| |
| |
Programming and the Development Process | |
| |
| |
| |
Mapping Designs to Code | |
| |
| |
| |
Creating Class Definitions from Design Class Diagrams | |
| |
| |
| |
Creating Methods from Collaboration Diagrams | |
| |
| |
| |
Updating Class Definitions | |
| |
| |
| |
Container/Collection Classes in Code | |
| |
| |
| |
Exceptions and Error Handling | |
| |
| |
| |
Defining the Sale--makeLineItem Method | |
| |
| |
| |
Order of Implementation | |
| |
| |
| |
Summary of Mapping Designs to Code | |
| |
| |
| |
Program Solution in Java | |
| |
| |
| |
Introduction to the Program Solution | |
| |
| |
| |
Analyze Phase (2) | |
| |
| |
| |
Choosing Development Cycle 2 Requirements | |
| |
| |
| |
Development Cycle Two Requirements | |
| |
| |
| |
Assumptions and Simplifications | |
| |
| |
| |
Relating Multiple Use Cases | |
| |
| |
| |
Introduction | |
| |
| |
| |
When to Create Separate Use Cases | |
| |
| |
| |
Use Case Diagrams with uses Relationships | |
| |
| |
| |
Use Case Documents with uses Relationships | |
| |
| |
| |
Extending the Conceptual Model | |
| |
| |
| |
New Concepts in the Point-of-Sale System | |
| |
| |
| |
Generalization | |
| |
| |
| |
Generalization | |
| |
| |
| |
Defining Super and Subtypes | |
| |
| |
| |
When to Define a Subtype | |
| |
| |
| |
When to Define a Supertype | |
| |
| |
| |
Point-of-Sale Type Hierarchies | |
| |
| |
| |
Abstract Types | |
| |
| |
| |
Modeling Changing States | |
| |
| |
| |
Class Hierarchies and Inheritance | |
| |
| |
| |
Packages: Organizing Elements | |
| |
| |
| |
Introduction | |
| |
| |
| |
UML Package Notation | |
| |
| |
| |
How to Partition the Conceptual Model | |
| |
| |
| |
Point-of-Sale Conceptual Model Packages | |
| |
| |
| |
Polishing the Conceptual Model | |
| |
| |
| |
Introduction | |
| |
| |
| |
Associative Types | |
| |
| |
| |
Aggregation and Composition | |
| |
| |
| |
Association Role Names | |
| |
| |
| |
Roles As Concepts versus Roles in Associations | |
| |
| |
| |
Derived Elements | |
| |
| |
| |
Qualified Associations | |
| |
| |
| |
Recursive or Reflexive Associations | |
| |
| |
| |
Conceptual Model--Summary | |
| |
| |
| |
Introduction | |
| |
| |
| |
Domain Concepts Package | |
| |
| |
| |
Core/Misc Package | |
| |
| |
| |
Payments | |
| |
| |
| |
Products | |
| |
| |
| |
Sales | |
| |
| |
| |
Authorization Transactions | |
| |
| |
| |
System Behavior | |
| |
| |
| |
System Sequence Diagrams | |
| |
| |
| |
New System Events | |
| |
| |
| |
Contracts | |
| |
| |
| |
Modeling Behavior in State Diagrams | |
| |
| |
| |
Introduction | |
| |
| |
| |
Events, States, and Transitions | |
| |
| |
| |
State Diagrams | |
| |
| |
| |
Use Case State Diagrams | |
| |
| |
| |
System State Diagrams | |
| |
| |
| |
Use Case State Diagrams for the Point-of-Sale Application | |
| |
| |
| |
Types That Need State Diagrams | |
| |
| |
| |
Other State Diagrams for the Point-of-Sale Application | |
| |
| |
| |
Illustrating External and Interval Events | |
| |
| |
| |
Additional State Diagram Notation | |
| |
| |
| |
Design Phase (2) | |
| |
| |
| |
Grasp: More Patterns for Assigning Responsibilities | |
| |
| |
| |
GRASP: General Responsibility Assignment Software Patterns | |
| |
| |
| |
Polymorphism | |
| |
| |
| |
Pure Fabrication | |
| |
| |
| |
Indirection | |
| |
| |
| |
Don't Talk to Strangers | |
| |
| |
| |
Designing with More Patterns | |
| |
| |
| |
Introduction | |
| |
| |
| |
State (GoF) | |
| |
| |
| |
Polymorphism (GRASP) | |
| |
| |
| |
Singleton (GoF) | |
| |
| |
| |
Remote Proxy and Proxy (GoF) | |
| |
| |
| |
Facade and Device Proxy (GoF) | |
| |
| |
| |
Command (GoF) | |
| |
| |
| |
Conclusion | |
| |
| |
| |
Special Topics | |
| |
| |
| |
Other UML Notation | |
| |
| |
| |
Introduction | |
| |
| |
| |
General Notation | |
| |
| |
| |
Interfaces | |
| |
| |
| |
Implementation Diagrams | |
| |
| |
| |
Asynchronous Messages in Collaboration Diagrams | |
| |
| |
| |
Package Interfaces | |
| |
| |
| |
Development Process Issues | |
| |
| |
| |
Introduction | |
| |
| |
| |
Why Bother? | |
| |
| |
| |
Guiding Principles of a Successful Process | |
| |
| |
| |
Iterative and Incremental Development | |
| |
| |
| |
Use Case Driven Development | |
| |
| |
| |
Early Emphasis on Architecture | |
| |
| |
| |
Phases of Development | |
| |
| |
| |
Length of Development Cycles | |
| |
| |
| |
Development Cycle Issues | |
| |
| |
| |
Scheduling Development of Architectural Layers | |
| |
| |
| |
Frameworks, Patterns, and Persistence | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Problem: Persistent Objects | |
| |
| |
| |
The Solution: A Persistence Framework | |
| |
| |
| |
What is a Framework? | |
| |
| |
| |
Requirements for the Persistence Framework | |
| |
| |
| |
PersistentObject Superclass? | |
| |
| |
| |
Key Ideas | |
| |
| |
| |
Mapping--Pattern Representing Objects as Tables | |
| |
| |
| |
Object Identify--Object Identifier Pattern | |
| |
| |
| |
Brokers--Database Broker Pattern | |
| |
| |
| |
Framework Design--Template Method Pattern | |
| |
| |
| |
Materialization--Template Method Pattern | |
| |
| |
| |
Cached Objects--Cache Management Pattern | |
| |
| |
| |
Smart References--Virtual Proxy, Bridge Patterns | |
| |
| |
| |
Virtual Proxies and Database Brokers | |
| |
| |
| |
How to Represent Relationships in Tables | |
| |
| |
| |
The Complex Object Instantiation Pattern | |
| |
| |
| |
Transaction Operations | |
| |
| |
| |
Searching the Objects in the Persistent Store | |
| |
| |
| |
Alternate Designs | |
| |
| |
| |
Unresolved Issues | |
| |
| |
| |
Recommended Readings | |
| |
| |
| |
Sample Development Activities and Models | |
| |
| |
Bibliography | |
| |
| |
Glossary | |
| |
| |
Index | |