Book Review
Despite the subtitle, this is not a book about C++ nor even software
development in C++. It is a strongly pragmatic book about Rumbaugh's
Object Modelling Technique (OMT) methodology that uses C++ as the
implementation language for a few of its examples.
Front loading
The emphasis of this book is on requirements through to design, with
the claim that the iterative nature of the OO software lifecycle
means that what most of us think of as "development" is really just
an ongoing "evolution" of a prototype. Of the 18 short chapters,
only three really cover C++ or development and the rest of the book
is clearly focused on the front-end of the lifecycle. Consequently,
the early chapters provide an in-depth discussion of identifying and
classifying objects, analysing their relationships and designing
their interactions. The discussion of object relationships in
chapter 2 should raise everyone's awareness of the many different
types of relationship that we need to model - see Ulrich
Eisenecker's article on inheritance elsewhere in Overload 10 for a
similarly provocative discussion. Because of the focus on object
relationships and effective requirements analysis, the OMT
methodology itself is not even introduced until chapter 8.
OMT++
The most startling aspect of this book is the generally critical
tone of exposition. OMT is presented in the context of a full
software lifecycle and Duffy points out many shortcomings and
suggests realistic solutions - clearly the result of practical
experience with OMT. These solutions generally involve adopting a
pick'n'mix approach to different methodologies, for example
Jacobson's "use cases" are recommended for subdividing the problem
domain to produce subsystems that can be manageably handled by OMT.
Similarly, "concept maps" are introduced to reinforce the
requirements analysis and filter out 'invalid concepts' that would
otherwise not be discovered until later in the lifecycle using
classical OMT, "event-response lists" are used as an aid to dynamic
modelling and Object Flow Diagrams are used alongside the Data Flow
Diagrams of classical OMT.
Throughout the book a handful of example problems are used to
examine the phases of the software lifecycle, iteratively being
fleshed out as requirements become clearer and analysis proceeds
towards design. Partial implementations are given but after fairly
thorough treatment, completing the implementations would be pretty
much a mechanical process.
C--
If the strength of this book is in the focus on the front-end of the
lifecycle, its greatest weakness is certainly in its presentation of
C++. Although templates and exception handling are both introduced
early on as being important features, their description is
incomplete and both features are described as "not widely supported
at the time of writing" - this in a book published in June 1995!
Exception handling is treated in a particularly cursory manner with
no mention of how it affects a class interface, despite repeated
comments about the importance of considering exception strategies
during analysis. This is particularly unfortunate given Duffy's
recommendation that exception handling is written into templates - a
thorny problem at the best of times for which I would have liked to
have seen his solution.
Duffy hands down occasional "rules" for writing maintainable C++
which are usually vague guidelines and often unsupported - multiple
inheritance is maligned for being difficult and generally
unnecessary. This could be forgiven if the quality of the C++ code
in the book wasn't so poor: code fragments suffer from inconsistent
layout and naming conventions, occasional syntax errors and some
outright poor practice, e.g., Boolean expressions are explicitly
tested against FALSE and TRUE (the latter being particular error-
prone).
Amongst the recommendations are some interestingly draconian
restrictions on method complexity. Duffy states that no method
should contain more than five lines of code nor contain more than
one decision. This leads to an explosion of methods so it is perhaps
no surprise that Duffy says classes should have "a maximum of 40"
methods.
Summary
Duffy's thorough and pragmatic approach to the OO lifecycle is let
down by poor illustration with inadequate C++. Although I found his
style somewhat slow and leaden at times, particularly the
introductory chapter, I think the detailed treatment of the example
problems provides many insights into the difficult early stages of
the software lifecycle. Occasional vagueness ("experience has
shown", "general agreement in the literature") is offset by an
extremely varied and interesting set of references at the end of
each chapter and at least all of the exercises presented have model
solutions given in the appendix - something I wish more books would
do.
As a book on requirements capture and OOA/D, I can recommend it with
the above reservations, but I'd be a little more enthusiastic if it
wasn't trying to "tag along" with the C++ wave of popularity.
Other
Authors with the same surname
Duffy
From Chaos to Classes, Object Oriented Software Development in C++ by Daniel Duffy (Reviewed Jan 1996)
Last Update - 13 May 2001.
To link to this review, please use the URL:
http://www.accu.org/bookreviews/public/reviews/f/f002006.htm
Copyright © The Association of C & C++
Users 1998-2000. All rights reserved.
Mirrored from http://www.accu.org/