
Table 1: Table of Metrics
Metric name Metric definition
Number of classes The total number of classes
Number of attributes The total number of attributes
Number of methods The total number of methods
Number of associations The total number of associations
Number of aggregations The total number of aggregations
Number of dependencies The total number of dependencies
Number of generalisations The total number of generalisations
Number of aggregations hierarchies The total number of aggregations hierarchies
Number of generalisations hierarchies The total number of generalisations hierarchies
Maximum DIT The maximum of the depths of inheritance trees
consists in finding out the right processes, is slightly
different because in one case we have to specify
programs or requests and in the other we have to
specify operations.
It means that the last step constitutes the main
difference between a traditional design and an object
design because in traditional design, processes are
not located and this fourth step does not exist. It also
means that to optimise the processes in a traditional
design we just have to check if they are well done, in
an object design we have, in addition, to check if
they are well placed.
2 OBJECT ORIENTED METRICS
A great lot of works have been done on metrics
(Briand, 1996; Genero, 2002,2001,2000; Lorenz,
1994; Chidamber, 1994), specially on static metrics.
The goal is to be able to say if a system has been
correctly built according to the rules implied by the
model which has been used.
Most of these metrics are based on criteria such as:
number of classes, number of links, number of
inheritance and composition relationships, ratios
attributes/operations in each class, depth of
inheritance hierarchies, etc. and even cyclomatic
number of the class diagram. The idea, of course, is
that a well built diagram, that is a good design, will
induce a good code and a very efficient system, and
it is true that a good design is always a key for a
successful implementation.
As example, Genero (Genero,2002) proposed the
table of metrics shown in table 1.
By applying these metrics the designer can evaluate
his class diagram and is able to re-build (some parts
or the whole of it) in order to guarantee that what he
has built is well built (Schuette,1998).
Unfortunately, the true finality of an information
system is not to be well built, but is to give entire
satisfaction when it runs, that means to give correct
answers to any event coming in, and the quickest as
possible. The proposal of metrics is useless if their
practical use is not demonstrated (Basili, 1996;
Olsina, 1999; Briand, 2001; Fenton, 1997; Poels,
2000; Schneidewind, 1992). Thus, their validation
must be carried out from two points of view; first the
empirical validation and then the formal validation
(Romero, 2002; Brito, 1999).
Dynamic metrics appeared then, to allow an
evaluation of the system behaviour (Melton, 1998).
Most of them are based on use cases and, of course,
on UML concepts from initial works of Marchesi
(Marchesi, 1998) and extended by Hendersons -
Sellers in (Herdersons, 1996, 2002) and Yacoub
(Yacoub, 1998).
Three primary metrics are suggested:
the total number of use cases
the overall number of communications between
actors and use cases
the total number of communications between actors
and use cases neglecting include and extend
structures
The following size measures are then added:
number of atomic actions in the main flow
number of atomic actions in each alternative flow
the longest path between the first atomic action of
the use case to the final atomic action of the use case
number of alternative flows (Withmire, 1997))
number of actors, etc.
Most of these metrics are metrics for requirements.
They are used to assess when a requirement is too
complex, at the wrong level, or too superficial
(Costello, 1995)(Zowghi, 2000). But to evaluate the
system behaviour the main notion to deal with is
time.
We have to be able to say if the system will run well
over a full period of time, we have to be able to take
into account what will happen during that period and
optimise the system performances over that period.
Of course, the result of this optimisation will give a
new arrangement of operations in classes, and the
best one if possible.
METRICS FOR DYNAMICS: HOW TO IMPROVE THE BEHAVIOUR OF AN OBJECT INFORMATION SYSTEM
345