Domain Modeling with UML

What is a domain?

A domain is a triple of the form:

Domain = <Concepts, Entities, Relationships>

http://www.cs.sjsu.edu/faculty/pearce/web/ontos/

Representing domains in UML

Domains = packages
Concepts = Classes
Entities = Objects
Relationships = Associations

Classes in UML

A class has a name, attributes, and operations.

Attributes can be derived or fundamental.

Classes can have stereotypes.

<<role>>
<<modifier>>

Domain classes vs. architectural, foundational, and application classes

Coad's stereotypes (archetypes) for domain classes:

<<event>>
<<role>>
<<description>>
<<entity>>

Generalizations, inheritance, subclasses

A <: A
A <: B && B <: C => A <:C
A extends B => A <: B

A <: B => A inherits the (declared and inherited) features of B

Subsumption, dynamic dispatch, and data-driven programming

a: A && A <: B => a: B

objects detcide how to handle the messages they receive.

http://www.cs.sjsu.edu/faculty/pearce/ooa/chp4.htm

State and identity

identity.htm

Associations in UML

Roles, multiplicities, navigability

Association classes

http://www.cs.sjsu.edu/faculty/pearce/ooa/chp7.htm

Qualified associations

Aggregation

http://www.cs.sjsu.edu/faculty/pearce/ooa/chp6.htm

Collections

http://www.cs.sjsu.edu/faculty/pearce/cs146/general.htm

http://www.cs.sjsu.edu/faculty/pearce/cs146/collections.htm

OCL

Objects in UML

What is an object?

object.htm

Links

Sequence diagrams and message passing

Representing object lifecycles as finite state machines

http://www.cs.sjsu.edu/faculty/pearce/ooa/chp10.htm

Power types: objects as types

http://www.cs.sjsu.edu/faculty/pearce/ooa/chp7.htm