Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTERS 8, 9: BASICS, INTRO TO DOMAIN MODELS 1.
Advertisements

Chapter 9 Domain Models The classic OOAD model. Fig. 9.1.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Copyright ©2004 Cezary Z Janikow 1 Domain Model n Visualization of entities and relationships n In UP presented as Class Diagrams – Classes, Relationships,
Chapter 9 DOMAIN MODELS Objectives
1 Domain Model: Adding Attributes Chapter 12 Adding Attributes.
Jan 21, Ron McFadyen1 Domain Modeling Specification classes “need-to-know” associations Reflexive associations “association checklist”
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
Object-Oriented Analysis and Design
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Object-Oriented Analysis and Design
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Visualizing Concepts with a Domain Model.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
BTS430 Systems Analysis and Design using UML Domain Model Part 1—Finding Conceptual Classes.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Chapter 9 Domain Models. Domain Modeling After you have your requirements you start modeling the domain. You are still modeling the business, not the.
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
Domain Modelling Presented By Dr. Shazzad Hosain.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
DOMAIN MODE: ASSOCIATIONS, MULTIPLICITY AND ATTRIBUTE-TEXT NOTATION SYS466.
Chapter 9 Domain Models $PH\06f522\LarmanApplUMLandPtrns\larman3EdDgmsCh01-14\09_domainModelsR2.ppt – RJL
Review ♦ System sequence diagram ♦ Domain model
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
Copyright © Craig Larman All Rights Reserved The Domain Model.
DOMAIN MODEL- VISUALIZING CONCEPTS Identify conceptual classes related to the current iteration requirements. Create an initial domain model. Distinguish.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
Domain Model—Part 3: Associations, Multiplicity and Attribute- Text Notation.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
SYS466: Analysis and Design Using OO Models Domain Class Diagram, Part 1.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Elaboration Iteration 1- Part 1
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Object-Oriented Analysis and Design Feb 2, 2009.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes.
Chapter 9: Domain Models.  The problem domain is modelled using a UML domain model: This is the first OO model that we will see (Use Cases are very useful.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Chapter 16 UML Class Diagrams.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
1 Object Oriented Analysis and Design Conceptual Model.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Object Oriented Analysis & Design By Rashid Mahmood.
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Chapter 16 UML Class Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Group Members Muhammad Zeeshan ( 16) Adnan Akhtar (4)
Object Oriented Analysis and Design Conceptual Model.
Object Oriented Analysis
Domain Model: Visualizing Concepts
Presentation transcript:

Chapter 9 Domain Models

Domain Model in UML Class Diagram Notation A “visual dictionary”

Domain Models Key object-oriented analysis step: Decompose domain into noteworthy concepts or objects UML class diagrams used to draw domain models –Conceptual perspective. Shows: Domain objects (conceptual classes) Associations between domain objects Attributes of conceptual classes Domain model is NOT a model of software objects or our design The following should NOT be in a domain model –Software artifacts: Window, database, … –Responsibilities or methods

Fig. 9.3

Fig. 9.4

Software Class Names Inspired by Domain Model Objects

How to create a domain model? Find conceptual classes –How? Re-use or modify existing models Use a category list Identify noun phrases More on these later Draw them as classes in a UML class diagram Add associations and attributes –More on this later

Identifying nouns as candidates for domain objects

Candidate Conceptual Classes: Process Sale, Iteration 1

Fig. 9.8

Attributes vs. Classes Should “something” be –an attribute of a class, or –a separate conceptual class Examples: –Store: An attribute of Sale or separate class Store: Not a number or text Should be separate conceptual class –Flight destination: An attribute or a separate class Destination is an airport, not a number Should be separate conceptual class Guideline: –If we thing of something as simply a number or text in real life, it should be an attribute. –Otherwise it should be a conceptual class.

“Description” Classes A description class contains information that describes something else –Example: ProductDescription –Records price, picture and text description of an item Why use them? Why not include all that information in the Product class? –We need this information stored and represented even though there are no objects of that particular product type. –Don’t want to duplicate product information for each duplicate product object Serial number belongs with product object Picture of product belongs with product description Need objects that are “specifications” or “descriptions” of other objects

Description class example

Even when that flight is not scheduled that day, the flight description exists.

Associations Association: A relationship between (instances of) classes that indicates some meaningful and interesting connection. Used to show relationships that need to be remembered and preserved for some duration

Which relationships need to be remembered? Example: Does a Sale-SalesLineItem relationship need to be remembered (preserved)?\ –Yes, otherwise can’t process returns or exchanges. Example: Cashier looks up ProductDescription –Don’t need to remember/store. Example: –What square is a Monopoly player on? Need to remember –Dice total tells us which Square to move to Do we need to store this fact with the Dice or the Square? No!

Common Associations List (i)

Common Associations List (ii)

Common Associations List (iii)

Association Directionalities

How to name an association? Pattern: –Class name – verb phrase – class name –Readable and meaningful Try to avoid “has” or “uses”. These give no extra information

Association Multiplicities

Multiplicities

Multiple Associations

POS Domain Model Example:

Example: Domain Model for the Monopoly Game

Attributes An attribute: A logical data value stored in an object

More detailed attribute notation visibility name: type multiplicity = default value {property-string} Attribute requirements (such as an optional middle name) should also be placed in the Glossary.

Derivable attributes The “/” sign: the value of this attribute can be calculated or derived from other attributes Still, it is noteworthy and may be recorded separately

Most attribute types should be primitive data types Guideline: The attributes in a domain model should be (simple, primitive) data types –Boolean, Date, Number (Integer, Real), String (Text), Time, Phone Number, ID Number, Postal Code, … Non-data type relationships (i.e., conceptual class relationships) should be expressed using associations, not attributes.

How to tell “data types” from “conceptual classes”? Guideline: Is the equality test based on identity or value –Examples: Equality test based on value Separate instances of the Integer 5 Separate instances of the date “February 21, 2005” –Examples: Equality test based on identity Two employees with the same name Two copies of the same book

When to define a new class?

Do we need a new box for these classes?

Attributes representing “foreign keys” Avoid them!

Fig. 9.26

POS Domain Model Example:

Monopoly Domain Model Example