The Party, Place, Thing Class Archetype

The Party, Place, Thing class archetype is one of four categories of class identified in an object modelling technique called Modelling in Colour. Modelling in Colour is a set of patterns and strategies that can help produce better object-oriented analysis and design models


The Party, Place, Thing class archetype is one of four class archetypes in Peter Coad's 'modeling in color' technique.

Parties, places, and things are the main role-players in which we are interested. These are the individual people, organizations of various kinds (companies, charities, government agencies, schools, churches, etc), buildings or locations, and other individually identifiable objects that participate in one or more ways in the Moment-Intervals captured in our software.


Figure 1: The Party, Palce, Thing Class Archetype

In business systems, the candidates for Party, Place, Thing classes are the actual people and organizations with whom we conduct business, the actual places we go to conduct business, and the individual things we give and receive in the course of that business. They are the people, organizations, places and things that participate in some way in our system and that we need to track. They are the role-players in our object model. In the classic board game, Cluedo (Clue in the USA), we have six characters with names like Colonel Mustard and Mrs. White that could have played the role of murderer, nine rooms that could be where the muder was done and, therefore, the place plays the role of crime-scene, and six items that could have be the murder weapon.

Finding Party, Place, Thing Classes

The party role-player classes for are typically Person and Organization. These are often, but not always, modelled as sub-classes of an abstract Party class (or implement a Java-style interface called Party). The super-class/interface is only of genuine value when there is significant genuinely common properties and behaviour that can be placed in the super-class/interface. Frequently, in business, individuals are treated very differently from organizations, and even properties like name and contact information differ considerably in the details. This makes the use of a Party superclass/interface less useful in practice than it might initially seem. 

Typically a place is some identifiable location where Moment-Intervals that we are interested in happen. We look for where parties or things come to rest, containers of things, and departure points and destinations of journeys and movements.

A thing is a distinct entity participating in a Moment-Interval that is not a party and not the location where the Moment-interval is occurring. If parties answer the question of who is involved in a Moment-Interval and places answer the question of where a Moment-Interval occurs, then things are the answer to the question of what else is involved in a Moment-Interval.

Typical Responsibilities

Like all the class archetypes, the usefulness of the Party, Place Thing class archetype in reviewing and building object models is due to its typical responsibilities, and the lists of typical attributes, operations and associations that represent those responsibilities.

More on the typical attributes, operations and associations of Party, Place, Thing classes...


The Class Archetype Formerly Known As...

In 1997, Peter Coad, with David North and Mark Mayfield, published the second edition of their book,  Object Models: Strategies, Patterns, & Applications. Page 435 describes a small object model pattern called 'Actor-Participant'. Today this is reflected in the Party, Place, Thing and Role class archetypes.  In Streamlined Object Modeling: Patterns, Rules and Implementations, Jill Nicola, Mark Mayfield, and Mike Abney refer to the same collaboration as the 'Actor-Role' pattern. 

It would seem intuitive to call the people and organizations that play roles in our software, actors [Coad 97]. Unfortunately, the term, actor, has been defined in UML to mean something that does not map to an individual person or organization as a role player. In UML an actor is far closer to what we usually call a role. So to avoid causing any more confusion than has already been caused by the abuse of the term in UML, we stick with the term role-player when modelling with class archetypes.

Another name sometimes suggested for this archetype is Entity but there are two arguments against using this term. Firstly it is already in use in the data-modelling world and although our parties, places and things naturally map to entities in data modellers' Entity-Relationship diagrams, the converse is not necessarily true. Secondly, the name Party, Place, Thing neatly reminds us that this archetype comes in three flavours, a fact that is of significance in the various analysis patterns involving class archetypes.

More on the typical attributes, operations and associations of Party, Place, Thing classes...

The Other Class Archetypes

In addition to the Moment-Interval Class Archetype, Peter Coad defines three other class archetypes:
 

Related Books

Books (with Amazon.com links) that contain related or complimentary material:
 
  • Coad, Lefebvre, De Luca, Java Modeling in Color with UML, Prentice Hall PTR, 1999
    The original introduction to the modeling in color technique with examples from common business software problem domains.
  • Coad, North, Mayfield, Object Models: Strategies, Patterns, and Applications, Prentice Hall PTR, 1996
    Excellent precursor to the modeling in color technique. Much of the initial thinking that evolved into the technique is clearly visible, and presented through simple example models.
  • Nicola, Mayfield, Abney, Streamlined Object Modeling: Patterns, Rules, and Implementation, Prentice Hall PTR, 2001
    A related set of object modelling patterns with an emphasis on archetypal collaboration between different kinds of classes. A comparison with the modelling in colour archetypes is included.
  • Evans, Domain-Driven Design: Tackling Complexity in the Heart of Software, Addison-Wesley Professional 2003
    A slightly lower-level set of patterns for object models. Compliments the modeling in colour archetypes in many ways and addresses the use of such patterns in agile development environments.
  • Palmer, Felsing, A Practical Guide to Feature-Driven Development, Prentice Hall PTR, 2002
    The author's book describing Jeff De Luca's agile development process. While FDD does not mandate modelling in colour, the two compliment each other exceptionally well. The book explains when and how.


Comments

Stephen Palmer
Stephen Palmer
Software Developer, Consultant, Author
Exmouth, Devon, UK
Article rating:
Your rating:

Activity for this knol

This week:

31pageviews

Totals:

1047pageviews