Advanced Object-Oriented Software Engineering

Object-Oriented Methodology:

OMT

Analysis

Summary

by

Nicholas Leuci

Los Angeles,  CA

[email-masked]

Copyright  ©  2018

All Rights Reserved

Object-Oriented
Methodology:

OMT
Analysis Summary

OMT
Analysis

Identify Stakeholders
(participants in Analysis and Design)

Overview of Analysis Process

Write a Requirements
Statement

Construct an Object Model

Identify objects and classes

Prepare a data dictionary

Identify associations
between objects

Identify attributes of
objects and links

Organize and simplify object
classes using inheritance

Verify that access paths
exist for likely queries

Iterate and refine the model

Group classes into modules

Construct
a Dynamic Model

Prepare scenarios of typical
interaction sequences

Identify events between
objects

Prepare an event trace for
each scenario

Build a state diagram

Match events between objects
to verify consistency

Construct
a Functional Model

Identify input and output
values

Build DFDs showing
functional dependencies

Describe functions

Identify constraints

Specify optimization
criteria

OMT Analysis

First Identify Stakeholders

OMT Analysis is
the process of investigating and evaluating the problem domain in order to
build the precise, clear and correct model required as a basis to achieve a
solution to the problem.

The first steps
in analysis are to identify stakeholders:
users, developers, owners, etc.
A statement of the problem is always needed, which becomes a living,
shared document.  Discussions with
users, domain experts, and the results of previous efforts including
prototypes, are used to build models of components.

The overall
outcome of analysis is to build an OMT Model consisting of Object Model,
Dynamic Model and Functional Model views.

Write a Requirements Statement

Construct an Object Model

The following steps are
performed in constructing an Object Model:

Identify objects and classes.

Prepare a data dictionary.

Identify associations (including aggregations)
between objects.

Identify attributes of objects and links.

Organize and simplify object classes using
inheritance.

Verify that access paths exist for likely
queries.

Iterate and refine the model.

Group classes into modules.

Identify Objects and Classes

OMT Analysis

OMT Analysis

Identify Objects and Classes (continued)

Filter out unnecessary
classes, add missing classes, and combine classes with overlaps;  for example:

¨
Redundant
classes – combine into one common class

¨
Irrelevant classes
– get rid of them

¨
Vague classes
– redefine and clarify

Attributes
– use logical, problem domain naming

Operations – describe
methods on objects only

Roles – they apply to
associations, not objects

Implementation constructs
– Avoid them totally at the outset

Eliminate Unnecessary Classes

Make a Data Dictionary

Identify Associations

Identify Associations (continued)

Use Valid Associations - Discard unnecessary and incorrect associations:

¨
Associations
between eliminated classes

¨
Irrelevant or implementation
domain associations

¨
Actions
(transient events shouldn’t be associations)

¨
Ternary
associations (keep it simple, decompose into binary associations whenever
possible)

¨
Derived
associations (eliminate redundancy)

Classes,
attributes and associations in the object model should represent independent, disjoint
information.

Clarify
Associations - Further specify and
clarify the semantics of associations;
i.e.:

¨
Misnamed
associations (be precise and clear).

¨
Role names, add
them only where appropriate.

¨
Qualified
associations;  a qualifier
distinguishes objects on the ‘many’ side of an association.

¨
Multiplicity,
challenge both the ‘many’ side as well as the ‘one’
side;  get it right.

¨
Missing
Associations, iteratively add them as they are discovered.

Identify Attributes

Eliminate unnecessary
attributes;  for example:

¨
Objects –
if the entity is more important than its value, it is an object, not an
attribute.

¨
Qualifiers
– dependencies usually belong to associations.

¨
Names – a
name is an attribute only when it doesn’t depend on context.

¨
Identifiers
– these are implicit, don’t define them.

¨
Link Attributes
– if the value depends on the link and not on the object, it belongs to
the link.

¨
Internal Values
– if it is not visible, get rid of it.

¨
Fine Detail or Discordant
Attributes – remove them

Object Model with
Attributes, but Without Inheritance

Object Model with
Attributes, and With Inheritance

Iterating Object Modeling

Some refinements only come
after the Dynamic and Functional Models are done;  problems include:

¨
Asymmetries in
associations and generalizations.

¨
Disparate
attributes and operations

¨
Difficulty in
generalizing cleanly

¨
An operation
with no good target class

¨
Duplicate
associations with the same name, purpose

¨
Role determining
a class;  roles should define
associations

¨
Unneeded classes
or associations, invalid attributes

¨
Missing
associations, or incorrectly placed associations

¨
Refining
Inheritance

Object Model Further Refined

Group Classes into Modules

The last step in
constructing an Object Model is to group classes into modules, logical,
cohesive subsets of the entire model.

Construct A Dynamic Model

The next step is building
the Dynamic Model of events and states, actions and activities, as follows:

Prepare scenarios of typical interaction
sequences

Identify events between objects

Prepare an event trace for each scenario

Build a state diagram

Match events between objects to verify
consistency

Prepare Scenarios of Typical Interaction Sequences

Add Exceptions to Scenarios

Identify events between objects

Prepare an event trace for each scenario

Match Events Between Objects To Verify Consistency

Create a Collaboration Diagram

(aka Group Object Message or Event Flow Diagram):

Build a state diagram

Construct A Functional Model

Functional Modeling shows
data transforms within a system, including how values enter, get processed,
what any dependencies are, and how values leave a system.  Processes on a Data Flow Diagram (DFD)
correspond to activities or actions in the state diagrams.  The flows on a DFD correspond to objects
or their attributes.

The following steps are
needed:

Identify input and output values

Build DFDs showing functional dependencies

Describe functions

Identify constraints

Specify optimization criteria

Identify input and output values

Build DFDs showing functional dependencies

Describe Functions

Identify Constraints

Specify Optimization Criteria

Other elements in completing
the Functional Model include:

¨
Identifying
constraints between objects

¨
Specifying
Optimization Criteria

¨
Adding
Operations from the Object Model

¨
Adding
Operations from Events

¨
Adding
Operations from State Actions and Activities

¨
Adding
Operations from Functions

Simplify and clarify when
the semantics or purpose become obscured by too much detail.

Iterating the Analysis

Building an Analysis using
the OMT Object, Dynamic and Functional Models is an iterative process.  No one ever gets it right the
first pass.  The Analysis should be
continuously and iteratively refined, elaborated, and detailed.  If some aspect of it is not quite right
yet, accept that for the time being.
Keep focused on the problem domain and the large scale issues.

Analysis is complete when all of the stake holders agree on the
definition of the problem domain and the defined Object, Dynamic and Functional
Model solution.

This consensus becomes the system’s requirements.

The next stage is Design:  thinking
about the solution, modeling the problem domain in the solution domain.  Design involves the same three
models:  Object, Dynamic, and
Functional.  Iteratively, more
detail is added to the diagrams, including information from the solution
itself.  How objects are architected
internally, how they interface and collaboratively behave together, and how
they share and process information together are all detailed.

The last stage is
Implementation:  generating classes from the model using
a CASE tool, and building the application.