Use cases define a goal. To accomplish the goal, the use case needs resources. The use case resources are the objects defined by the classes in the object model. To allocate classes to a domain partition you need to examine resources on two levels:
Every resource object has to be created. The question you need to answer when you attempt to assign objects to partitions is, "Who is responsible for creating the object?"
Typically, you should allocate the class that defines the objects to the use cases that create the objects. Usually there are only one or very few use cases that create the same type of objects. Once an object is created it can be accessed by other use cases in other partitions through the database (persistent repository) or any number of object server components. The creating and referencing use cases do not have to know about each other. Every class in the object model must be assigned to a partition. This process provides one measure of completeness in the transition from analysis to design.
When a domain partition requires access to a resource it may either create the resource or look it up. A referenced resource may simply be queried or it may be updated. In a language like Java, this arrangement would look like an imported class. In other words, the class definition resides in another package but is being used in the current package. For this reason, some tools support the use of a different icon for referenced or imported classes.
Click the View Image link to walk through the process of identifying and incorporating into the package the classes that support the selected use cases.
Price Planning Domain Partition
Click the Exercise link below to work on the course project. In this exercise, you will allocate classes to domain partitions.
Object Model Domain Partitioning - Exercise