EARTH WEEK
Go paperless and save 40% on eligible eBooks, 70% on video now through April 26. Shop the sale.
Register your product to gain access to bonus material or receive a coupon.
Gives students practical expertise with the world's de facto standard for communicating analysis and design results, while integrating UML into a broader context—so students truly understand OOA&D, not just notation.
Covers everything the student needs to know about object-oriented design, explaining essential concepts in terms that are exceptionally easy to understand—and use.
Gives students fast access to essential resources for object oriented analysis and design—and makes the book a more useful reference once they have mastered they subject.
Students can understand complex concepts far more rapidly, by drawing upon explanations that have been tested and refined in real-world instruction.
Patterns codify the object-oriented design field's best practices and wisdom. They are currently one of the most exciting topics in computing; however, most treatments of the subject are difficult and abstruse. This book helps students understand the value of patterns far more rapidly, by showing them at use in the real world—not merely as disconnected, abstract ideas.
Helps students master patterns that helped to launch the "patterns revolution"—and are among the most widely used in real-world application design.
Prepares students to succeed in the most effective enterprise development environments.
Gives students basic mastery of the Unified Process, which is becoming the world's de facto standard for organizing development processes.
Helps students learn how designs can be translated into actual working systems using one of the world's most widely-used and fastest-growing languages.
Gives students confidence that the material they are learning is authoritative, accurate, and reflective of real-world practice.
"People often ask me which is the best book to introduce them to the world of OO design. Ever since I came across it Applying UML and Patterns has been my unreserved choice."
Martin Fowler, author, UML Distilled and Refactoring
The first edition of Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design quickly emerged as the leading OOA/D introduction; it has been translated into seven languages and adopted in universities and businesses worldwide. In this second edition, well-known object technology and iterative methods leader Craig Larman refines and expands this text for developers and students new to OOA/D, the UML, patterns, use cases, iterative development, and related topics.
Put simply, the book shows newcomers to OOA/D how to "think in objects." It does so by presenting three iterations of a single, cohesive case study, incrementally introducing the requirements and OOA/D activities, principles, and patterns that are most critical to success. It introduces the most frequently used UML diagramming notation, while emphasizing that OOA/D is much more than knowing UML notation. All case study iterations and skills are presented in the context of an "agile" version of the Unified Process -- a popular, modern iterative approach to software development. Throughout, Larman presents the topics in a fashion designed for learning and comprehension.
Among the topics introduced in Applying UML and Patterns are: * requirements and use cases, * domain object modeling, * core UML, * designing objects with responsibilities, * "Gang of Four" and other design patterns, * mapping designs to code (using Java as an example), * layered architectures, * architectural analysis, * package design, * iterative development, and * the Unified Process. For a more detailed list of topics, please see the accompanying table of contents.
Foreword by Philippe Kruchten, the lead architect of the Rational Unified Process.
"Too few people have a knack for explaining things. Fewer still have a handle on software analysis and design. Craig Larman has both."
John Vlissides, author, Design Patterns and Pattern Hatching
"This edition contains Larman's usual accurate and thoughtful writing. It is a very good book made even better."
Alistair Cockburn, author, Writing Effective Use Cases and Surviving OO Projects
Below is a link for downloading sample lectures on object-oriented analysis and design in Microsoft® PowerPoint® format. You are welcome to use the files in college courses, but not in any commercial endeavor.
The files provided are meant to be representative rather than exhaustive. My approach to lecture material is to keep it light and elaborate details by reference to my book. I have students bring the book to each lecture and regularly inspect various related pages during the lecture for details not covered in the presentation.
Download the lecture slides (WinZip® archive, 901 kb)
Below are links for downloading three WinZip® archives containing the entire set of diagrams for the book. The diagrams are in both Visio and WMF (Windows metafile) formats. You are welcome to use the diagrams in any non-commercial endeavor and in college courses.
Diagrams1 (3.5 mb)
Diagrams2 (3.3 mb)
Diagrams3 (3.7 mb)
The archives indicate which directory the files are from. The directory suggests the associated chapter, and the file name suggests the related diagram in the book. If you spend some time reflecting on the directory structure, you will be successful in getting the diagrams you want.
The sample exams and solutions described below are available for downloading. Files are in Microsoft® Word format.
Time: 2.5 hours
Marking: 100 marks, plus 10 marks for the bonus question.
Instructions for Students: This examination is composed of multiple sections. Each section relies on standard solutions from the previous sections. Upon completing a section, you must submit your answers to the examination coordinator. In return, you will receive the standard solution. Use the provided standard solution as the basis for your subsequent work.
Download the evaluation materials (WinZip® archive, 391 kb)
Time: 2.5 hours
Marking: 100 marks, plus 10 marks for the bonus question.
Instructions for Students: The purpose of this generic exam is to allow you to see what the real final exam will look like and to get a sense of the relative weighting in terms of marks. The only significant difference between this generic exam and the final one is that the latter will include a specific case study.
Download the generic exam (Word document, 132 kb)
Click here for a sample chapter for this book: 0130925691.pdf
Foreword.
Preface.
I. INTRODUCTION.
1. Object-Oriented Analysis and Design.Applying UML and Patterns in OOA/D. Assigning Responsibilities. What Is Analysis and Design? What Is Object-Oriented Analysis and Design? An Example. The UML. Further Readings.
2. Iterative Development and the Unified Process.The Most Important UP Idea: Iterative Development. Additional UP Best Practices and Concepts. The UP Phases and Schedule-Oriented Terms. The UP Disciplines (was Workflows). Process Customization and the Development Case. The Agile UP. The Sequential “Waterfall” Lifecycle. You Know You Didn't Understand the UP When…. Further Readings.
3. Case Study: The NextGen POS System.The NextGen POS System. Architectural Layers and Case Study Emphasis. The Book's Strategy: Iterative Learning and Development.
II. INCEPTION.
4. Inception.Inception: An Analogy. Inception May Be Very Brief. What Artifacts May Start in Inception? You Know You Didn't Understand Inception When…
5. Understanding Requirements.Types of Requirements. Further Readings.
6. Use-Case Model: Writing Requirements in Context.Goals and Stories. Background. Use Cases and Adding Value. Use Cases and Functional Requirements. Use Case Types and Formats. Fully Dressed Example: Process Sale. Explaining the Sections. Goals and Scope of a Use Case. Finding Primary Actors, Goals, and Use Cases. Congratulations: Use Cases Have Been Written, and Are Imperfect. Write Use Cases in an Essential UI-Free Style. Actors. Use Case Diagrams. Requirements in Context and Low-Level Feature Lists. Use Cases Are Not Object-Oriented. Use Cases Within the UP. Case Study: Use Cases in the NextGen Inception Phase. Further Readings. UP Artifacts and Process Context.
7. Identifying Other Requirements.NextGen POS Examples. NextGen Example: (Partial) Supplementary Specification. Commentary: Supplementary Specification. NextGen Example: (Partial) Vision. Commentary: Vision. NextGen Example: A (Partial) Glossary. Commentary: Glossary (Data Dictionary). Reliable Specifications: An Oxymoron? Online Artifacts at the Project Website. Not Much UML During Inception? Other Requirement Artifacts Within the UP. Further Readings. UP Artifacts and Process Context.
8. From Inception to Elaboration.Checkpoint: What Happened in Inception? On to Elaboration. Planning the Next Iteration. Iteration 1 Requirements and Emphasis: Fundamental OOA/D Skills. What Artifacts May Start in Elaboration? You Know You Didn't Understand Elaboration When…
III. ELABORATION ITERATION.
9. Use-Case Model: Drawing System Sequence Diagrams.System Behavior. System Sequence Diagrams. Example of an SSD. Inter-System SSDs. SSDs and Use Cases. System Events and the System Boundary. Naming System Events and Operations. Showing Use Case Text. SSDs and the Glossary. SSDs Within the UP. Further Readings. UP Artifacts.
10. Domain Model: Visualizing Concepts.Domain Models. Conceptual Class Identification. Candidate Conceptual Classes for the Sales Domain. Domain Modeling Guidelines. Resolving Similar Conceptual Classes-Register vs. “POST”. Modeling the Unreal World. Specification or Description Conceptual Classes. UML Notation, Models, and Methods: Multiple Perspectives. Lowering the Representational Gap. Example: The NextGen POS Domain Model. Domain Models Within the UP. Further Readings. UP Artifacts.
11. Domain Model: Adding Associations.Associations. The UML Association Notation. Finding Associations-Common Associations List. Association Guidelines. Roles. How Detailed Should Associations Be? Naming Associations. Multiple Associations Between Two Types. Associations and Implementation. NextGen POS Domain Model Associations. NextGen POS Domain Model.
12. Domain Model: Adding Attributes.Attributes. UML Attribute Notation. Valid Attribute Types. Non-primitive Data Type Classes. Design Creep: No Attributes as Foreign Keys. Modeling Attribute Quantities and Units. Attributes in the NextGen Domain Model. Multiplicity From SalesLineItem to Item. Domain Model Conclusion.
13. Use-Case Model: Adding Detail with Operation Contracts.Contracts. Example Contract: enterItem. Contract Sections. Postconditions. Discussion-enterItem Postconditions. Writing Contracts Leads to Domain Model Updates. When Are Contracts Useful? Contracts vs. Use Cases? Guidelines: Contracts. NextGen POS Example: Contracts. Changes to the Domain Model. Contracts, Operations, and the UML. Operation Contracts Within the UP. Further Readings.
14. From Requirements to Design in this Iteration.Iteratively Do the Right Thing, Do the Thing Right. Didn't That Take Weeks To Do? No, Not Exactly. On to Object Design.
15. Interaction Diagram Notation.Sequence and Collaboration Diagrams. Example Collaboration Diagram: makePayment. Example Sequence Diagram: makePayment. Interaction Diagrams Are Valuable. Common Interaction Diagram Notation. Basic Collaboration Diagram Notation. Basic Sequence Diagram Notation.
16. GRASP: Designing Objects with Responsibilities.Responsibilities and Methods. Responsibilities and Interaction Diagrams. Patterns. GRASP: Patterns of General Principles in Assigning Responsibilities. The UML Class Diagram Notation. Information Expert (or Expert). Creator. Low Coupling. High Cohesion. Controller. Object Design and CRC Cards. Further Readings.
17. Design Model: Use-Case Realizations with GRASP Patterns.Use-Case Realizations. Artifact Comments. Use-Case Realizations for the NextGen Iteration. Object Design: makeNewSale. Object Design: enterItem. Object Design: endSale. Object Design: makePayment. Object Design: startUp. Connecting the UI Layer to the Domain Layer. Use-Case Realizations Within the UP. Summary.
18. Design Model: Determining Visibility.Visibility Between Objects. Visibility. Illustrating Visibility in the UML.
19. Design Model: Creating Design Class Diagrams.When to Create DCDs. Example DCD. DCD and UP Terminology. Domain Model vs. Design Model Classes. Creating a NextGen POS DCD. Notation for Member Details. DCDs, Drawing, and CASE Tools. DCDs Within the UP. UP Artifacts.
20. Implementation Model: Mapping Designs to Code.Programming and the Development Process. Mapping Designs to Code. Creating Class Definitions from DCDs. Creating Methods from Interaction Diagrams. Container/Collection Classes in Code. Exceptions and Error Handling. Defining the Sale—makeLineItem Method. Order of Implementation. Test-First Programming. Summary of Mapping Designs to Code. Introduction to the Program Solution.
IV. ELABORATION ITERATION 2.
21. Iteration 2 and its Requirements.Iteration 2 Emphasis: Object Design and Patterns. From Iteration 1 to 2. Iteration 2 Requirements. Refinement of Analysis-oriented Artifacts in this Iteration.
22. GRASP: More Patterns for Assigning Responsibilities.Polymorphism. Pure Fabrication. Indirection. Protected Variations.
23. Designing Use-Case Realizations with GoF Design Patterns.Adapter (GoF). “Analysis” Discoveries During Design: Domain Model. Factory (GoF). Singleton (GoF). Conclusion of the External Services with Varying Interfaces Problem. Strategy (GoF). Composite (GoF) and Other Design Principles. Facade (GoF). Observer/Publish-Subscribe/Delegation Event Model (GoF). Conclusion. Further Readings.
V. ELABORATION ITERATION 3.
24. Iteration 3 and Its Requirements.Iteration 3 Requirements. Iteration 3 Emphasis.
25. Relating Use Cases.The include Relationship. Terminology: Concrete, Abstract, Base, and Addition Use Cases. The extend Relationship. The generalize Relationship. Use Case Diagrams.
26. Modeling Generalization.New Concepts for the Domain Model. Generalization. Defining Conceptual Superclasses and Subclasses. When to Define a Conceptual Subclass. When to Define a Conceptual Superclass. NextGen POS Conceptual Class Hierarchies. Abstract Conceptual Classes. Modeling Changing States. Class Hierarchies and Inheritance in Software.
27. Refining the Domain Model.Association Classes. Aggregation and Composition. Time Intervals and Product Prices-Fixing an Iteration 1 “Error”. Association Role Names. Roles as Concepts vs. Roles in Associations. Derived Elements. Qualified Associations. Reflexive Associations. Ordered Elements. Using Packages to Organize the Domain Model.
28. Adding New SSDs and Contracts.New System Sequence Diagrams. New System Operations. New System Operation Contracts.
29. Modeling Behavior in Statechart Diagrams.Events, States, and Transitions. Statechart Diagrams. Statechart Diagrams in the UP? Use Case Statechart Diagrams. Use Case Statechart Diagrams for the POS Application. Classes that Benefit from Statechart Diagrams. Illustrating External and Interval Events. Additional Statechart Diagram Notation. Further Readings.
30. Designing the Logical Architecture with Patterns.Software Architecture. Architectural Pattern: Layers. The Model-View Separation Principle. Further Readings.
31. Organizing the Design and Implementation Model Packages.Package Organization Guidelines. More UML Package Notation. Further Readings.
32. Introduction to Architectural Analysis and the SAD.Architectural Analysis. Types and Views of Architecture. The Science: Identification and Analysis of Architectural Factors. Example: Partial NextGen POS Architectural Factor Table. The Art: Resolution of Architectural Factors. Summary of Themes in Architectural Analysis. Architectural Analysis within the UP. Further Readings.
33. Designing More Use-Case Realizations with Objects and Patterns.Failover to Local Services; Performance with Local Caching. Handling Failure. Failover to Local Services with a Proxy (GoF). Designing for Non-Functional or Quality Requirements. Accessing External Physical Devices with Adapters; Buy vs. Build. Abstract Factory (GoF) for Families of Related Objects. Handling Payments with Polymorphism and Do It Myself. Conclusion.
34. Designing a Persistence Framework with Patterns.The Problem: Persistent Objects. The Solution: A Persistence Service from a Persistence Framework. Frameworks. Requirements for the Persistence Service and Framework. Key Ideas. Pattern: Representing Objects as Tables. UML Data Modeling Profile. Pattern: Object Identifier. Accessing a Persistence Service with a Facade. Mapping Objects: Database Mapper or Database Broker Pattern. Framework Design with the Template Method Pattern. Materialization with the Template Method Pattern. Configuring Mappers with a MapperFactory. Pattern: Cache Management. Consolidating and Hiding SQL Statements in One Class. Transactional States and the State Pattern. Designing a Transaction with the Command Pattern. Lazy Materialization with a Virtual Proxy. How to Represent Relationships in Tables. PersistentObject Superclass and Separation of Concerns. Unresolved Issues.
VI. SPECIAL TOPICS.
35. On Drawing and Tools.On Speculative Design and Visual Thinking. Suggestions for UML Drawing Within the Development Process. Tools and Sample Features. Example Two.
36. Introduction to Iterative Planning and Project Issues.Ranking Requirements. Ranking Project Risks. Adaptive vs. Predictive Planning. Phase and Iteration Plans. Iteration Plan: What to Do in the Next Iteration? Requirements Tracking Across Iterations. The (In)Validity of Early Estimates. Organizing Project Artifacts. Some Team Iteration Scheduling Issues. You Know You Didn't Understand Planning in the UP When… Further Readings.
37. Comments on Iterative Development and the UP.Additional UP Best Practices and Concepts. The Construction and Transition Phases. Other Interesting Practices. Motivations for Timeboxing an Iteration. The Sequential “Waterfall” Lifecycle. Usability Engineering and User Interface Design. The UP Analysis Model. The RUP Product. The Challenge and Myths of Reuse.
38. More UML Notation.General Notation. Implementation Diagrams. Template (Parameterized, Generic) Class. Activity Diagrams.
Bibliography.Thank you for reading this book! This is a practical introduction to object-oriented analysis and design (OOA/D), and to related aspects of iterative development. I am grateful that the first edition was received as a popular introduction to OOA/D throughout the world, translated into many languages. Therefore, this second edition builds upon and refines-rather than replaces-the content in the first. I want to sincerely thank all the readers of the first edition.
Here is how the book will benefit you.
Design robust and maintainable object systems.
First, the use of object technology has proliferated in the development of software, and mastery of OOA/D is critical for you to create robust and maintainable object systems.
Follow a roadmap through requirements, analysis, design, and coding.
Second, if you are new to OOA/D, you are understandably challenged about how to proceed through this complex subject; this book presents a well-defined roadmap-the Unified Process-so that you can move in a step-by-step process from requirements to code.
Use the UML to illustrate analysis and design models.
Third, the Unified Modeling Language (UML) has emerged as the standard notation for modeling; so it is useful for you to be conversant in it. This book teaches the skills of OOA/D using the UML notation.
Improve designs by applying the "gang-of-four" and GRASP design patterns.
Fourth, design patterns communicate the "best practice" idioms and solutions that object-oriented design experts apply in order to create systems. In this book you will learn to apply design patterns, including the popular "gang-of-four" patterns, and the GRASP patterns which communicate fundamental principles of responsibility assignment in object design. Learning and applying patterns will accelerate your mastery of analysis and design.
Learn efficiently by following a refined presentation.
Fifth, the structure and emphasis in this book is based on years of experience in training and mentoring thousands of people in the art of OOA/D. It reflects that experience by providing a refined, proven, and efficient approach to learning the subject so your investment in reading and learning is optimized.
Learn from a realistic exercise.
Sixth, it exhaustively examines a single case study-to realistically illustrate the entire OOA/D process, and goes deeply into thorny details of the problem; it is a realistic exercise.
Translate to code.
Seventh, it shows how to map object design artifacts to code in Java.
Design a layered architecture.
Eighth, it explains how to design a layered architecture and relate the graphical user interface layer to domain and technical services layers.
Design a framework.
Finally, it shows you how to design an object-oriented framework and applies this to the creation of a framework for persistent storage in a database.
ObjectivesThe overarching objective is this:
Help students and developers create object designs through the application of a set of explainable principles and heuristics.
By studying and applying the information and techniques presented here, you will become more adept at understanding a problem in terms of its processes and concepts, and designing a solid solution using objects.
Intended AudienceThis book is an introduction to OOA/D, related requirements analysis, and to iterative development with the Unified Process as a sample process; it is not meant as an advanced text. It is for the following audience:
Some prerequisite knowledge is assumedand necessaryto benefit from this book:
Fundamental object technology concepts are not defined.
Java ExamplesIn general, the book presents code examples in Java or discusses Java implementations, due to its widespread familiarity. However, the ideas presented are applicable to mostif not allobject-oriented programming languages.
Book OrganizationThe overall strategy in the organization of this book is that analysis and design topics are introduced in an order similar to that of a software development project running across an "inception" phase (a Unified Process term) followed by three iterations.
www.craiglarman.com
for articles related to object technology, patterns, and process.www.phptr.com/larman
While retaining the same core as the first edition, the second is refined in many ways, including:
Craig Larman serves as Director of Process for Valtech, an international consulting company with divisions in Europe, Asia, and North America, specializing in e-business systems development, object technologies, and iterative development with the Unified Process.
Since the mid 1980s, Craig has helped thousands of developers to apply object-oriented programming, analysis, and design, and assisted organizations adopt iterative development practices.
After a failed career as a wandering street musician, he built systems in APL, PL/I, and CICS in the 1970s. Starting in the early 1980s-after a full recovery- he became interested in artificial intelligence (having little of his own), natural language processing, and knowledge representation, and built knowledge systems with Lisp machines, Lisp, Prolog, and Smalltalk. He plays bad lead guitar in his part-time band, the Changing Requirements (it used to be called the Requirements, but some band members changed...).
He holds a B.Sc. and M.Sc. in computer science from Simon Fraser University in Vancouver, Canada.
Craig can be reached at clarman@acm.org
and www.craiglarman.com