SlideShare a Scribd company logo
Visit https://ebookultra.com to download the full version and
explore more ebooks
Object oriented design knowledge principles
heuristics and best practices Javier Garzã¡S
_____ Click the link below to download _____
https://ebookultra.com/download/object-oriented-design-
knowledge-principles-heuristics-and-best-practices-
javier-garzas/
Explore and download more ebooks at ebookultra.com
Here are some suggested products you might be interested in.
Click the link to download
Starting Out The c3 Sicilian 1st Edition John Emms
https://ebookultra.com/download/starting-out-the-c3-sicilian-1st-
edition-john-emms/
Object Oriented Design with UML and Java 1st Edition
Kenneth Barclay
https://ebookultra.com/download/object-oriented-design-with-uml-and-
java-1st-edition-kenneth-barclay/
Java the UML way integrating object oriented design and
programming Else Lervik
https://ebookultra.com/download/java-the-uml-way-integrating-object-
oriented-design-and-programming-else-lervik/
Scientific Software Design The Object Oriented Way 1st
Edition Damian Rouson
https://ebookultra.com/download/scientific-software-design-the-object-
oriented-way-1st-edition-damian-rouson/
Design patterns explained a new perspective on object
oriented design 2. ed Edition Shalloway
https://ebookultra.com/download/design-patterns-explained-a-new-
perspective-on-object-oriented-design-2-ed-edition-shalloway/
The Anti Alapin Gambit Death to the 2 c3 Sicilian 1st
Edition Cyrus Lakdawala
https://ebookultra.com/download/the-anti-alapin-gambit-death-to-
the-2-c3-sicilian-1st-edition-cyrus-lakdawala/
Enterprise SOA Service Oriented Architecture Best
Practices 9th Edition Dirk Krafzig
https://ebookultra.com/download/enterprise-soa-service-oriented-
architecture-best-practices-9th-edition-dirk-krafzig/
Object oriented software development using Java principles
patterns and frameworks 2nd Edition Xiaoping Jia.
https://ebookultra.com/download/object-oriented-software-development-
using-java-principles-patterns-and-frameworks-2nd-edition-xiaoping-
jia/
Principles of Object Oriented Modeling and Simulation with
Modelica 2 1 1st Edition Peter Fritzson
https://ebookultra.com/download/principles-of-object-oriented-
modeling-and-simulation-with-modelica-2-1-1st-edition-peter-fritzson/
Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S
Object oriented design knowledge principles heuristics
and best practices Javier Garzã¡S Digital Instant
Download
Author(s): Javier Garzás, Javier Garzás and Mario Piattini
ISBN(s): 9781591408987, 1591408989
Edition: illustrated edition
File Details: PDF, 5.29 MB
Year: 2007
Language: english
Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S
i
Object-Oriented
Design Knowledge:
Principles, Heuristics and
Best Practices
JavierGarzás
Oficina de Cooperación Universitaria (OCU)S.A., Spain
Mario Piattini
University of Castilla - La Mancha,Spain
Hershey • London • Melbourne • Singapore
IDEA GROUP PUBLISHING
ii
AcquisitionsEditor: MichellePotter
DevelopmentEditor: Kristin Roth
SeniorManagingEditor: JenniferNeidig
ManagingEditor: SaraReed
CopyEditor: AprilSchmidt
Typesetter: MarkoPrimorac
CoverDesign: LisaTosheff
Printed at: YurchakPrintingInc.
PublishedintheUnitedStatesofAmericaby
Idea Group Publishing (an imprint of Idea Group Inc.)
701 E. Chocolate Avenue
HersheyPA17033
Tel: 717-533-8845
Fax: 717-533-8661
E-mail:cust@idea-group.com
Website:http://www.idea-group.com
andintheUnitedKingdomby
Idea Group Publishing (an imprint of Idea Group Inc.)
3 Henrietta Street
CoventGarden
LondonWC2E8LU
Tel: 44 20 7240 0856
Fax: 44 20 7379 0609
Website:http://www.eurospanonline.com
Copyright © 2007 by Idea Group Inc. All rights reserved. No part of this book may be reproduced, stored or
distributed in any form or by any means, electronic or mechanical, including photocopying, without written
permission from the publisher.
Product or company names used in this book are for identification purposes only. Inclusion of the names of the
products or companies does not indicate a claim of ownership by IGI of the trademark or registered trademark.
LibraryofCongressCataloging-in-Publication Data
LibraryofCongressCataloging-in-PublicationData
Object-orienteddesignknowledge:principles,heuristics,andbestpractices/JavierGarzasandMarioPiattini,
editors.
p. cm.
Summary:"Thesoftwareengineeringcommunityhasadvancedgreatlyinrecentyearsandwecurrentlyhave
numerousdefineditemsofknowledge,suchasstandards,methodologies,methods,metrics,techniques,languages,
patterns, knowledge related to processes, concepts, etc.The main objective of this book is to give a unified and
globalvisionaboutMicro-ArchitecturalDesignKnowledge,analyzingthemaintechniques,experiencesand
methods"--Providedbypublisher.
ISBN 1-59140-896-2 (hardcover) -- ISBN 1-59140-897-0 (softcover) -- ISBN 1-59140-898-9 (ebook)
1. Object-oriented methods (Computer science) 2. Object-oriented programming (Computer science) I. Garzas,
Javier, 1975- II. Piattini, Mario, 1966-
QA76.9.O35.O244 2006
005.1'17--dc22
2006010089
British Cataloguing in Publication Data
A Cataloguing in Publication record for this book is available from the British Library.
All work contributed to this book is new, previously-unpublished material. The views expressed in this book are
those of the authors, but not necessarily of the publisher.
iii
Object-Oriented
Design Knowledge:
Principles, Heuristics
and Best Practices
Table of Contents
Preface .............................................................................................................vi
Chapter I
The Object-Oriented Design Knowledge................................................... 1
Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A.,
Spain
Mario Piattini, University of Castilla - La Mancha, Spain
Chapter II
The Object-Oriented Design Knowledge Ontology ................................. 8
Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A.,
Spain
Mario Piattini, University of Castilla - La Mancha, Spain
Chapter III
Using Linguistic Patterns to Model Interactions ....................................23
Isabel Díaz, Central University of Venezuela, Venezuela
Oscar Pastor, Technical University of Valencia, Spain
Lidia Moreno, Technical University of Valencia, Spain
Alfredo Matteo, Central University of Venezuela, Venezuela
iv
Chapter IV
A Framework Based on Design Patterns: Implementing UML
Association, Aggregation and Composition Relationships in
the Context of Model-Driven Code Generation .....................................56
Manoli Albert, Universidad Politécnica de Valencia, Spain
Marta Ruiz, Universidad Politécnica de Valencia, Spain
Javier Muñoz, Universidad Politécnica de Valencia, Spain
Vincente Pelechano, Universidad Politécnica de Valencia,
Spain
Chapter V
Design Patterns as Laws of Quality ........................................................ 105
Yann-Gaël Guéhéneuc, University of Montreal, Canada
Jean-Yves Guyomarc’h, University of Montreal, Canada
Khashayar Khosravi, University of Montreal, Canada
Houari Sahraoui, University of Montreal, Canada
Chapter VI
Automatic Verification of OOD Pattern Applications .......................... 143
Andrés Flores, University of Comahue, Argentina
Alejandra Cechich, University of Comahue, Argentina
Rodrigo Ruiz, University of Comahue, Argentina
Chapter VII
From Bad Smells to Refactoring: Metrics Smoothing the Way ......... 193
Yania Crespo, Universidad de Valladolid, Spain
Carlos López, Universidad de Burgos, Spain
María Esperanza Manso Martínez, Universidad de Valladolid,
Spain
Raúl Marticorena, Universidad de Burgos, Spain
Chapter VIII
Heuristics and Metrics for OO Refactoring: A Consolidation and
Appraisal of Current Issues ..................................................................... 250
Steve Counsell, Brunel University, UK
Youssef Hassoun, University of London, UK
Deepak Advani, University of London, UK
Chapter IX
A Survey of Object-Oriented Design Quality Improvement .............. 282
Juan José Olmedilla, Almira Lab, Spain
v
Chapter X
A Catalog of Design Rules for OO Micro-Architecture ..................... 307
Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A.,
Spain
Mario Piattini, University of Castilla - La Mancha, Spain
About the Authors ..................................................................................... 349
Index ............................................................................................................ 356
vi
Preface
In order to establish itself as a branch of engineering, a profession must under-
stand its accumulated knowledge. In addition, software engineering as a branch
of engineering must take several basic steps in order to become an established
profession, highlighting understanding of the nature of its knowledge.
Software engineering experts always have used proven ideas. Concretely, in
the object-oriented (OO) design knowledge field, the practical experience of it
has been crucial to software engineers, and it is in the last years when these
ideas, materialized in items such as patterns or refactorings have reached their
biggest popularity and diffusion. And in this regard, the software engineering
community has advanced greatly and we currently have numerous and defined
chunks of knowledge, including standards, methodologies, methods, metrics,
techniques, languages, patterns, knowledge related to processes, concepts, and
so forth. Although these different areas of knowledge relate to the construction
of an OO system, there is a lot of work still to be done in order to systematize
and offer this knowledge to designers in such a way that it can be easily used in
practical cases.
A software architecture is a description of the subsystems and components of
a software system and relationships between then.1
Usually, the software ar-
chitecture is subdivided into macro and micro architecture. Whereas macro
architecture describes the metamodel of design, this that provides the high-
level organization, the micro architecture describes details of a design at a lower
level.
vii
OO design is a software design technique, which is expressed in terms of ob-
jects and relationships between those; at the level of micro architecture it in-
cludes elements such as classes, its relationships, responsibilities, refactorings,
and so on.
OO micro architectural knowledge is built upon design experiences, such as
problem solving, or lessons learned. Therefore, the OO micro architectural de-
sign knowledge has grown with time and the increasing complexity of soft-
ware. This knowledge expands and accumulates when it is stored in books and
other media for the use of designers.
In addition, the major part of OO design knowledge is difficult to identify and
use. The experience has demonstrated that design often omits common prin-
ciples, heuristics, and so on, with a consequent major loss of experience. Con-
sequently, actually, serious difficulties are still encountered when we tackle the
construction of OO systems. Although designers have accumulated a body of
knowledge that they apply during these processes, this is very implicit. Fortu-
nately, it is now being specified and popularized in different forms: principles,
heuristics, patterns, and more recently, refactoring techniques. However, today,
the difference between these concepts is generally unclear and not all of them
have received the same amount of attention or have reached the same degree
of maturity. In addition, a strong knowledge does not exist on items such as
design principles, best practices, or heuristics. The problem confronting the
designer is how to articulate all this explicit knowledge and to apply it in an
orderly and efficient way in the OODA, in such a way that it is really of use to
him or her. In fact, in practice, even such advanced subjects like OO patterns
have this problem
Design knowledge and best practices are stored in individual expert minds, or
implicitly encoded and documented in local organisational processes. It has
always been true that a significant part of design knowledge resides in the
minds of the experts that make it up. However, communities and companies are
beginning to find that it is easy to lose a vital element of their intellectual prop-
erty: corporate design knowledge. Therefore, we can say that the major part of
the design knowledge today is tacit knowledge: it in the form of project experi-
ences, heuristics, or human competencies that are difficult to be captured and
externalised.
The effective management of this knowledge is today a significant challenge.
For knowledge management to be effective, this knowledge should be orga-
nized and classified. In addition, with this purpose, developing unified cata-
logues of knowledge, ontologies, empirical studies, and so on, books and studies
such as those we present here, are very important issues to improve the use of
OO design knowledge.
Therefore, in this context, we present this book whose main objective is to give
a global vision of micro-architectural design knowledge, exposing the main tech-
niques and methods, and analyzing several aspects related to it.
viii
The subject matter in this book is divided into ten chapters. The chapters seek
to provide a critical survey of the fundamental themes, problems, arguments,
theories, and methodologies in the field of OO micro architectural design knowl-
edge. Each chapter has been planned as a self-standing introduction to its sub-
ject.
Therefore, in Chapter I Javier Garzás and Mario Piattini present an introduc-
tion to “The Object-Oriented Design Knowledge,” where they show the main
issues and problems of the field. In OO micro-architectural design knowledge,
design patterns are the most popular example of accumulated knowledge, but
other elements of knowledge exist such as principles, heuristics, best practices,
bad smells, refactorings, and so forth, which are not clearly differentiated; in-
deed, many are synonymous and others are just vague concepts.
An essential issue to building an OO design knowledge discipline is organizing
this knowledge. In Chapter II, titled “The Object-Oriented Design Knowledge
Ontology,” Javier Garzás and Mario Piattini show an ontology that organize and
relation the OO knowledge. The authors propose an ontology in order to struc-
ture and unify such knowledge. The ontology includes rules (principles, heuris-
tic, bad smells, etc.), patterns, and refactorings. They divide the knowledge on
rules, patterns, and refactorings and they show the implications among these.
Moreover, they show an empirical validation of the proposed conclusions.
Chapter III, “Using Linguistic Patterns to Model Interactions,” by Isabel Díaz,
Oscar Pastor Lidia Moreno, and Alfredo Matteo, is a pivotal chapter that changes
the focus of the book to more technical information systems issues. This chap-
ter shows an elegant example of how highly relevant clinical questions can be
addressed in a scientific manner. In this chapter, heuristic-oriented techniques
and linguistics-oriented techniques proposed by several authors to model inter-
actions are analyzed. In addition, a framework to facilitate and to improve the
interaction modeling is described. This framework was conceived to be inte-
grated into automatic software production environments. It uses linguistic pat-
terns to recognize interactions from use case models. The validation process
used and the main results are also presented.
In Chapter IV, Manoli Albert, Marta Ruiz, Javier Muñoz and Vicente Pelechano
show “A Framework Based on Design Patterns: Implementing UML Associa-
tion,Aggregation and Composition Relationships in the Context of Model-Driven
Code Generation.” The chapter proposes a framework based on design pat-
terns to implement UML (Unified Modeling Language) association, aggrega-
tion, and composition relationships, and for it they propose a semantic interpre-
tation of these concepts that avoids the ambiguities introduced by UML.
Therefore, in “Design Patterns as Laws of Quality” Yann-Gaël Guéhéneuc,
Jean-Yves Guyomarc’h, Khashayar Khosravi, and Houari Sahraoui, Chapter
V, show how design patterns can be used as facts to devise a quality model and
they describe the processes of building and of applying such a quality model.
ix
The chapter highlights the need for principles in software engineering, where
these can be laws or theories formalizing and explaining observations realized
on software.
For the sake of completeness in this book, automatic verification of design
knowledge is addressed in Chapter VI. Andres Flores, Alejandra Cechich, and
Rodrigo Ruiz present “Automatic Verification of OOD Pattern Applications.”
Chapter VII, “From Bad Smells to Refactoring: Metrics Smoothing the Way”,
is authored by Yania Crespo, Carlos López, María Esperanza Manso Martínez,
and Raúl Marticorena. This chapter discusses one of the current trends in
refactorings: when and where we must refactor. From the bad smell concept, it
is possible to discover their existence from an objective viewpoint, using metrics.
The chapter presents a study on the relation of refactorings, bad smells and
metrics, including a case study on the use of metrics in bad smells detection.
The chapter leads to the determination where refactoring is the basis of heuris-
tics and metrics, which is likely to be the single most important factor at the
moment of use refactorings in the maintenance phase.
Therefore, in Chapter VIII, “Heuristics and Metrics for OO Refactoring: A
Consolidation and Appraisal of Current Issues,” Steve Counsell, Youssef
Hassoun, and Deepak Advani cover this topic in great depth. They look at
some of the issues which determine when to refactor (i.e., the heuristics of
refactoring) and, from a metrics perspective, open issues with measuring the
refactoring process. They thus point to emerging trends in the refactoring arena,
some of the problems, controversies, and future challenges the refactoring com-
munity faces.
A key point to building a OO design knowledge field is to understand the sev-
eral contributions to it. Since several OO metrics suites have been proposed to
measure OO properties, such as encapsulation, cohesion, coupling, and abstrac-
tion, both in designs and in code, in Chapter IX, titled “A Survey of Object-
Oriented Design Quality Improvement,” Juan José Olmedilla reviews the lit-
erature to find out to which high level quality properties are mapped and if an
OO design evaluation model has been formally proposed or even is possible.
The chapter is an excellent example of how performing a systematic review of
the estate of art.
At last, in Chapter X, “A Catalog of OOD Knowledge Rules for OO Micro-
Architecture,” by Javier Garzás and Mario Piattini, several types of knowledge
such as principles, heuristics, bad smells, and so on, are unified in a rules cata-
log.
In summary, these chapters constitute an evidence of the importance of micro-
architectural design knowledge, representing important ideas in different soft-
ware design areas. These are intended to be useful to a wide audience, includ-
ing software engineers, designers, project managers, software architects, IS/IT
managers, CIOs, CTOs, consultants, and software students.
x
We hope that the practical vision, scientific evidence and experience presented
in this book will enable the reader to use the design knowledge within the field
of software engineering and to help the field of software engineering answer
how software engineers might acquire its rich and essential accumulated knowl-
edge.
Javier Garzás and Mario Piattini, Editors
Ciudad Real, Spain
January 2006
Endnote
1
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996).
A system of patterns: Pattern-oriented software architecture. Addison-
Wesley.
xi
Acknowledgments
We would like to thank all the authors, because without their
contribution this book would not have been possible. We would
also like to thank Kristin Roth, our development editor, for her
help and encouragement.
The Object-Oriented Design Knowledge 1
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Chapter I
TheObject-Oriented
DesignKnowledge
Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain
Mario Piattini, University of Castilla - La Mancha, Spain
Abstract
In order to establish itself as a branch of engineering, a profession must understand
its accumulated knowledge. In this regard, software engineering has advanced
greatly in recent years, but it still suffers from the lack of a structured classification
of its knowledge. In this sense, in the field of object-oriented micro-architectural
design designers have accumulated a large body of knowledge and it is still have
not organized or unified. Therefore, items such as design patterns are the most
popular example of accumulated knowledge, but other elements of knowledge exist
such as principles, heuristics, best practices, bad smells, refactorings, and so on,
which are not clearly differentiated; indeed, many are synonymous and others are
just vague concepts.
2 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Introduction
“Chaos is order waiting to be deciphered”
~ José Saramago
Twenty years ago, Redwine (1984) commented that “an expert in a field must
know about 50,000 chunks of information, where a chunk is any cluster of
knowledge sufficiently familiar that it can be remembered rather than derived,”
adding that in mature areas it usually takes about 10 years to acquire this
knowledge. Since then, many authors (Shaw, 1990) have commented on the need
for defined chunks of knowledge in the software engineering field. In this regard,
the software engineering community has advanced greatly in recent years, and
we currently have numerous and defined chunks of knowledge, including
standards, methodologies, methods, metrics, techniques, languages, patterns,
knowledge related to processes, concepts, and so on.
Nevertheless, the field of software engineering is still beset by a lack of
structured and classified chunks of knowledge (McConnell, 2003) and not all
knowledge is transmitted, accessible or studied in the same way. For example,
what and where is the enormous amount of practical knowledge regarding
object-oriented micro-architectural design? We mean knowledge that has been
accumulated from the experience of working with the inherent properties of
software, knowledge which normally comes under what is generally accepted or
“practices which are applicable to most projects, about which there is a
widespread consensus regarding value and usefulness” (Bourque & Dupuis,
2004, p. A-10). Such knowledge may take the form of a source code, compo-
nents, frameworks, and so on, but these are no mechanisms for obtaining designs
throughout the software life cycle.
At this point, many will have already identified one of the essential items of
knowledge based on experience with object-oriented micro-architectural design:
design patterns. These are just the tip of the iceberg. Let us simplify matters and
suppose that we want to specialize as software engineers in object-oriented
design. By means of projects like SWEBOK, we can now ascertain what
“design” is, how it is subdivided, find the main bibliographical references, and so
on, and quite easily acquire a sound theoretical knowledge. If indeed we
concentrate part of our professional activity on design, we find that we need to
study the practical experience of other experts in the area, and at that moment,
the concept of pattern occurs to us. Yet, after examining the main pattern
references in object-oriented design, we still feel that something is missing.
Missing elements for the formulation of a good micro-architectural design
include principles, heuristics, best practices, bad smells, refactorings, and so on.
Table 1 gives an example of each of these.
The Object-Oriented Design Knowledge 3
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Considerable progress has been made in the accumulation of experience-based
knowledge of OO micro-architectural design, but we have advanced consider-
ably less in its exploitation and classification. This could be seen as a case of the
“Feigenbaum Bottleneck”: “as domain complexity grows, it becomes very
difficult for human experts to formulate their knowledge as practical strategies”
(Pescio, 1997).
First, in the following section, we will analyze the maintenance and design
patterns and relationship with analyzability and changeability in more detail.
Later, we will show a measurement of the impact of the patterns used. In the last
sections, we present acknowledgments, our conclusions and future projects, and
references.
The Object-Oriented Design Knowledge
Serious difficulties are still encountered when we tackle the construction of OO
systems, especially in the transition between the analysis processes and the OO
design, an aspect which is very vague in this type of paradigm (Henderson, Seller
& Eduards, 1990). In practice, designers have accumulated a body of knowledge
Table 1. Examples of OO design knowledge
PRINCIPLES
The Dependency Inversion Principle (DIP)
“Depend upon Abstractions. Do not depend upon concretions” (Martin, 1996).
HEURISTICS
“If two or more classes only share common interface (i.e., messages, not methods), then they
should inherit from a common base class only if they will be used polymorphically” (Riel, 1996).
BEST PRACTICES
“See objects as bundles of behavior, not bundles of data” (Venners, 2004).
BAD SMELLS
Refused bequest
Subclasses that do not use what they inherit (Fowler, Beck, Brant, Opdyke, & Roberts, 2000).
REFACTORINGS
Extract Interface
“Several clients use the same subset of a class's interface, or two classes have part of their
interfaces in common. Extract the subset into an interface. [ ]” (Fowler et al., 2000).
PATTERNS
Observer
“Intent: Define a one-to-many dependency between objects so that when one object changes
state, all its dependents are notified and updated automatically” (Gamma, Helm, Johnson, &
Vlissides, 1995).
4 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
that they apply during these processes. Up until a few years ago, this knowledge
was very implicit but fortunately, it is now being specified and popularized in
different forms: principles, heuristics, patterns and more recently, refactoring,
and so on. The difference between these concepts is generally unclear and not
all of them have received the same amount of attention or have reached the same
degree of maturity.
In fact, OO design principles are often confused and few formalized. In this
regard, there are few works about it, with the exception of the contributions of
a few (Gamma et al., 1995; Liskov & Zilles, 1974; Martin, 1995, 1996; Meyer,
1997).
Regarding OO design heuristics the main works to which we can refer are those
of Riel (1996) and Booch (1996).
Patterns, however, are without doubt one of the elements that have undergone
the greatest evolution and proof of this is the existence of numerous publications
on the theme. The application of patterns in OO began at the beginning of this
decade (Coad, 1992) and was consolidated by the work of Gamma et al. (1995),
Buschmann, Meunier, Rohnert, Sommerlad, and Stal (1996), Fowler (1996), and
Rising (1998). Amongst the different types of patterns, we can distinguish,
mainly, although other categories exist (antipatterns, specific domains, etc.):
• Architectural: These focus on the structure of the system, the definition
of subsystems, their responsibilities and rules.
• Object-oriented analysis/design (OOAD): To support the refining of
the subsystems and components as well as the relationships between them.
• Idioms: They help us to implement particular aspects of the design in a
specific programming language.
As we already know, the use of patterns means that we can avoid constant
reinvention, thus reducing costs and saving time. Gamma et al., 1995 point out
that one thing that expert designers do not do is resolve each problem from the
beginning. When they find a good solution, they use it repeatedly. This experi-
ence is what makes them experts. However, at the present time, when patterns
are used, several types of problems can occur (Schmidt, 1995; Wendorff, 2001):
difficult application, difficult learning, temptation to recast everything as a
pattern, pattern overload, ignorance, deficiencies in catalogs, and so forth.
Refactoring techniques are characterized by their immaturity, although it is true
to say that this topic is rapidly gaining acceptance, the main works in this area
are Kent Beck and Fowler’s (2000), Tokuda and Batory (2001), and Opdyke
(1992).
The Object-Oriented Design Knowledge 5
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
The problem confronting the designer is how to articulate all this explicit
knowledge and to apply it in an orderly and efficient fashion in the OODA, in such
a way that it is really of use to him or her. In fact, in practice, even such advanced
subjects like patterns have this problem. Ralph Johnson comments in this sense
that “for one thing, the large number of patterns that have been discovered so far
need to be organized. Many of them are competitors; we need to experiment and
find which are best to use. …Analyzing existing patterns, or making tools that use
patterns, or determining the effectiveness of patterns, could all be good topics”
(Johnson, 2000, personal communication). These problems could give rise to
incorrect applications of the patterns (Wendorff, 2001).
The differences between these elements are not clear. Many concern a single
concept with different names, while others on occasions do not contain knowl-
edge gained from experience, and still others are simply vague concepts. This
confusion leads to a less efficient use of knowledge, so concepts such as
principles or heuristics are still unknown to some software engineers, few of
whom understand completely their goals or relationships. This problem has been
brought up at several major congresses, for example the OOPSLA 2001
Workshop: “Beyond Design: Patterns (mis)used,” where such authors as
Schwanninger (2001) say “We got more and more aware that a good description
of the proposed solution is necessary, but useless for the reader if the problem
and the forces that drive the relationship between problem and solution are not
covered properly.”
Conclusion
Expert designers have always used proven ideas. It is in recent years when these
ideas, materialized mainly into the pattern concept, have reached their greatest
popularity and diffusion. However, more knowledge exists apart from that
related to patterns, although it would be true to say that this other knowledge is
frequently “hidden.” We should consider that OO micro architectural design
knowledge is associated with the pattern concept, but other elements exist, such
as principles, heuristics, best practices, bad smells, and so forth. These other
elements show a confused description, unification, definition, and so on.
Therefore, few studies systematize and offer the OO design knowledge to
designers in such a way that it can be easily used in practical cases. In addition,
the different studies published show the elements related to design knowledge in
a disconnected way. There has not been much effort made on empirical studies
about OO design knowledge, and the few works we have found are mainly
focused on design patterns.
6 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
As Shaw (1990) states, a branch of engineering must take several basic steps in
order to become an established profession, highlighting understanding of the
nature of knowledge. We as a discipline must ask how software engineers might
acquire this knowledge.
References
Abran, A., Moore, J. W., Bourque, P., & Dupuis, R. (Eds.). (2004). Guide to the
software engineering body of knowledge: SWEBOK. Los Alamos, CA: IEEE
CS Press.
Booch, G. (1996). Object solutions. Managing the object-oriented project. Red-
wood City, CA: Addison-Wesley.
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996). A
system of patterns: Pattern-oriented software architecture. New York: John
Wiley & Sons.
Coad, P. (1992). Object-oriented patterns. Communications of the ACM, 35(9),
152-159.
Fowler, M. (1996). Analysis patterns: Reusable object models. Boston, MA:
Addison-Wesley.
Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (2000). Refactoring:
Improving the design of existing code (1st
ed.). Boston: Addison-Wesley
Professional.
Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design patterns.
Reading, MA: Addison-Wesley Professional.
Henderson Seller, B., & Eduards, J. M. (1990). The object-oriented system life
cycle. Communications of the ACM, 33(9), 142-159.
Liskov, B. H., & Zilles, S. N. (1974). Programming with abstract data types.
SIGPLAN Notices, 9(4), 50-59.
Martin, R. C. (1995). Object-oriented design quality metrics: An analysis of
dependencies. ROAD, 2(3).
Martin,R.C.(1996).Thedependencyinversionprinciple.C++Report,8(6),61-66.
McConnell, S. (2003). Professional software development. Boston: Addison-
Wesley.
Meyer, B. (1997). Object-oriented software construction (2nd
ed.). Upper Saddle
River, NJ: Prentice Hall.
The Object-Oriented Design Knowledge 7
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Opdyke, W. (1992). Refactoring Object Oriented Frameworks. Illinois, Urbana-
Champain.
Pescio, C. (1997). Principles versus patterns. Computer, 30(9), 130-131.
Redwine, S. T. (1984). DOD-related software technology requirements, practices,
and prospects for the future (Tech. Rep. No. P-1788). Alexandria, VA:
Institute of Defense Analyses.
Riel, A. J. (1996). Object-oriented design heuristics. Boston: Addison-
Wesley Professional.
Rising, L. (1998). The patterns handbook: Techniques, strategies, and
applications. Cambridge: Cambridge University Press.
Schmidt, D. C. (1995). Experience using design patterns to develop reusable
object-oriented communication software. Communications of the ACM,
38(10), 65-74.
Schwanninger, C. (2001). Patterns as problem indicators. Paper presented at
the Workshop on Beyond Design Patterns (mis)Used. OOPSLA, Tampa
Bay, FL.
Shaw, M. (1990). Prospects for an engineering discipline of software. IEEE
Software, 7(6), 15-24.
Tokuda, L., & Batory, D. (2001). Evolving object-oriented designs with
refactoring. Automated Software Engineering, 8(1), 89-120.
Venners, B. (2004). Interface design best practices in object-oriented API
design in Java. Retrieved March 25, 2006, from http://www.artima.com/
interfacedesign/contents.html
Wendorff, P. (2001). Assessment of design patterns during software
reengineering: Lessons learned from a large commercial project.
Paper presented at the Proceedings of the 5th
European Conference on
Software Maintenance and Reeingineering (CSMR).
8 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Chapter II
TheObject-Oriented
DesignKnowledge
Ontology
Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain
Mario Piattini, University of Castilla - La Mancha, Spain
Abstract
It has been a long time since the object-oriented (OO) paradigm appeared.
From that moment, designers have accumulated much knowledge in design
and construction of OO systems. Patterns are the most refined OO design
knowledge. However, there are many others kinds of knowledge than are
not yet classified and formalized. Therefore, we feel it necessary to define
ontology in order to structure and unify such knowledge; a good
understanding of practical experience is crucial to software engineers.
Therefore, this chapter proposes an ontology for object-oriented design
knowledge.
The Object-Oriented Design Knowledge Ontology 9
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Introduction
Since Simula 67 up until the present day, knowledge related to the construction
of object-oriented (OO) systems has evolved significantly. Nowadays, due to
experience acquired during years of investigation and development of OO
systems, numerous techniques and methods that facilitate their design are
available to us.
By the middle of the 1990s the first catalogue of patterns was published by
Gamma, Helm, Johnson, and Vlissides (1995). The application of patterns in OO
design was consolidated, among others, by the work of Coad (1992), Gamma et
al. (1995), Buschmann, Meunier, Rohnert, Sommerlad, and Stal (1996), Fowler
(1996), and Rising (1998).
However, more knowledge exists apart from that related to patterns, and this
other knowledge is frequently “hidden.” Moreover, now the exclusive use of
patterns is not sufficient to guide a design, and the designer’s experience is
necessary to avoid overload, non-application or the wrong use of patterns due to
unawareness, or any other problems that may give rise to faulty and counterac-
tive use of the patterns. In summary, when patterns are used, several types of
problems may occur (Wendorff, 2001): difficult application, difficult learning,
temptation to recast everything as a pattern, pattern overload, deficiencies in
catalogues (search and complex application, high dependence of the program-
ming language, and comparatives), and so on.
In this sense, we need others’ chunks of knowledge such as principles, heuristic,
patterns, best practices, bad smells, refactorings, and so on. Nevertheless, there
is much uncertainty with the previous elements, and these elements have never
been studied as a whole. Its compatibility has been studied nor does a method
based in this knowledge exist.
In order to improve OO designs, using all OO design knowledge in a more
systematic and effective way, we have defined an ontology, which unifies
principles, heuristics, best practices, and so on, under the term of “rule”; the
ontology show the relationship among these “rules” and patterns and refactorings.
We have also defined an improved OOD process, which takes into account this
ontology and the OOD knowledge.
Moreover, we present in this chapter an empirical evaluation of this approach.
The empirical validation is based on Prechelt, Unger, Philippsen, and Tichy
(1997); Prechelt, Unger, Tichy, Bössler, and Votta (2001); and Wohlin, Runeson,
Höst, Ohlson, Regnell, and Wesslen (2000). This controlled experiment is
ascertain if the usage of the ontology for OOD knowledge really improves the
OOD process, helping in the detection of defects (rules violated) and solutions
(patterns).
10 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Ontology
An ontology describes knowledge of a domain in a generic way and provides an
agreed understanding of it.
Ontologies have a number of advantages: structuring and unifying accumulated
knowledge, benefits for communication, teaching concepts and their relation-
ships, sharing of knowledge and resolving terminological incompatibilities. It
would therefore be beneficial to define an ontology for the structuring and
unifying of OO micro-architectural design knowledge (see Figure 2).
Before describing the ontology, we shall explain its field and scope. To this end
and to avoid ambiguity, we start by referring to the SWEBOK (Abran, 2004) to
ascertain where an ontology for OO micro-architectural design knowledge could
fit in, to find that it falls under “software design” (see Figure 1). What is not so
clear, however, is which of the five sub-areas of software design it belongs to
(see Figure 1), although we do find places for two elements of knowledge:
principles within “basic concepts” (“enabling techniques” in the SWEBOK text)
and design patterns in “structure and architecture.” However, the place of such
other concepts as refactorings is not so obvious (it is only briefly touched on in
the maintenance section). As our ontology concentrates on micro-architectures,
after examining the other areas, we consider the best place to be “structure and
architecture,” as this is what the strategies of architectural design are focused
on. Our proposition (see Figure 1) is to include a more generic area within
Figure 1. Context and situation of the ontology of OO micro-architectural
design knowledge according to the SWEBOK
Software Design
Software Engineering Body of Knowledge
Basic
Concepts
Key Issues
in Design
Structure
and
Architecture
Quality Analysis
and Evaluation
Notations
Strategies
Methods
Architectural
Structures-
viewpoints
Architectural
Styles-
patterns
Micro
Architectural
Knowledge
Families and
Frameworks
OO Micro
architectural Design
Knowledge
OO Micro
architectural Design
Knowledge
Function Oriented
Micro architectural
Knowledge
The Object-Oriented Design Knowledge Ontology 11
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
“structure and architecture” called “micro-architectural knowledge” and divide
it into OO and functional micro-architectural knowledge. Our ontology struc-
tures the OO part.
Entities
When we start to describe the elements of the ontology, as we mentioned before,
we find many terms related with essential knowledge gained from experience
with object-oriented micro-architectural design, together with others arousing
confusion as to whether they constitute knowledge or not. In order to clarify the
situation, we have grouped the terms in question into two initial groups:
• Declarative knowledge: Concepts describing what to do with a problem:
Heuristics, patterns, bad smells, best practices, and so forth.
• Operative knowledge: Where there is a body of accumulated knowledge
concerning operations or processes for carrying out changes in software
(i.e., parameterized transformation of a program preserving its functional-
ity (Opdyke, 1992) including such concepts as refactoring.) Here we should
stress that we mean design refactoring, not code refactoring, which is more
common. Although we consider it important to group together all knowl-
edge related to OO micro-architectural design, we are naturally aware that
Figure 2. OO Micro-architectural design knowledge ontology
OO Micro Architectural Design Knowledge
name
intent
also known as
motivation
applicability
consequences
known uses
Refactoring
mechanics
Declarative
collaborations
participants
Operative
sample design
1..*
1..*
is introduced by
0..*
0..*
is composed of
Pattern
structure (or solution)
0..*
0..*
implies the uses of
Rule
recomendation (pre and pos condition)
0..*
0..*
implies the use of
12 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
refactoring could be placed under the maintenance category in the
SWEBOK.
We can thus establish an initial classification of essential experience-based
knowledge of software design with two parts: declarative (what) and operative
(how). The former tells us what to do and the latter how, in both cases according
to experience (see Figure 2, where a UML class diagram is used to express the
ontology).
Considering “declarative knowledge” alone without regard to design patterns,
we have observed that principles, heuristics, bad smells, and so forth, have the
same common structure, there being no substantial difference between them, as
they all have the structure and form of a rule — they posit a condition and offer
a recommendation. It should be stressed that the “recommendation” is not a
solution like that of the pattern. Patterns are more formalized than rules and
pattern descriptions are always broader. They propose solutions to problems,
while rules are recommendations which a design should fulfill. Unlike patterns,
rules are greatly based on using natural language, which can be more ambiguous
(Pescio, 1997).
Lastly, in order to complete the description of the entities, we will concentrate
on their attributes. We based our determination of these on the terms used in
Gamma et al. (1995) to describe a design pattern: name, intent, also known as
motivation, structure, applicability, participants, collaborations, consequences,
implementation, sample code, known uses, and related patterns. It will be
observed that many of these items are common to other elements of knowledge
and these common attributes are located in the top entity (see Figure 2). As to
the other attributes under consideration, the structure attribute is a synonym for
solution in a pattern, while we have created the recommendation attribute for
rules, which would be close to the solution of the pattern (Pescio, 1997) and the
mechanics attribute for refactorings, our choice of name being taken from
Fowler, Beck, Brant, Opdyke, and Roberts’ (2000) refactoring catalogue. The
attributes participants (the classes and/or objects participating in the design
pattern and their responsibilities) and collaborations (how the participants carry
out their responsibilities together) concern declarative knowledge. The sample
design attribute concerns operative knowledge. The implementation attribute is
substituted for mechanics (this is in refactoring, as we are dealing with design
refactoring, not code refactoring). The related patterns attribute has been
generalized and appears in each of the relationships between entities.
In line with our ontology we have developed a unified catalog of rules, which we
see in Chapter X, where in order to improve the detection of rules, these are
named according to their condition.
The Object-Oriented Design Knowledge Ontology 13
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Relationships
We shall now concentrate on the relationships between entities (see Figure 2):
• “To apply a rule implies the use of a pattern.” Often, when we introduce a
rule, we obtain a new design, which needs a pattern. One example of this
situation is the application of the “dependency inversion” rule, a principle
(Martin, 1996) which introduces an abstract class or an interface, which in
turn necessitates a creational pattern (Gamma et al., 1995) to create
instances and associate objects in the new situation. Observe that this does
not always happen (cardinality 0 to n), not all the rules imply the introduction
of a pattern, a clear example of this being when we apply rules which work
only inside a module, for example the “long method” rule, a bad smell
according to Fowler et al. (2000).
• “To apply a pattern implies the use of another pattern.” This relationship
is quite obvious, since it has been featured in catalogs and pattern languages
for some time. An example of this is the map of relationships between
patterns presented in (Gamma et al., 1995). Observe that in this case,
cardinality is from 0 to n (we can see in Gamma et al. (1995) how adapter,
proxy and bridge patterns are isolated).
• “The declarative knowledge is introduced by operative knowledge.” This
relationship expresses that all declarative knowledge (rules and patterns)
is introduced in the design by an element of operative knowledge (a
refactoring); note that cardinality is from 1 to n. This is quite obvious since
it does not make sense for an element of declarative knowledge to exist if
it cannot be introduced.
• The relationship between patterns and refactorings can be observed in an
implicit way by reading some of the refactoring catalogues which concen-
trate on the design level, a good example of this being the Fowler et al.
(2000) catalog. Gamma et al. (1995) state that “design patterns provide the
refactorings with objectives,” and there is a natural relationship between
patterns and refactorings, where the patterns can be the objective and the
refactorings the way of achieving them. In fact, as Fowler et al. (2000) say,
there should be catalogs of refactorings which contemplate all design
patterns. In this way, refactorings, such as “replace type code with state/
strategy” or “form template method,” concentrate on introducing patterns
within a system (again to emphasize that these are design refactorings, not
code refactorings).
• The relationship between rules and refactorings has not been studied as
much as that between patterns and refactorings. Generally, we observe
14 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
that rules are introduced in the design, just like patterns, by means of the
refactorings. And in the light of what has been said previously, it becomes
clearer how refactorings store knowledge about how to introduce elements
in designs in a controlled way. Continuing with the example of the
“dependency inversion” rule we see that in order to resolve the violation of
this rule we insert an abstract entity into the design, which would be carried
out with the refactorings.
• “An element of operative knowledge is composed of others.” Examples of
this composition can be found in refactoring catalogs such as Fowler et al.
(2000) where, for example, the refactoring “extract method” is not com-
posed but it is used by others (cardinality 0 to n).
Lastly, we shall explain why other relationships are not included.
• Relationship: “A pattern implies the use of a rule.” The introduction of a
pattern must not allow a rule to be violated (applying a pattern should never
reduce design quality).
• Relationship: “A rule implies the use of a rule.” In a similar way to the
previous case, the introduction of one rule must not allow another rule to be
violated (applying a rule should never reduce design quality).
• Relationship: “An operative knowledge implies a declarative knowl-
edge.” A refactoring does not know what rule or pattern it uses.
An Empirical Validation
In this section, we will present a description of the process followed to carry out
the empirical validation, which is based on Wohlin et al. (2000); Prechelt and
Unger (1998); Prechelt et al. (1997); Prechelt et al. (2001); Kitchenham,
Pfleeger, Pickard, Jones, Hoaglin, El Eman, et al. (2002); and (Kitchenham,
Dybå, and Jorgensen, 2004). The main intention of this controlled experiment
was to compare the effectiveness and efficiency of “traditional” OO design vs.
the use of OO design knowledge. Moreover, we aimed at analyzing if disposing
of a rules catalog that unifies design knowledge as principles, best practices,
heuristics, and so on, and their relations with patterns has influence on the
effectiveness and efficiency in the improving of the quality of OO micro
architectures.
Based on the GQM (goal question metrics) template, the goal definition of our
experiment can be summarized as shown in Table 1.
The Object-Oriented Design Knowledge Ontology 15
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Planning
The experiment is specific since it is focused on one technique applied to one
domain; the ability to generalize from this specific context is further elaborated
below when discussing threats to the experiment. The experiment addresses a
real problem, which is whether the method presented is more effective and
efficient to be used in OO micro architectural quality improvement.
Eighteen professionals of two companies carried out the experiment. The
selected subjects were professionals having extensive experience in OO design.
We classified the subjects into two groups according to their professional
experience. The subjects were asked to fill a questionnaire out about their
expertise, and taking into consideration the collected responses, we formed two
groups of subjects, trying to have the same number of subjects with good marks
and bad marks in each group. Both groups had a patterns catalog (Gamma et al.,
1995), but only one of them had the rules catalog (see Chapter X). In addition to
this, in a previous 30 minutes session, we explained to this group some notions
about rules and their relationships to patterns and how to apply the rules catalog.
For each subject, we had prepared a folder with the experimental material. Each
folder contained one micro-architectural diagram and a questionnaire for an-
swers.
We had to consider what independent variables or factors were likely to have an
impact on the results. These are OO micro-architecture.
We considered two dependent variables (Thelin, Runeson, Wholin, Olsson, &
Andersson, 2004):
• Effectiveness: Number of defects found/total number of defects. This is
the percentage of the true improvements found by a designer with respect
to the total number of defects.
• Efficiency: Number of defects found/inspection time, where inspection
time is related to the time that subjects spent on inspecting the micro
architecture; it is measured in minutes.
Table 1. Definition of experiment
Analyze The improvement method based on the rules catalog
for the purpose of evaluating
with respect to effectiveness and efficiency
from the point of
view of
software engineers
in the context of software companies in Spain
16 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Hypotheses Formulation
Our purpose was to test two groups of hypotheses, one for each dependent
variable.
Effectiveness hypotheses:
• H0,1.
There is no difference regarding effectiveness of subjects in
detecting the violation of rules using a rules catalog and their relationship
with patterns as compared to subjects without using the rules catalog.
// H1,1
: ¬ H0,1
• H0,2.
There is no difference regarding effectiveness of subjects in detecting
the application of patterns implicated by rules using a rules catalog s and
their relationship with patterns as compared to subjects without using the
rules catalog. // H1,2
: ¬ H0,2
• H0,3.
There is no difference regarding effectiveness of subjects in detecting
the application of patterns not implicated by rules using a rules catalog and
their relationship with patterns as compared to subjects without using the
rules catalog. // H1,3
: ¬ H0,3
Efficiency hypotheses:
• H0,4.
There is no difference regarding efficiency of subjects in detecting the
violation of rules using a rules catalog and their relationship with patterns
as compared to subjects without using the rules catalog. // H1,4
: ¬ H0,4
• H0,5.
There is no difference regarding efficiency of subjects in detecting the
application of patterns implicated by rules using a rules catalog and their
relationship with patterns as compared to subjects without using the rules
catalog. // H1,5
: ¬ H0,5
• H0,6.
There is no difference regarding efficiency of subjects in detecting the
application of patterns not implicated by rules using a rules catalog and their
relationship with patterns as compared to subjects without using the rules
catalog. // H1,6
: ¬ H0,6
Operation
In this section, we will describe the preparation, execution, and data validation
of the experiment. Before the day of the experiment execution, we gave a
seminar to the subjects of the group that would use the rules catalog. In this
The Object-Oriented Design Knowledge Ontology 17
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
seminar, we explained to the subjects how to apply the rules catalog. The
subjects had to manually fulfill their proposed solution, writing down the start and
end time of the activity. We collected the forms filled out by the subjects,
checking if they were complete.
Analysis and Interpretation
Figure 3 shows the averages obtained from the experiment. Outliers have not
been identified. In order to decide how to test the validity of the hypotheses, we
evaluated if the data followed a normal distribution. The result was normal; we
decided to perform a t-Student test. In Table 2 the results obtained by means of
t-Student are shown. The first column represents the t-stat and the second
column shows the t critical two-tail.
We have obtained the following results. Firstly, it was confirmed by the t-Student
test that the group with the rules catalog obtained better results in “efficacy and
efficiency in detection of rules” and “efficacy and efficiency in detection of
patterns implicated by rules.” In the second place, the t-Student test could not
confirm that the group with the rules catalog obtained better results in “efficiency
in detection of patterns not implicated by rules.” However, this group obtained
better averages; we have to highlight that “efficiency in detection of patterns not
implicated by rules” is not influenced by the rules catalog, since these patterns
are not in the catalog because they are not implicated by rules, and the application
of these patterns will result in the detection of design problems more than design
recommendations. Lastly, in a similar way, we could not confirm by using the t-
Student test that the group without the rules catalog obtained better results in
“efficacy in detection of patterns not implicated by rules”; however, again, this
result is not influenced by the rules catalog.
Figure 3. Averages obtained from the experiment
0,64 0,64
0,68
0,26
0,08
0,18
0,12
0,71
0,18
0,04
0,07
0,04
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
Efficacy in Detection of
Rules.
Efficacy in Detection of
Patterns not implicated by
rules.
Efficacy in Detection of
Patterns implicated by
rules.
Efficiency in Detection of
Rules.
Efficiency in Detection of
Patterns not implicated by
rules.
Efficiency in Detection of
Patterns implicated by
rules.
Group with catalog of rules Group without catalog of rules
18 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Threats to Validity
A list of issues that threatens the validity of the empirical study is identified
below.
Conclusion Validity
The results confirmed by means of the t-Student test that there was a significant
difference between the two groups, and that the new approach seems to be more
effective and efficient for carrying out the OO micro architectural quality
improvement. The statistical assumptions of each test were verified, so that the
conclusion validity was fulfilled.
Internal Validity
• Differences among subjects: We formed two groups, and the subjects
were apportioned between these two groups according to their expertise
and skills. For this reason, the subjects were asked to fill out a questionnaire
about their expertise, and taking into account the collected responses, we
formed the two groups of subjects.
• Differences among OOD diagrams: We used only one OOD diagram.
• Precision in the time values: The subjects were responsible for record-
ing the start and finish times of each test, so they could introduce some
imprecision but we think it is not very significant.
• Fatigue effects: The average time for carrying out the experiment was 20
minutes, so fatigue effects were minor.
Table 2. Results obtained by means of t-Student
t stat t Critical two-tail
Efficacy in Detection of Rules. 5.38887 2.26215
Efficacy in Detection of Patterns not implicated by rules. -0.22360 2.20098
Efficacy in Detection of Patterns implicated by rules. 3.36269 2.20098
Efficiency in Detection of Rules. 7.03868 2.26215
Efficiency in Detection of Patterns not implicated by rules 0.22269 2.26215
Efficiency in Detection of Patterns implicated by rules 4.35678 2.17881
The Object-Oriented Design Knowledge Ontology 19
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
• Persistence effects: Persistence effects are not present because the
subjects had never participated in a similar experiment.
• Subject motivation: The subjects were very motivated.
• Other factors: For instance, plagiarism and influence among subjects
were controlled.
External Validity
Two threats to validity have been identified which limit the possibility of applying
any such generalization:
• Subjects: We are aware that more experiments with professionals must be
carried out in order to be able to generalize these results. However, the
subjects could be considered “common” OO designers at least in the
context of Spanish software companies.
• Material used: We believe that the documents used might not be
representative of an industrial problem, so more experiments with larger
diagrams are needed.
Works Related with Empirical Studies
About OO Knowledge
There are few empirical studies and related work about this topic. The recent
interest in empirical studies about patterns, mainly, or any other kind of
knowledge has focused on how these factors impact on the software mainte-
nance process. In this regard, the main and more important studies are Prechelt’s
works that are the best example of empirical investigation about patterns.
The Prechelt et al. (1997) empirical study affirms that depending on the
particular program, change task, and personnel, pattern documentation in a
program may considerably reduce the time required for a program change and
may also help improve the quality of the change; and recommends that design
patterns are always explicitly documented in source code.
In Prechelt and Unger (1998), the experiments showed that carefully document-
ing patterns usage is highly recommendable because it works well during
maintenance and that design patterns can be beneficial even when an alternative
solution appears to be simpler but that unsuitable application can also be harmful
in other situations. The resulting practical advice calls to apply common sense
20 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
when using design patterns instead of using them in a cookbook fashion. Prechelt
et al. (2001) state that it is not always useful to apply design patterns if there are
simpler alternatives; they recommend using common sense to find the exceptions
where a simpler solution should be preferred and even where this common sense
suggests that using a patterns might not be a good idea.
On the other hand, there are very few works related to empirical studies about
designknowledgedifferenttopatterns.Inthissense,wecanhighlight(Deligiannis,
Shepperd, Roumeliotis, & Stamelos, 2003) work, which investigated the effects
of a single design heuristics (god class) on system design documents (with
respect to understanding and maintainability), where the results showed that
design heuristics can affect maintainability, where designs with heuristics are
easier to understand and modify. According to this study, a design initially
structured under heuristics has a higher probability of continuing to evolve in a
resilient and flexible manner; if heuristics are violated, the probability of
maintenance changes leading to poorer designs increases.
Acknowledgments
This research is partially supported by the ENIGMAS (Entorno Inteligente
para la Gestión del Mantenimiento Avanzado del Software) project, sup-
ported by the Department of Education and Science of the Junta de Comunidades
de Castilla - La Mancha (Regional Government of Castile - La Mancha) (PBI-
05-058).
Conclusion
The motivation of the authors of the first catalog of patterns and of the
community that investigates patterns has been to transfer the OODK accumu-
lated during years of experience. Since then, designers have been reading and
using patterns, reaping benefit from this experience. Nevertheless, more knowl-
edge exits apart from patterns. We need to characterize the OO design
knowledge, and we created an OODK ontology for it. An ontology describes
domain knowledge in a generic way and provides agreed understanding of a
domain. As Gruber (1991) said, “I use the term ontology to mean a specification
of a conceptualization. That is, an ontology is a description of the concepts and
relationships that can exist”.
The Object-Oriented Design Knowledge Ontology 21
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
On the other hand, there are few empirical studies related to OO design
knowledge. We presented a description of the process followed to carry out an
empirical validation, which is based on the use of OO design knowledge. The
main objective of this controlled experiment was to compare the effectiveness
and efficiency of a “traditional” OOD process with the new OOD approach.
Eighteen professionals (selected for convenience) of four Spanish companies
(divided in two groups) carried out the experiment. In a previous session of 30
minutes we trained one group in the using of the new approach. For each
participant, we had prepared a folder with one OO class diagram and one
questionnaire, and for the members of the “new approach” group we included the
OOD ontology with the main OOD “knowledge” (rules, patterns, etc.). The
results confirmed by means of t-Student test that there was a significant
difference between the two groups, and that the new approach seems to be more
effective and efficient for carry out the OOD Process.
References
Abran, A. (Ed.). (2004). Guide to the software engineering body of knowl-
edge: SWEBOK. Los Alamos, CA: IEEE CS Press.
Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996). A
system of patterns: Pattern-oriented software architecture. Addison-
Wesley.
Coad, P. (1992). Object-oriented patterns. Communications of the ACM,
35(9), 152-159.
Deligiannis, I., Shepperd, M., Roumeliotis, M., & Stamelos, I. (2003). An
empirical investigation of an object-oriented design heuristic for maintain-
ability. Journal of Systems and Software, 65(2), 127-139.
Fowler, M. (1996). Analysis patterns: Reusable object models. Boston:
Addison-Wesley.
Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (2000). Refactoring:
Improving the design of existing code. Boston: Addison-Wesley Profes-
sional.
Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design patterns.
Reading, MA: Addison-Wesley Professional.
Gruber, T. (1991). The role of a common ontology in achieving sharable,
reusable knowledge bases. Paper presented at the Second International
Conference on Principles of Knowledge Representation and Reasoning,
Cambridge.
22 Garzás & Piattini
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Jurisica, I., Mylopoulos, J., & Yu, E. (1999, October). Using ontologies for
knowledge management: An information systems perspective knowl-
edge: Creation, organization and use. Paper presented at the 62nd
Annual Meeting of the American Society for Information Science (ASIS
99), Washington, DC.
Kitchenham, B. A., Dybå, T., & Jorgensen, M. (2004). Evidence-based
software engineering. Paper presented at the International Conference
on Software Engineering (ICSE), Edinburgh, Scotland, UK.
Kitchenham, B. A., Pfleeger, S. L., Pickard, L., Jones, P., Hoaglin, D., El Eman, K.,
et al. (2002). Preliminary guidelines for empirical research in software
engineering. IEEE Transactions on Software Engineering, 28(8), 721-734.
Martin, R. C. (1996). The dependency inversion principle. C++ Report, 8(6),
61-66.
Opdyke, W. (1992). Refactoring object-oriented frameworks. Thesis, Com-
puter Science, Urbana-Champain, IL.
Pescio, C. (1997). Principles versus patterns. Computer, 30(9), 130-131.
Prechelt, L., & Unger, B. (1998). A series of controlled experiments on
design patterns: Methodology and results. Paper presented at the
Softwaretechnik1998GIConference(Softwaretechnik-Trends),Paderborn.
Prechelt, L., Unger, B., Philippsen, M., & Tichy, W. (1997). Two controlled
experiments assessing the usefulness of design pattern information during
program maintenance. IEEE Transactions on Software Engineering,
28(6), 595-606.
Prechelt, L., Unger, B., Tichy, W., Bössler, P., & Votta, G. (2001). A controlled
experiment in maintenance comparing design patterns to simpler solutions.
IEEE Transactions on Software Engineering, 27(12), 1134-1144.
Rising, L. (1998). The patterns handbook: Techniques, strategies, and
applications. Cambridge: Cambridge University Press.
Thelin, T., Runeson, P., Wholin, C., Olsson, T., & Andersson, C. (2004).
Evaluation of usage based reading conclusions after three experiments.
Empirical Software Engineering, 9(1-2), 77-110.
Wendorff, P. (2001). Assessment of design patterns during software
reengineering: Lessons learned from a large commercial project.
Paper presented at the Proceedings of the 5th
European Conference on
Software Maintenance and Reeingineering (CSMR), Lisbon, Portugal.
Wohlin, C., Runeson, P., Höst, M., Ohlson, M., Regnell, B., & Wesslen, A.
(2000). Experimentation in software engineering: An introduction.
Kluwer Academic Publishers.
Using Linguistic Patterns to Model Interactions 23
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
ChapterIII
UsingLinguistic
Patterns to Model
Interactions
Isabel Díaz, Central University of Venezuela, Venezuela
Oscar Pastor, Technical University of Valencia, Spain
Lidia Moreno, Technical University of Valencia, Spain
Alfredo Matteo, Central University of Venezuela, Venezuela
Abstract
The dynamic behavior of a system is elicited, specified, and analyzed by
means of interaction modelling. This activity is important for object-
oriented software development because it provides the information that is
required to construct the system conceptual model. Several interaction
modelling techniques have been proposed. However, this activity continues
to be a complex and tedious task for the modellers. These problems arise
from the intrinsic difficulties of interaction modelling and the lack of
effective techniques and tools to support to the modellers. In this chapter,
heuristic-oriented techniques and linguistics-oriented techniques proposed
by several authors to model interactions are analyzed. In addition, a
24 Díaz, Pastor, Moreno, & Matteo
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
framework to facilitate and to improve the interaction modelling is described.
This framework was conceived to be integrated into automatic software
production environments. It uses linguistic patterns to recognize interactions
from use case models. The patterns were validated with expert modellers.
The validation process carried out and the main results are also presented.
Introduction
Dynamic models fulfil an important role in the development of object-oriented
software systems. These describe the behavior of a system in terms of: (1) the
state change of an object, which is due to an event or the execution of an
operation (intraobject dynamic perspective); and (2) how the objects should
interact to provide the system with a determined behavior (inter-object dynamic
perspective). This chapter is based on the study of the interobject dynamic
perspective and, in particular, on the construction process of the object interac-
tion models in order to describe the behavior of a system.
The modelling of interactions is one of the most frequently overlooked practices
in software development. While the structural model is considered to be
fundamental for the analysis and design of the systems, the dynamic model is
considered to be optional (Larman, 2004; Rosenberg & Scott, 1999). Neverthe-
less, both models contribute two complementary views of the system design that,
taken separately, would be insufficient. Our experience, which coincides with
that reported by other authors, has led us to believe that this problem may have
originated in the high level of difficulty of interaction modelling, especially for
inexperienced modellers (Larman, 2004; Rosenberg & Scott, 1999; Song, 2001).
On the one hand, modelling is an inherently complex activity that, in any case,
depends on the experience and the domain knowledge of the modeller. On the
other hand, the difficulty of constructing interaction models is also determined by
other circumstances that are explained below.
The result of a thorough review of the literature has indicated that software
development approaches that describe a technique for interaction modelling are
scarce. The aids offered to the modeller to facilitate the task of identifying and
specifying interactions are very few when compared to the extensive descrip-
tions that are made of the modelling language. The nature of the diagrams that
are used to graphically represent the interaction models, generally sequence
diagrams (SDs) or message sequence charts (MSCs), also constitutes an
obstacle for modelling (ITU, 2000; OMG, 2003). The amount of time that must
be spent on elaborating and troubleshooting these diagrams makes them tedious
activities, which many modellers attempt to avoid. Model editing tools available
Using Linguistic Patterns to Model Interactions 25
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
on the market, such as Rational or Visio, are not very flexible and do not offer
mechanisms that adapt to specific graphical needs. The complexity of interaction
modelling is even greater when the difficulty of maintaining consistency between
this model and other structural and dynamic models of the system is added.
The purpose of this chapter is to establish the basis that a generic framework
created to facilitate interaction modelling and to promote this activity during
system development must have. The strengths and weaknesses of the interaction
modelling techniques that are commonly applied are analyzed in order to
determine the requirements that this framework must fulfil. Thus, the framework
is defined in the context of the contributions that other approaches have made
to interaction modelling.
The goal of this framework (hereafter called metamorphosis) is to provide
support to modellers in the interaction model construction during the first stages
of the development of a system. However, its use can be extended to the
complete life cycle of the software (OMG, 2003; Van Lamsweer, 2000).
Metamorphosis assumes that the system behavior specification is expressed
through use case models (Nuseibeh & Easterbrook, 2000; OMG, 2003). A use
case is a document written in natural language that describes part of the system
functionality from the perspective of its users (Jacobson, Christerson, Jonsson,
& Övergaard, 1992). The analysis or interpretation of the use cases shows
how the system components exchange information so that the system has the
behavior specified by the analysts (OMG, 2003; Van Lamsweer, 2000). The
result of this analysis is represented using interaction models.
In metamorphosis, the analysis process lies in the automatic generation of the
interaction diagrams from the use cases in order to guarantee the following: (1)
consistency of the interaction model itself, as well as its consistency with the
corresponding use case model; (2) ease of use promoting the automatic
generation of the interaction diagrams, so that the modeller can spend more time
on more important tasks such as the resolution of conflicts originated by the
ambiguity inherent in the use of natural language, the incorporation of supple-
mentary information into the interaction diagrams (restrictions, comments, etc.),
or the validation of the model obtained; (3) traceability to establish links that can
be documented, controlled, and maintained, so that the modeller can determine
the part of the use case text from which an interaction was generated and vice-
versa; and (4) representation richness to incorporate relevant semantic
information beyond the basic elements of an interaction (i.e., synchronous/
asynchronous messages, concurrence specification, repetition, or conditioning of
interactions, parameter identification, consultations/updating, etc.).
The metamorphosis framework must reconcile contributions from both compu-
tational linguistics and software engineering to be able to fulfil the requirements
described above. Computational linguistics provides metamorphosis with the
26 Díaz, Pastor, Moreno, & Matteo
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
natural language processing techniques and tools to recognize the elements
participating in an interaction model from the use case text. Software engineer-
ing provides metamorphosis with a system development orientation that is
focused on the construction and the successive transformation of these models.
Thus, text analysis of the use cases is defined at a high level of abstraction,
making it independent from the domain of the system under development and
from specific implementation considerations. In addition, it is convenient to use
patterns to describe the analysis solutions. A pattern can specify the generic
solution to a recurrent problem of use case analysis. The patterns are suitable
resources for storing the knowledge about these solutions so that it can be reused,
shared and communicated whenever this knowledge is necessary (Gamma,
Helm, Johnson, & Vlissides, 1992).
This chapter has been structured in five sections. The next section presents an
overall view of the most representative approaches about interaction modelling
as well as their advantages and disadvantages. The second section explains how
metamorphosis interprets the interaction concept and describes the properties of
the interaction model. The third section explains the process of extracting
information from the use cases, and the strategy followed to transform them into
interactions. It also presents an example of the application of the transformation
framework. The fourth section describes an experiment performed to validate
the transformation patterns as well as some of the results obtained. The last
section presents the lessons learned and future directions.
Interaction Modelling Techniques:
An Overview
In general, approaches that propose interaction modelling as a resource to develop
systems emphasize the description of the syntax and semantics of its elements;
however, they barely explain how this model can be constructed. Some approaches
have attempted to answer this question by formulating procedures to aid modellers
in their work. In this study, the procedures set forth by these approaches will be
referred to by the generic name of interaction modelling techniques regardless of
the scope, formality or level of complexity (Rumbaugh, 1995; Wieringa, 1998).
Interaction modelling techniques can be characterized as being based on: (1) a
heuristic application, using a step-by-step guide in the construction of interaction
models (heuristic-oriented techniques); or (2) the use of linguistic information, as
a way to identify and to specify interactions (linguistics-oriented techniques). The
purpose of this type of classification is to simplify the analysis and to determine the
strengths and weaknesses of these techniques.
Using Linguistic Patterns to Model Interactions 27
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Heuristic-Oriented Techniques
One of the pioneers in the use of interaction models to describe the behavior of
a system was Jacobson, whose object-oriented software engineering (OOSE)
method introduces object interaction diagrams (Jacobson et al., 1992). These
diagrams are prepared for each use case after preparing their robustness
diagrams. A robustness diagram shows the entity classes, interface (or bound-
ary) classes, and control classes of each use case, and the possible dynamic
relations between these object classes, including the participation of the actors.
To construct the object interaction diagrams, the OOSE method suggests going
through the following steps: (1) partitioning the use case text, and placing these
fragments on the left side of the diagram; (2) placing the use case actors; (3)
adding the interface and control objects identified in the robustness diagram; (4)
adding the entity objects of the use case identified in the robustness diagram; and,
(5) identifying the messages exchanged by the classes for each piece of text of
the use case (each piece of text is located on the left side of the diagram, near
the identified messages). The OOSE method transfers the complexity of
elaborating interaction diagrams to the robustness diagrams. However, the
method does not offer further help to construct the robustness and interaction
diagrams; therefore, the identification of the interactions (step 5) remains
unresolved. Furthermore, the interaction diagrams are troublesome to prepare
due to the use of different types of classes and the incorporation of the pieces
of text of the use cases.
Rosenberg and Scott basically follow the same procedure described by the
OOSE method for modelling interactions (Rosenberg & Scott, 1999). In an
attempt to facilitate the recognition of messages, they suggest the use of class-
responsibility-collaboration (CRC) cards (Wirfs-Brock, Wilkerson, & Wiener,
1990). This strategy helps in determining the operations of a class, but it is not
performed in the context of message exchange. Thus, the CRC cards cannot
guarantee the identification of all the necessary operations for the system to
adopt certain behavior.
Another process that proposes the construction of SD as part of the analysis and
design activity of the system use cases is the rational unified process (RUP)
(Jacobson, Booch, & Rumbaugh, 1999). The procedure set forth in the RUP
offers no substantial differences with respect to the techniques described
previously. The Ambler technique formulated to facilitate SD construction is
similar to the RUP technique (Ambler, 2004).
A similar process is carried out during the requirements analysis phase of the OO
method (object-oriented method) (Insfrán, Pastor & Wieringa, 2002; Pastor,
Gómez, Insfrán, & Pelechano, 2001). The main activity of this phase is the
elaboration of SD, which is based on a characterization of the information
28 Díaz, Pastor, Moreno, & Matteo
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
contained in the system use cases. The paths of the use cases describe actor/
system communication actions (actions performed by the actor or the system to
exchange information) or system response actions (system actions that are
potentially capable of changing the system state). The SD of the OO method uses
the Unified Modelling Language (UML) and distinguishes the types of object
classes introduced by Jacobson: entity, boundary and control classes (Jacobson
et al., 1992; Rosenberg & Scott, 1999). The steps that the modeller must perform
are the following: (1) to prepare a SD for each of the use case paths (one for the
basic path and one for each alternate path); (2) the use case actors participate
as classes in the SD; (3) each actor/system communication action of the use case
is represented through one or more messages between an actor class and a
boundary class (which is usually called system); (4) each use case action of the
system response type is represented in the SD by one or more messages between
the boundary class and the entity classes, or by one or more messages between
entity classes. As in the above-mentioned approaches, the OO method provides
no further help to recognize the entity classes or the messages that they
exchange.
The technique proposed by Larman uses system sequence diagrams to
represent the use case scenarios (Larman, 2004). These diagrams show the
interaction between the actor and a generic entity called system. This entity acts
as a black box that hides the system internal structure. Each identified interaction
must later be analyzed using patterns. A pattern explains in detail how this
interaction can be broken down into one or more messages between system
objects. The SD uses the UML and does not distinguish the types of objects in
an explicit way. Larman’s idea based on patterns is novel and seems effective.
Nevertheless, it lacks both a systematic process to be able to apply conveniently
these patterns and a catalog containing the patterns corresponding to the most
representative interactions.
Song sets forth the application of the ten-step heuristic on sequence diagram
development (Song, 2001). The application of this technique requires the prior
preparation of the system object model and the use case model (diagrams and
textual specification). It uses the UML to represent the SD in which the types
of objects (entity, control, and boundary) are distinguished. The steps of this
technique can be summarized as follows: (1) the message initiating the flow of
events is sent by the actor to the system; (2) a primary boundary object and a
primary control object are defined for each use case; if needed, secondary
objects (boundary or control) are created; (3) a secondary control object is
defined for each use case that is included or extended; (4) the problem-solving
operations (creation/destruction, association forming, or attribute modification)
are identified in the use case; and (5) each message is named and supplied with
optional parameters. To identify the types of problem-solving operations, Song
suggests highlighting the verbs in the use case text and selecting those that
Using Linguistic Patterns to Model Interactions 29
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
indicate actions that were formulated to solve the problem. These verbs can be
considered as names of potential problem-solving operations. This technique can
be considered a step forward with respect to other techniques, because it is more
thorough in identifying instances and in recognizing messages (through the
problem-solving operations). However, Song’s technique leaves two questions
unresolved: how to identify the sending and receiving classes of these messages
and how to deduce an interaction composed by more than one message from a
single verb.
Hilsbos and Song have improved their initial proposal with the tabular analysis
method (TAM) (Hilsbos & Song, 2004). The introduction of this method attempts
to answer the two preceding questions. The TAM lies in applying heuristics to
complete a seven-column table before constructing the SD of each use case.
Each column respectively indicates the number of each step of the use case, the
action described in that step, the name of the message, its parameters, its
restrictions, its sender, and its receiver. Initially, messages that are always sent
and received by the actor or the system are obtained from the table. Then, this
information is refined by breaking down each of the messages in terms of other
messages that have been established between the primary control object and
entity objects, or between two or more entity objects. To support the task of
identifying these messages, the guidelines that recognise the problem-solving
operations presented in Song should be followed (Song, 2001). The TAM
facilitates the organization of the information obtained from the use cases.
However, it supplies no further help for the modeller to recognize this informa-
tion. The graphic representation of the SD can be carried out with the information
contained in the table.
Linguistics-Oriented Techniques
In recent decades, many approaches have relied on natural language processing
techniques to facilitate the development of software systems (Boyd, 1999; Chen,
1976; Métais, 2002; Rumbaugh, Blaha, Premerlani, Eddy, & Lorensen, 1991). In
this section, we refer to those approaches that are based on the linguistic
properties of a text to obtain information and that allow the automatic construc-
tion of models (Burg & van de Riet, 1996; Juristo, Moreno, & López, 2000;
Overmyer, Lavoie & Rambow, 2001). More specifically, we study the ap-
proaches that allow dynamic models to be obtained from system behavioral
specifications written in unrestricted natural language (Burg & van de Riet,
1995; Flield, Kop, Mayerthaler, Mayr, & Winkler, 2000). To facilitate this
review, we distinguish two groups. The first group includes first-generation
proposals that do not set forth a procedure to directly derive the system interaction
30 Díaz, Pastor, Moreno, & Matteo
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
model. The proposals representing this group are: Color-X (Burg & van de Riet,
1995; Dehne, Steuten, & van de Riet, 2001), NIBA (Kop & Mayr, 2002), and the
behavior model presented in Juristo et al. (2000). These works are very interesting
from the perspective of natural language processing; however, they are not studied
in this chapter, as these approaches do not allow the direct deduction of complete
interaction models. They use intermediate models to give information to the
modellers so that they can later obtain the interaction models.
The second group of linguistic-oriented techniques includes second-generation
proposals. They have been especially created to deduce interactions from use cases,
such as the works of Feijs and Li, which can be considered referential for our
research (Feijs, 2000; Li, 2000). Feijs establishes correspondences between some
types of sentences written in natural language and MSC (ITU, 2000). A use case
is considered as a sequence of sentences, each of which is associated to a
semantically equivalent type of MSC. A sentence has a specific syntactic structure
that contributes information about active and passive objects, values, instance
identities, properties (attributes), methods, and events. This information has a
counterpart in its corresponding MSC.
Sentences are classified as information, action, or state. They describe information
exchange, object handling, or state, respectively. A context-free grammar is
defined, and a set of correspondence rules is proposed between the syntactic
components of each sentence and the elements of an MSC. It assumes the
preexistence of a domain object model to ensure the terminological consistency of
the use cases. The proposal does not address the identification of message
arguments, nor does it study conditional sentences, iterations, or relationships
between use cases (extension and inclusion) and their respective equivalents in an
MSC.
Li also sets forth a semiautomatic process for deriving SD from the textual
descriptions of the use cases. The text of the use case is normalized. The description
can only use sentences with a single subject and a single predicate or action. The
translation partially generates a set of instances and some of the messages that are
exchanged. The SD must then be completed manually by the analyst. This proposal
takes into account conditional sentences and iterations, but it does not address the
relationships between use cases (extension and inclusion).
An Outline of Interaction
Modelling Techniques
Each of the techniques studied reveals the trends followed in areas such as software
engineering, which serves as the framework for heuristic-oriented techniques.
Using Linguistic Patterns to Model Interactions 31
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Therefore, the predominant aspect of the heuristic-oriented techniques is the use
of models that are especially created to both specify and analyze system dynamic
behavior. The information used to generate the interaction diagrams is obtained
from an initial model that describes the system domain. The semantic richness
of the modelling language acquires importance. Thus, most heuristic-oriented
techniques coincide in the following:
1. To differentiate the instances that participate in these diagrams, using
Jacobson’s classification on control, boundary, and entity objects (Jacobson
et al., 1992).
2. To establish close semantic relationships between some of the model
abstractions from which information is extracted and the abstractions of the
obtained model (i.e., the actor in the use case model is an element in the
interaction model having the same meaning).
3. To derive the interactions using information from the use case model. A use
case is considered as an analysis unit to derive interaction diagrams.
4. To use the object model to facilitate the identification of the instances that
participate in a SD and to ensure the consistency of the models.
5. To establish structural correspondences between the elements that de-
scribe both the use case model and the interaction model (i.e., a control
object is created for each use case included or extended).
6. To set up heuristics or rules to obtain the interaction model. The application
of these rules depends exclusively on the modeller’s criterion, personal
experience, and domain knowledge.
7. To facilitate the graphical representation of the interaction models with the
aid of tools. The tools do not support the automatic generation of these
representations or the handling of the model consistency.
Computational linguistics has served as the basis for linguistics-oriented tech-
niques. In particular, the second-generation outline of these techniques has been
adjusted to the most important characteristics of the heuristic-oriented tech-
niques. Thus, second-generation linguistics-oriented techniques synthesize the
properties of all the other techniques, overcoming many of their weaknesses.
They have adopted a model-oriented approach, both to describe the information
extraction source and the interaction representation. Syntactic analysis has been
considered as a fundamental resource for generating the interaction model. The
main characteristics of second-generation linguistics-oriented techniques are
thefollowing:
32 Díaz, Pastor, Moreno, & Matteo
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
1. The use case model is used to extract information. This model is widely
known and has been developed to specify system behaviors.
2. The dynamic model generated is based on the basic primitives for interac-
tion representation (instances, messages, and parameters).
3. In addition to the information provided by the syntactic analysis of the use
case sentences, the interaction deduction process uses the system struc-
tural information.
4. The second-generation linguistics-oriented techniques presume the support
of a tool that allows the (semi)automatic generation of the interaction
diagrams. The modeller’s participation is then limited to completing the
generated diagrams and validating them.
New Alternatives
In spite of the contributions of the interaction modelling techniques, they have some
weaknesses that should be eliminated in order to improve this activity. The creation
of the metamorphosis framework attempts to fulfil this goal. Therefore, the
metamorphosis definition must: (1) overcome the limitations of the interaction
modelling techniques that have been proposed until now; (2) take into account the
strengths that these techniques have demonstrated; and (3) utilize the current
proposals in software engineering and computational linguistics to enrich the
interaction modelling techniques. These three factors have contributed to determi-
nate an outline for the metamorphosis framework. This outline has the following
characteristics.
Model-centered transformation architecture. Until now, use case information
extraction and interaction diagram generation have been described through a set of
rules that apply the techniques. The information source and the form that it takes
later on are not treated as models when specifying the deduction process. This
produces some inconveniences that affect the efficiency of the systems that
provide support to these techniques; this not only makes maintenance difficult, but
it also makes the code evolution and generation tasks more complex. Great interest
in model-driven approaches that are based on the automatic transformation of
models has recently emerged. In this software development paradigm, the models
and their transformations are specified at a high abstraction level, separating the
system structure and behavior from its implementation and supporting evolution,
refinement, and code generation (Kleppe, Warmer, & Bast, 2003). Following this
approach, metamorphosis proposes the automatic generation of a target model (the
interaction model) from a source model (the use case model). The model definition
is abstract at the metamodel level so that the transformation does not depend on the
technological aspects nor on a specific domain.
Using Linguistic Patterns to Model Interactions 33
Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written
permission of Idea Group Inc. is prohibited.
Linguistic orientation. Metamorphosis uses natural language processing to
support information extraction from the text of a use case (Boyd, 1999).
Currently, natural language processing is a mature area of computer science that
provides techniques and tools to perform this task efficiently (Métais, 2002;
Mich, Franch, & Inverardi, 2004).
Based on patterns. Metamorphosis attempts to capture the transformation
knowledge by means of patterns (Gamma et al., 1992). These patterns are going
to describe how each sentence of a use case is transformed into interactions. In
metamorphosis, a pattern is a reusable and generic specification that can be
implemented using any programming language and integrated into several
automatic software production environments.
Role-driven. Metamorphosis provides special meaning to the modelling ele-
ments by means of role definition. The roles contribute to the recognition of these
elements at model-time and facilitate the understanding of the patterns (France,
Kim, Ghosh, & Song, 2004; Gildea & Jurafsky, 2002).
Flexible normalization. The normalization process requires use cases to be
written using only a previously known set of syntactic structures. Imposing such
a restriction facilitates the information extraction process and allows the
elimination of the potential ambiguities generated by the use of natural language
(Ben-Achour, Rolland, Maiden, & Souveyet, 1999; Berry & Kamsties, 2004;
Rolland & Ben-Achour, 1998). Nevertheless, the advantages achieved by
imposing this normalization on the language reduce the expressive capability of
the system specification. Therefore, establishing restrictions could only be
justified as a means to ensure the quality of the use cases, in terms of their
completeness and correctness. Furthermore, this quality could be ensured
through using other resources without overloading the modeller with this
responsibility. Metamorphosis proposes to make the normalization process of
use cases flexible by means of: (a) a tool guiding the modeller in the use case
editing process; or (b) automatically identifying text ambiguities (structural or
semantic) and resolving them (i.e., transforming it; marking it with information
to clarify its semantics; classifying doubtful text; etc.).
UML compliant. Metamorphosis uses UML because this language allows us to
specify models and transformations that can be comprehended and applied by
many modellers and tools. The UML semantics and syntax is currently a de-facto
standard due to its widespread use (OMG, 2003). Furthermore, the UML 2.0
version thoroughly describes the interaction concept taking into account the
necessary semantics and notation to represent both the SD and the MSC.
Interactions in the UML 2.0 version can be represented graphically using:
sequence diagrams (that synthesize the properties of the MSCs), communica-
tion diagrams, or interaction overview diagrams (OMG, 2003). For simplicity,
in this chapter, we use the generic terms sequence or interaction diagram to
refer to the graphic representation of the interactions.
Another Random Scribd Document
with Unrelated Content
career on the turf. His racing stud was notable, and rarely a year
passed without adding to its reputation. He also amused himself
with politics and society. Devoted to Ishbel for years before he could
marry her, he was now as completely happy as a man may be whose
wife is giving a large part of her energies to a cause of which he
fastidiously disapproves. Broadminded, he was quite willing that all
women outside of his particular circle should vote, but wished that
his ancestors had settled the question and spared his generation.
Astute in all things, however, he not only gave his wife her head up
to a certain point, but of late had done what he could to help rush
the thing through and have done with it. Ishbel, like Julia, was
pledged to ignore the detested subject during this brief vacation.
“Jolly place, Munich,” he observed. “We always come here in
August for the Wagnerfeste. You see all Europe as well as hear good
music in comfort, which is more than you could ever say of Baireuth.
We’ve never been here in winter before. Have you read up a bit?
There ought to be good winter sports in the mountains.”
“Rather. I don’t fancy Mr. Tay was here an hour before he
discovered there was tobogganing (rodelling) and skiing at
Partenkirchen. He’s talked of little else.”
“Good! Then we’ll be really happy for a week.”
Meanwhile Ishbel was gently extracting a declaration of Tay’s
intentions toward Julia by the diplomatic method of assuming all.
“It is too dreadful that you will take Julia from us,” she said
plaintively. “Couldn’t you live in London?”
“Not yet.” Tay turned upon her a face of almost boyish delight.
“But if she’ll really have me, we could come over every summer. Do
you think she will?”
“In the end, of course. I’ve known Julia for sixteen years, and
waited for her to fall in love. She never does anything by halves. But
she may think she can’t leave England yet.”
“I wish these women didn’t take themselves so seriously,” said
Tay, viciously. “One would think the fate of England depended on
them.”
Ishbel laughed. “How like Eric! But we are used to the sixteenth
century masculine attitude. It wouldn’t matter so much about me,
except that every one of us helps to swell the total, but Julia is a
great leader, with a wonderful power of attracting attention, making
recruits, and inspiring her followers. We couldn’t spare her if the
fight was to go on, but if it is won this year—well, I have told her to
go and leave the rest to the other women in command.”
“Oh, you have! Bully for you! What did she say?”
“She wouldn’t commit herself. If I were you, I’d simply marry
her.”
“So I shall, if I’m convinced she really cares for me.”
“You don’t doubt it?”
“I don’t know. She’s a puzzle to me. Sometimes I think she’s the
most natural being on earth, and at others—well—the so-called
complex women aren’t in it.”
“She’s both, but none the less interesting.”
“Oh, she’s interesting, all right. But she’s become such an adept
at bluffing herself that I doubt if she always knows just where she’s
at. Just now she’s bluffed—or hypnotized?—herself into thinking
she’s interested in me. But I have an idea she could switch off in the
opposite direction as easily.”
“Julia is a bit odd,” admitted Ishbel. “Especially since she came
back from the East. Even before she went, she wasn’t much like
anybody else, owing, no doubt, to that strange old mother of hers;
but au fond she’s the most loyal and sincere of mortals. And it takes
matrimony—a love-match—to clear a woman’s brain of cobwebs.
Marry Julia and take her to the young world, and I’ll venture to say
she’ll forget all she learned in the East, and a good part of her
inheritance. Then she’ll be the most charming of women.”
“That’s the way I talk to myself when I’m not in the dumps. But
do you really want her to marry an American? It would be more like
you to want to keep her over here.”
“I did once plot and scheme to make her marry a very dear
friend of us all, Lord Haverfield—Nigel Herbert—you must have read
his books.”
“Ah!”
“That was rather imprudent of me. But it’s all over long ago. Julia
never cared for him, and I have always said that when she did care
for any man, I’d turn match-maker in earnest and do all I could to
help him marry her—that is, if I liked him—and we’re all quite in love
with you.” She flashed the sweetness of her charming countenance
on him, and he thought her almost as beautiful as Julia. “I want her
to be happy, for she was once terribly unhappy. Her experience was
truly awful —”
“I never want to think of it,” said Tay, hastily. “I refuse to
remember that she has ever been married. Look at here—will you
promise to be on my side if she goes off on one of her tangents?”
“I will!” and she gave his hand a little shake. She longed to tell
him that France might die any minute, but she had once more given
her word to Bridgit, and could only hope that France would take
himself off before Tay left England. “But if the worst comes to the
worst, I’ll get round it somehow,” she thought.
A moment later a rapid change of partners was effected, Tay
threw his arm lightly round Julia’s waist, and they waltzed down the
lake to the amazement of the less agile Germans.
“Suppose you look up,” said Tay. “If you’re blushing because I
have my arm round you for the first time, I’d like to see it.”
Julia laughed and threw back her head. She was blushing, and
her eyes sparkled. “I’ll admit I never felt so happy in my life.”
“Are you as much in love with me as you were two days ago?” he
asked dryly.
“Oh—rather more, I think.”
“If you like the sensation of my arm round you at a temperature
of ten above zero, in full view of all Munich, can you imagine the
ineffable happiness of being kissed by me in the vicinity of one of
those tiled stoves with the door shut?”
“Then if all these people should suddenly disappear, you wouldn’t
care to kiss me in the midst of this enchanted wood?”
“I’d kiss you wherever I got a chance, and what’s more I’ll do it.
So prepare yourself.”
“Your promise!”
“Promise nothing. I absolve myself right here. And you talk
Suffrage if you can!”
“Alas, I don’t want to. But I shan’t let you make love to me.”
“Oh, yes, you will,—when and where I please.”
Julia looked a little frightened. “Oh, no—we mustn’t go that
far —”
“You merely want to flirt and make me miserable? Well, I’ve had
just as much of that as I propose to stand. You’re laying up a
frightful retribution, my lady.” He tightened his clasp and drew her as
close as the skates would permit. “Be consistent,” he whispered.
“You are eighteen. You remember nothing. We are really engaged,
you know. You are mine this week. We have four days more. Put
that imagination of yours to some good use. Believe that we are to
be married this day fortnight.”
“If I go too far—you would never forgive me.”
He laughed grimly. “If you go that far, you’ll go farther. Of course
I understand you. It’s a proof of the adorable innocence you have
managed to preserve that you don’t know what playing with fire
means to the man. You propose to abandon yourself discreetly, get a
certain excitement out of words and coquetry while we’re here safely
chaperoned, and then throw me down hard in the cause of duty
when we return to London. Well, that’s not my program. Now, we’ll
say no more about it.”
They climbed up the interior of the great statue Bavaria, in the
afternoon, to gaze at the tumbled peaks of the Alps glittering
through the haze that promised fine weather. Then the women
rested for the opera of the evening, and Tay and Dark smoked in
one of the cafés, talked horse and business, and, incidentally, drifted
into a friendship that was to lead to strange results. Dark had
influential friends in the City and promised Tay his immediate
assistance in bringing his prospective partners to terms. Tay, who
liked sport as well as most American men, although he had little
time to devote to it, forgot that he was in love while “swapping”
stories of the race-track. Both, secretly despising the other’s
nationality, discovered that when men are men they are pretty much
the same the world over. They cemented the bond by cursing
Suffrage with all the epithets, profane, picturesque, savage, and
humorous, in their respective vocabularies, and left the café arm in
arm, feeling that they had talked woman back into her proper
sphere and that all was well with the world.
X
Those were the last days of the Munich Opera-house in all its
glory. Mottl, prince of conductors, was alive; Fay, Preuse-Matzenauer,
Bosetti, Bender, Feinhals, the incomparable Fassbender, sang every
week, and, now and again, Knote and Morena. To-day death and
disaster have overtaken that great company, and few are left to
make the pilgrimage to Munich worth while.
“Die Walküre” was given on Monday night, and included nearly all
of the staff. The hotel portier had reserved seats for the English
party in the first row of the balkon, and they had a full view of a
typical Wagnerian audience. In these days, owing no doubt to the
American residents, the entire auditorium, as well as the balkon and
loges, was well dressed. No more did the hausfrau come in her
street costume of serviceable stuff turned in at the neck with a bit of
tulle, but made shift to wear a demitoilette of sorts, and light in color
even if of mean material. The fashionable Müncheners outdressed
the Americans and occupied the first row of the balkon and the
loges. Even the royalties presented a far better appearance than in
the old days, and the large number of officers present alone would
have given the house a brilliant appearance. The upper tiers were
picturesque with the girl students in their Secessionist costumes and
bazaar heads, the men with their untidy hair and flowing ties. But
the crowning grace of the “Hof” at all times is that no one is allowed
to enter after the overture begins, nor dares to speak until the
curtain goes down.
Julia had carefully arrayed herself in her most becoming gown, a
white Liberty satin under pale green chiffon, so casual in effect that
it looked as if held together by the sheaf of lilies-of-the-valley on the
corsage. Ishbel was resplendent in black velvet and English pink;
and the party was the cynosure of the audience below, standing with
its back to the stage and frankly inspecting the balkon until the last
bell rang and the lights went out.
The tenor was wrenching the sword from the tree, and Fay was
standing with her famous arms rigidly aloft, in one of the prescribed
Wagnerian attitudes, when Tay saw Julia move restlessly, sit forward
with a frown, and then sink back with an expression of sadness so
profound that he longed to ask what ailed her now, but had no
desire to be hissed down or put out by the fat doorkeeper. When
they were in the buffet, however, during the first pause, and he had
walked up two trains and nearly lost his cufflinks in a determined
effort to procure ices, and they were alone at a table in a corner, he
referred to the incident, if only to prove that no performance, no
matter how great, could divert his attention from her.
“Oh, I was only thinking,” said Julia. “I wonder where the Darks
are?”
“Engaged in a wrestling match, probably. Aren’t you always
thinking? What struck you so suddenly in the middle of that alleged
dramatic scene where the fat man, purple in the face, was struggling
to get a tin sword out of a paper tree and trying to sing at the same
time? Never was so excited in my life.”
Julia laughed. “I was sure you were not musical.”
“You insult San Francisco. We are the most musical people in
America. The very newsboys whistle the opera tunes. But I like to
see a decent sense of the proprieties observed. Those two could
have said all they had to say in five minutes. Set to music, it should
take about fifteen. However— Tell me what struck you all of a heap.”
“Oh—well—I—”
“Shoot!”
“What?”
“More slang. Fire away.”
“Do you expect to know all my thoughts?”
“I don’t, but I’d like to.”
“I wonder! However—I don’t mind telling you. It occurred to me
rather forcibly how much simpler women’s problems were in those
days. Two young people, isolated from the world, meet and
spontaneously fall in love. They are creatures of instinct, and
ignorant of any law except Might. A sleeping potion in the savage
husband’s nightly horn settles that question, and they run away into
the forest and are happy—would be happy forever more if let alone.
But in these complicated days—all our obstacles are inside of us!
Any one can find courage to defy the primitive and obvious —”
“Plenty of primitive people right in the midst of civilization,”
interposed Tay, grimly.
“Yes, I know, and in your country divorce is easy. But for the
highly civilized, life, even with divorce, is anything but easy. Women
question that condition called happiness when it would appear to
offer itself, examine it on all sides. They know men too well—life—
above all, themselves. Or they have assumed impersonal duties and
responsibilities. Or their brains have become so complex that love
alone cannot satisfy. They would have love plus far more! If the
choice must be made, they dare not cast for love, in their fear of
disaster. Nothing is so dishonest as the so-called psychological novel,
which leaves two thinking moderns in each other’s arms at the end
of a forced situation, with their natures unchanged, all their
problems—their inner problems—unsolved. They never can be
solved by love, marriage, children, the good old way. The sort for
whom all problems can be treated by the conventional recipe are not
worth writing about. But it is a terrible proposition; for these highly
civilized women have the automatic desires of their sex for love and
happiness—intensified by imagination! But—they know that a
greater need still is to fill their lives and use their brains.”
Tay had turned pale. “The modern man, unless he is an ass,
gives his wife her head.”
“That is beside the question. The real trouble doesn’t sound
particularly attractive when put into plain English: it is the raising of
the ego to the nth power that makes these women want to stand
alone, resent the idea of finding completion in a man.”
“Then let us pray that they will all die old maids, and their race
die with them.”
“No hope! Children of the most commonplace parents are the
products of their times. Heredity is modified from generation to
generation. Otherwise, we should all be Siegmunds and Sieglindes.
Their little brains are impregnated by forces seen and unseen. Hadji
Sadrä would explain it by the theory of reincarnation, or by planetary
conditions at birth—the only reasonable explanation of Shakespeare,
by the way, if he wasn’t Bacon. But although, no doubt, many of the
great do return to complete their work, there are not enough to go
round. And there is a simpler explanation. In these vibrating days
the very air is flashing and humming with secrets for those that have
the magnet in their brains. Bright minds learn from life, not from
their old-fashioned parents. Oh, the breed will increase, not
diminish! Happiness, old style, is about done for. Women will be
happier in consequence—or in another way. I don’t know about
men. They have reigned too long. And then they are simple
ingenuous creatures, the most tyrannical of them, and pathetically
dependent upon women. Women are growing more independent
every day, more indifferent to that sex ‘management’ of men, which
so far has constituted a large part of man’s happiness.”
Tay was angry, therefore more jocular than ever. “Don’t forget
the adaptability of even the male animal, also that man is born of
woman; also brought up by her. I don’t worry one little bit about the
future happiness of man. As for the Home—apartment-houses and
the decline and fall of servants have about relegated it to the last
stronghold of the old-fashioned love story—the country town. I said
just now that I’d like to know all your thoughts. Well, I shouldn’t. My
idea of happiness is a lifetime with a woman who would always be
more or less of a mystery, who would have her own life—inner and
outer—as I should have mine. And I’m not so sure that mine would
be simple and ingenuous. Marriage with her would be a sort of
intense personal partnership, with separations of irregular recurrence
and length. Then, my lady, there would be a constant ache; passion
would never wear itself out; and neither would be looking for novel
affinities elsewhere.”
Julia smiled. “It sounds very enticing. But that isn’t the point. The
subtlest enemy—it is that desire to find our highest completion
alone.”
“A bully good phase for the next world. Something to look
forward to. The Fool’s Paradise in this life is the grandest failure on
record. Men and women are not constituted to perfect by their
lonesomes. Otherwise the mutual attraction of sex would not be
what it is. No woman that a man wants was ever intended to
complete herself; nor can she become so highly developed in this life
as not to find it quite safe to follow her instincts on her own plane.”
The second bell had rung and the buffet was nearly empty. He
leaned across the table and brought his face close to hers. “If you
are dead sure that I never could make you happy, that you never
could love me, that you haven’t a human instinct that I could gratify,
then chuck me. But if you are only psychologizing on general
principles, then chuck that as fast as you can. I don’t want to hear
any more of it, and I shan’t pay any more attention to it hereafter
than if you were speculating about possible grandchildren inheriting
a taste for drink from your brother. Switch off! You are eighteen.”
Julia sprang to her feet with a laugh, her seriousness routed.
“Right you are! Come, or we’ll be locked out.”
Both Dark and Tay stolidly refused to remain for the last act, and
the party went to the best of the restaurants for the supper, which
was to take the place of dinner; the opera had begun at six o’clock.
The meal was cooked by a chef, and they lingered over it until long
after the Wagnerites were in bed. Dark and Tay were in the best of
spirits, for however they might love music, they loved dinner more;
Julia and Ishbel, who were disposed to be sulky, soon recovered,
and the party was so gay that even the yawning waiters smiled and
felt sure of recompense. When they finally left the restaurant,
Munich might have been the tomb of its history. Not a cab was on
the rank. Not a policeman was to be seen. When they reached the
small paved square before the loggia, Dark threw his arm about
Julia, and they waltzed until Tilly must have longed to step down
and join them. A delighted giggle did come from the sentry-boxes
before the side portals of the palace as Tay and Ishbel followed the
example of their companions. It is not often that the Munich night is
disturbed by anything more original than roistering students. The
moon was out, the cold air crisp. They could have danced for an
hour, but Ishbel suddenly reminded them that they were to start for
Partenkirchen in a few hours, and they raced one another to their
hotel.
XI
They spent the rest of their week at Partenkirchen, a village in a
mountain valley, surrounded by a chain of glittering peaks. The
village was little more than one steep street bordered by inns and
shops, but there were farms in the valley and on the nearer hillsides.
The natives wore high fur caps, not unlike the cossack headgear,
and seemed to exist for decorative purposes only, although alive to
the lure of tourist silver. The hotel at the top of the street was very
modern, with a good cook, little balconies for those that would enjoy
the view, and many nooks in the rooms downstairs for those that
would talk unhindered if not unseen. At this season there were no
other English or Americans, but a sufficient number of Europeans of
the leisure class to make the dining-room brilliant at night and
animated at all times.
Julia and Ishbel had provided themselves with short white skirts
of thick material, white men’s sweaters, and white Tam o’ Shanters.
The men couldn’t wear white, but looked their best, as men always
do, in rough mountaineering costume. They climbed, skated, skied,
and tobogganed; and, under Julia’s gentle manipulation, kept close
together. It was natural that Tay should fall to Ishbel in their outings,
and only once or twice did he manage to drag Julia’s sled up the hill,
or direct her uncertain footsteps when on the snow-shoes. Then she
was so excited with the new sport that she paid little attention to
him. She threw herself into it with the zest of a child, and he
couldn’t flatter himself that her merry laugh was forced, nor the
dancing lights in her eyes. Nor was he depressed himself by any
means; the tonic air went to the heads of all of them, and they
enjoyed themselves with an abandon possible only to those that
have seen too much of life.
But on the last day, Ishbel, who saw through Julia’s manœuvres,
deliberately stayed in bed with a headache, and Dark, without
warning of his intention, departed early with a guide. Tay and Julia
met alone at the breakfast table.
“Now!” he said gayly. “I’ve got you. What are you going to do
about it? If you shut yourself up in your room, I’ll break the door
down.”
“As if I’d do anything so silly. How I wish we could stay here a
month.”
“Why not?”
“I left no address, and I may have stayed too long already —”
“Sh-h!”
“You could not, either.”
“Oh, yes, I could. Dark has been pulling wires, and I’m dead sure
now that the thing will go through.”
“I’m so glad! But no doubt you could have managed it by
yourself sooner or later. I fancy you’ll always be a success in
business.”
“Thanks. If you mean to insinuate that business and cards are in
the same class, I’m not a bit discouraged.”
“Pour me out another cup of coffee. I believe American men like
to wait on women.”
“It’s part of our game. You see how honest I am. You’ll marry me
without illusions.”
“Shall you boss me frightfully?” Julia looked at him over her cup,
and he nearly dropped his. He kept his bantering tone, however.
“The more you do for me, the more I’ll spoil you. It will be quite
an exciting race. How should you like being spoiled for a change?”
“It would be glorious. So irresponsible.”
“Exactly. That’s what makes many a man get drunk. Few
sensations so delightful as that of complete irresponsibility.”
“Do you get drunk?” asked Julia, in mock alarm.
“Gorgeously. Am I not a good San Franciscan? Not too often,
however. Bad for business.”
“You never told me if you went on that spree when you got those
ten thousand dollars. Or didn’t you get it? Perhaps you anticipated,
and your father wouldn’t—what did you call it—plunk?”
“I didn’t, and he did, and I did. I whooped it up for just five days.
To tell you the truth, I didn’t find as much in it as I expected, but felt
I owed it to myself. Wish now I’d come over and eloped with you.”
“Ah!” Julia made a rapid mental calculation. He would have
arrived at about the time Nigel was laying his last desperate siege.
Poor Nigel! Julia could picture Tay’s wooing and methods. Would he
have won where her more courtly knight had failed?
“Suppose I had never turned up?” asked Tay, abruptly. “That
husband of yours can’t live forever, is many years older than you,
anyhow. Do you fancy you would have eventually married Herbert?
Corking books! He must be some man.”
Julia had flushed to her hair. “How did you know I was thinking
of him?” she stammered.
“Were you? Well, those flashes happen, you know. You haven’t
answered my question.”
“It is quite impossible for me to tell, even to imagine, what I
might have done if you—well, if you had not come over again. I’ve
never really thought of marrying Nigel, but there would be a certain
rest in it—not now, but later, perhaps. And we think and work with
much the same objects.”
“Nothing in rest till you’ve had the other thing first. How much
thinking did you expend on that other thing before you were
submerged in the unmentionable?”
Julia blushed again, then laughed. “Oh, well—some day, I’ll tell
you a funny experience I had in India.”
“Tell me now.”
“Over empty coffee-cups and fragments of buttered rolls? Not I.
What shall we do first? Skate?”
“If you like. Do you want to toboggan afterward?”
“I think I’d like a tramp through the woods. We’ve never really
investigated them.”
“Good. Come along.”
They found the lake deserted and skated in silence until Tay
remembered her promise.
“This is a sufficiently romantic spot for confidences,” he observed.
“And in full view of the waiters of the hotel, who appear to have
nothing to do but watch us. Tell me your Indian experience. Whom
did you think you were in love with over there?”
“Nobody. That was the trouble.”
“Did he love and ride away, perhaps? That’s just the sort of
experience you need.”
“Well, I’ve never had it,” said Julia, indignantly.
“A man never minds telling when he’s been left, but I doubt if a
woman ever admits it even to herself. You’re weak-kneed creatures,
the best of you, and need nine-tenths of all the vanity there is in the
world to keep going.”
“I believe you really despise women. But you’re just the sort that
couldn’t live without them.”
“Right and wrong. I shan’t explain that cryptic statement. Fire
away.”
“You’ll laugh at me.”
“If I really could laugh at you, I’d be half cured. I try, but it does
no good. What would be funny in another woman is tragic in you—
and pathetic.”
“Ah?” She was prepared to be indignant again, but met a new
expression in the eyes with which he was intently regarding her.
“What do you mean by that? I am not to be pitied.”
“You poor isolated child! I’ve never felt sorrier for anybody in my
life. But never mind. Tell me your Indian experience.”
“Well—one night—a warm heavenly Indian night—I was alone in
a boat on a lake. There was a great marble palace at one end. The
nightingales were singing in the forest; and such perfumes!”
“Gorgeous! Why wasn’t I there? Some fun, love-making in
southern Asia. But this is just the setting for real enjoyment of the
story. Go ahead.”
“Yes, I never could be in a sentimental mood in this temperature.
Well, I was completely happy—I had been happy for nearly a year in
India, enjoying its strange beauty and never wishing for a
companion. It was happiness enough to be alone and free. But that
night—suddenly—I felt furious —”
“Ah! I begin to catch on.”
“I wish you wouldn’t always guess what I’m going to say.”
“Shows I’m the real thing. Go on.”
“I did wish with all my soul—every part of me—that I had a lover
and that he was there. Heavens, how I could have loved him! I felt
abominably treated by fate. Up to that time I hadn’t even thought
about love. My experience had been too dreadful. I had felt sure
that all capacity for love had been withered up at the roots. When a
man looked at me as men do look at women they admire very much,
it was enough to make me hate him. But I suddenly realized all that
had passed. I had come to the conclusion that Harold had been mad
from the beginning, so I could do no less than forgive him. That
seemed to wipe it all out.”
“When did this happen?” asked Tay, abruptly. “What year?”
“It must have been—in 1903.”
“Oh! Cherry hadn’t been to England for two or three years. She
went that year and came back with a good deal of your story—got it
from your aunt, of course. I remember I thought about you pretty
hard for a time. Was on the brink of falling in love with another girl,
and it all went up in smoke. What time of the year was it?”
“Late autumn.”
“Yes! I told myself it was tomfoolery. That you had forgotten me;
and I had pretty well forgotten you. Nevertheless, I couldn’t get you
out of my head. You believe in that sort of thing, I suppose!”
“Oh, yes. I wonder!”
They were both pale and staring at each other. “Well, go on,”
said Tay. “What next?”
“I made up my mind that I would find some one to love; and
take the consequences. I went down to Calcutta, and for a whole
winter tried to fall in love. There were many charming men, but it
was no use.”
“Now are you convinced?”
There was a bend in the lake, which Julia had artfully avoided.
Tay swung her suddenly around it, and in spite of her desperate
attempt to free herself, caught her in his arms.
“Now,” he said, “I propose to show you that temperature has
nothing to do with it. Keep quiet. You are on skates, remember.” And
he kissed her.
“You can kiss me again,” said Julia, after a moment or two.
“I thought so.” And he kissed her for several minutes.
“You look quite different,” murmured, Julia finally.
“I can look more so. Skates and worsted collars that take your
ears off are infernally in the way.”
“Will you always joke?”
“My dear child, if I didn’t joke, I might really frighten you.”
Julia shivered. “I’ve been frightened for days. I knew this would
come. If I’d been really wise, I’d have run away.”
“It wouldn’t have done you one bit of good. Never try that game.
If you do, I’ll jump right up on the platform in Albert Hall and kiss
you in the presence of ten thousand suffragettes—damnable word!”
“I believe you would.”
“I would.” And he kissed her again.
This time she didn’t respond, and he gave her a little shake.
“Forget it. You’re to think of nothing but me this long day we have
all to ourselves. Time enough in London for you to set up your
ninepins for me to bowl over. You’ve shown what you can do. Lady
Dark told me that you did nothing by halves, and you’ve just proved
it. To-day for love. Do you hear?”
Julia smiled radiantly. “I couldn’t think of anything but you for
more than a minute if I would. That was one thing that terrified me
at night—when I had time to think— I had switched off with a
vengeance! The past seemed blotted out. I wonder! I wonder!”
“I don’t. And I never saw a mortal woman look so happy. Your
faculty of living in the moment is a grand asset, my dear. Ten
months— Good lord! It takes all of that time to establish a residence
in Nevada, and all the rest of it. However— Well, let us go for a walk
in the woods.” He glanced about with a quickening breath. “Blessed
spot! We’ll come back to it one of these days.”
XII
“It shows how much in love we are that we don’t mind this
luncheon,” said Tay, who made a face, nevertheless. They had
decided to remain away from the hotel all day, and were fortifying
themselves at the inn on the lake. The meal was the usual one of
watery veal, fried potatoes, and pastry. “I remember eating ‘kalb’
when I was in Germany before until I choked. Can any one explain
why there are more calves in Germany than anywhere else on the
face of the globe? You don’t see so many cows. The offspring must
arrive in litters like pigs.”
“And the German, true to his creed, is furious if you flout his
commonest staple.” Julia smiled, but, in truth, her mind was deeply
perturbed, and she spoke mechanically. There had been no more
love-making, for guests and peasants had met them at every turn of
the woods. Her Hindu master had once told her that profound as
were the suggestions he had given her, and systematic as was the
control she had been taught to acquire over herself, either might
suffer interruption unless she lived in India for many years longer. A
violent awakening of the primal emotions, the assault of a mind and
nature, temporarily, at least, stronger than her own, and that devil
that lives in the subconsciousness would sit on his hind legs and
chuckle.
During the hours that had succeeded those moments of
unquestioning surrender on the lake, her thirty-four years with their
highest accomplishment had crept back, and she had ceased forever
to feel eighteen. The immediate future rose before her like a black
wall pricked out with menacing fingers. There was no question as to
where her duty lay for the moment, as to what she must accomplish
before she could think of happiness. All the steel in her nature had
reasserted itself, her brain was cold and keen. She would put an end
to the present state of affairs this very day. But how? How?
She continued pleasantly.
“Perhaps it would have been better to go back to the hotel.”
“Not much. The hotel is associated with three evenings of
fruitless manœuvrings to get you alone in one of those corners.
Besides, Lady Dark may have recovered. I’ll take no chances. You
are to be mine alone for an entire day.”
“We could stay a few days longer.”
“No, on the whole, I want to wind up London as quickly as
possible. So must you. I shall send you on a steamer ahead to make
sure of you.”
Julia laughed. “How like a man. We could hardly be happier than
we are now. Why not let well enough alone, for a bit?”
“Well, you see, I am a man, and therefore differ from you as to
what constitutes real happiness. I want to get the cursed Reno
matter over as quickly as possible. Besides, I am due at home. The
business might wait, but there’s a big piece of political work to pull
off, and I must do my share in prying my poor rotten state out of the
slough.”
Julia’s mind took a leap. “I believe you are really ambitious,” she
said, with bright sympathetic eyes. “Politicians don’t work for
nothing. Do you know you never have told me a word of your
ultimate intentions?”
“I’ve been too busy talking about you. I was only too glad to
side-track my own affairs for a time. We were all so strung up during
the graft prosecution that we jumped at anything that would give us
a chance to forget it, and recuperate our energies.”
“Well, you have had a change! Do tell me how you have planned
out your life. Do you look forward to being President of the United
States?”
“Not as much as when I was fifteen.”
“Oh, you will always joke! Can’t you fancy what your future is to
me? You are capable of great things, and I don’t for a moment
believe that you care for nothing but money making, varied by an
occasional rush at reform. Do be serious.”
“My dear, I never felt more serious than I do at this moment.
God knows I’m only too grateful for your interest. It struck me as
ominous that you never asked me.”
“I didn’t dare,” murmured Julia. “A man’s career is a so much
more brilliant thing than a woman’s ever can be, for he has two
distinct sides. We women are bound by our physical limitations to
one side. We must make new traditions—and new bodies to
transmit —”
“Hold on! Let us avoid that subject as long as possible.”
“But tell me.”
“Well, here is the way I am fixed: I am for reform, my father is
not. I am a full partner in the firm, but I can’t use the firm’s money
for an object to which my father is bitterly opposed. But I have been
making money on the outside, investing and reinvesting, and, in two
years at most, I shall have an independent fortune, irrespective of
my father’s large estate. Then I intend to go in for politics, doing all
I can meanwhile to educate the people in the precepts of the true
democracy and to keep the Reform party on top. I intend to hold
conspicuous office in California, then go to Congress. You can call
this ambition, if you like; no doubt ambition is mixed up with all
deep sense of personal usefulness. It takes a good-sized ego to
permit you to fancy yourself able to reform long-existing conditions;
and egoism and ambition are good working partners. I shall work for
my own state first, and then for the country at large. That is the way
for Americans to begin, or, at all events, the way we do begin, our
country being what it is. State pride is almost as strong as national.
Moreover, a man must prove himself in his own state before he can
get a chance to command the attention of the nation. If a man
happens to belong to a notoriously corrupt state like California, and
manages to shine by contrast, his opportunities are so much the
greater! But the nation is the thing. Every Union man during the Civil
War fought for his flag, not for his section. But our country is now a
republic only in name. We are piling up problems our founders could
not anticipate, and if they go on unchecked, they will land us either
in an autocracy, or in the worst form of tyranny known to history,—
mob rule. It is the business of a few of us to avert a French
Revolution. Just at present we are between two camps, Monopoly
and Labor-Unionism, and have almost forgotten that we are citizens
of a free country. Our skins have been safe so far, owing to the lack
of brains and initiative in the masses; also, because they are far
from starvation. But let that condition arise—before the Money
Power has been made to open its eyes, or has been controlled by
legislation—then horrors beside which the French Revolution will be
mere picturesque material for novelists. A few thinking men with
money enough to give them weight with the solid moneyed class at
the top—where the reform must begin—as well as to place them
above suspicion, and who have cultivated common-sense and
patriotism instead of greed, must do the business. Let’s get out of
this.”
XIII
When they were walking over the crisp snow in the woods—now
deserted, for hotel guests and peasants alike were at the long
midday meal—he resumed the subject. Her vivid sympathy and
interest had brought back the bitter struggle of the past two years
with a rush.
“How I wish you had been with me when we made our graft
fight,” he said, looking at her with fond eager eyes. “What a mate
you would have been. When the whole town is howling at a man
because he is trying to do the right thing, he needs just such a
woman as you to keep the courage in him. The concerted opinion of
the majority has an insidious power! Sometimes we wondered if we
could be right, if we were not all dreamers, unpractical, doing our
city more harm than good. The whole country was aghast at our
exposures, business was almost dead, capital refused to come our
way; the poor old city that had been wrecked by the most fearful
natural calamity of modern times—$500,000,000 went up in smoke
—seemed to cry out against us for holding her down, to beg for a
chance to limp out of her bog. But we looked ahead, convinced that
there could be no permanent prosperity for San Francisco until the
sore was scraped to the bone and sterilized; in other words, until the
political scoundrels and the get-rich-quick element, that obtained
their crushing franchises by corrupting a packed Board of
Supervisors, and bought everybody, from the boss and the mayor
down to the man in the street with a vote to sell, were either gaoled
or so discredited that they would be forced into private life or out of
the state. We unseated the boss and the mayor, the supervisors
having come through, and we were able to indict several of what we
call the higher-ups—the men that had done the buying. I never had
much hope of convicting these men, for in California, in its present
state of moral development, it is next to impossible to convict a rich
man. If you get an honest judge, there are always men in the jury
that have got in for no purpose but to be bribed. But we won out in
another way. The long trial aired the abominable practices of these
corporations, and, together with the many sensational episodes—the
shooting of the prosecuting attorney in court, and the suicide of the
would-be murderer in prison before he could be put on the stand,
the kidnapping of the only editor that fought with us,—woke up the
state; it talked of little else, and talking, thought, and was ashamed.
The city machine got ahead of us, for the mayor we had managed to
seat was too virtuous to build up a machine of his own; but we hope
for great things in the state itself when our Reform candidate runs
for the office of governor this year. Perhaps it was unreasonable to
hope for more at the beginning, and it was a tough fight to get that
much.
“Oh, God!” he cried bitterly, “the rottenness of young
communities with potentialities of wealth. Human nature in the raw,
when it is still in the ingenuous stage of greed, is a damnable thing.
It has never shown any originality since the world began. Socialism
may clip its wings, if it ever gets control, but—here is the cursed
anomaly: you can’t hope for Socialism until a miracle eliminates
greed from the nature of man; for it is men that must grant
Socialism, and Socialism means the balking of greed. Even if some
unforeseen set of circumstances forced it upon us, I doubt if it would
last. You can no more eliminate greed from men than you could
eliminate sex by forcing men and women to dress alike, shave their
heads, and say their prayers three times a day. But the world is
better in some respects than it was a century ago, and this is
primarily due to the untiring efforts of the minority. But, again, the
work must be done by a few men—the few that are awake and can
see farther than their noses. Well, my dear, I hope and pray that I
am one of those men. There you have my program, so far as a mere
finite mind can project it.”
“Now I know why I have been permitted to love you,” said Julia,
softly, and looking at him with glowing eyes. “Hadji Sadrä told me
that he should watch over me, and that if I dared love a man who
would pull me down, instead of being far greater than I could ever
hope to be, he would blast me, transform me into a mere
commonplace female, but haunted by the memory of what I had
been —”
“How much of all that do you believe?”
“Ah! I saw marvellous exhibitions of power. They are common
enough in the East, but one would hardly dare relate them in this
part of the world. If I longed with all the concentrated powers of my
mind for Hadji Sadrä, he would come to me in a flash—with that
secondary material body they call the astral, and we call the ghost.
If I were terribly perplexed, I should send for him —”
“I want no go-betweens, particularly Mohammedan ghosts.”
But Julia had no intention of letting him down.
“I wonder I could remember him, or any one else! It was only
because I suddenly realized what all this means—that I may have
another and far greater part to play —”
“You see that at last! Perhaps I should have appealed to you
before. But—it is only to-day that I have felt really close to you—
really loved you, perhaps. I fancy I was merely infatuated before.”
He took her in his arms, and she looked up at him with the deepest
sympathy a woman can express, particularly when gifted with eyes
that are the dazzling headlights of a finished and powerful machine
behind. “Oh, if you could only know,” he continued in tones of
intense feeling, “what it will mean to me to have you, not only to
love, but to work with! I really want with all my soul to be of use to
my country, to be one of the few that are willing to work for her
unselfishly, to leave a decent name behind me. It is thankless work,
fighting the majority, battling for an ideal nobody wants, to be the
butt of the press, accused of sordid motives, balked at every turn.
The only sort of patriotism the average American understands is
sounding promises by ambitious politicians and huge donations from
repentant millionnaires. To raise the morale of a people, and in the
process prevent them from growing too rich, may mean the respect
of posterity, but it also means the hatred of your contemporaries.
The Big Voice! It confuses the mind and the standards. The constant
failures, the recurring sense of hopelessness, of futility, the
inevitable contempt for the masses you are striving to emancipate
from themselves,—many a man that has started out with the loftiest
and most selfless ideals loses courage, shrugs his shoulders, and
falls back. I am no better and stronger than many of them. I have
dreamed one minute, the next wondered how far I would go, how
long my enthusiasm would last. Material success is easy enough,
and always rewarded by approbation and respect! What is the use? I
am young still, but I asked myself that question more than once, for
even my family were all against me. My father was furious. He is
honest, but his business has been his god. I left home and went to a
hotel—to avoid the everlasting discussions at table. My old friends
cut me on the street. I was regarded as an enemy of society, and
society cast me out. The rest of our little group shared the same
fate. We were obliged to keep one another’s courage up. That we
carried our lives in our hands and were liable to assassination at any
moment was the least of our trials. The Big Voice! We felt as if we
were at the foot of an avalanche, or some other inexorable enemy in
Nature herself, trying to push it back with our hands. Inevitably
there were black moments when we felt we were fools, especially
when we faced certain defeat. And it’s all to do again, not once, but
many times. Do you wonder that the light side of my nature has
given me many cynical moments, or that I have seethed with
disgust, or wondered if I would last? But with you—ah! If I had ever
dreamed you lived, I believe I never should have despaired for a
moment. But my only memory of you was of a charming and lovely
child. And it is only to-day, here, that I have realized what it means
for any of us to stand alone. With your faith and your brain, with you
always beside me, sympathizing, helping—I never shall lose courage
for a moment. I could accomplish anything—everything —”
This sudden vehement disclosure of the serious depths of his
nature under its surface gayety, with more than one glimpse of
heights and powers she had barely divined, had thrilled Julia even
more than his passionate love-making. All her own greatness
responded, and for a moment or two she had been swept irresistibly
on that tide of self-revealing words. She had a vision of the complete
passion, the perfect union. But her brain remained cool. She never
lost sight of her purpose.
She sprang from him suddenly and flung out her arms. Her eyes
looked black. Her skin shone with a peculiar radiance like white fire.
So she had looked more than once on the platform during her last
moments of irresistible appeal; when her bewildered audiences had
felt as if dissolving in a crucible from which there was no escape.
“Oh,” she cried in low vibrating tones of intense passion, “now I
know you—the real You! I’ll never fail you. You are wonderful, and I
worship you! I believe we can be happier than any two mortals have
ever been. But, Dan, I must go to you free, with a conscience as
clean as your own. You must see that. You are too great not to see
it. I must be tormented with no regrets, no remorse. If I should
leave at this moment—‘rat’ like any scoundrelly selfish politician—
desert these women publicly while all the world is watching them,
make them ridiculous—oh, I don’t mean that I am indispensable;
there are too many great women among them for that— But don’t
you see that if I threw them over to follow an American to the other
side of the world, now, while their fate hangs in the balance—why, it
would amount to nothing less than a cynical declaration that we are
all alike when it comes to a man—that we fight for a great
impersonal cause only so long as no man comes along to play the
old tune on our passions—why—Good God!—they would be the butt
of every malicious wit in the kingdom. Their cause would be set back
a generation. And I? I should be execrated by women the world
over. I, who am now a sort of goddess. My immense following is due
as much to the youth and beauty which I have appeared to
immolate so indifferently, as to all my talents put together. What use
should I be to you if I scuttled the ship and deserted it? What place
could I take among the women of your country? Do you think they
would listen to me, that I could teach them, help them? They would
laugh in my face!”
She caught him by the shoulders, her eyes piercing into his,
which stared at her full of sombre perplexity. She went on in a rapid
monotonous voice, which fell on his brain like a rain of fire: “Why
didn’t you come for me, as you promised? I should have gone. Four
years ago! I was free. Something was always knocking at my mind. I
knew that I had useful energies of some sort. They were always
groping to find vent. If you had come, if you had told me then what
you have told me to-day, I should not have hesitated a moment. I
should have known that my work was to be done with you. But you
forgot your promise. The bond was not strong enough. Why did you
wait until I had become a public figure, written about daily—until I
had hopelessly compromised myself? Oh, can’t you see that you
have made me the most tragic figure among women? I love you so
that I long with all those other and far greater forces within me—
that you have brought to life—to go, to be happy, to give you all you
want and deserve, to become truly great—with you! Oh, I am the
most unhappy woman on earth—and the happiest!”
Tay had tried to interrupt her several times. But he was dazed.
She looked like a sibyl. He felt disjointedly that he had less desire to
claim her as a woman than to ascend with her to the plane whither
she seemed to have borne herself. He had been shaken out of his
own reserve and bared his soul for the first time in his life; his
defences were down, she seemed to have entered his mind and
taken possession. Human passion would appear to have fallen to
ashes. His senses felt numb, he was vaguely conscious of a material
dissolution that left his soul free to mingle with hers.
She gave him no chance to speak. Her words flowed on with the
same fiery monotony.
“You have taught me what duty means. I believe I never was
really capable of the sacrifice of self before. I worked to fill my time,
to forget my depths. Then because the greatness of that work really
put my womanhood to sleep! But you! I have not a personal
ambition left, not a want apart from you, but this terrible duty. I
want to live in you, for you. You! You! You!” Tay had a confused idea
that he was turning into a demi-god. “But I must go to you free—
that I may never look back—that I may know and give complete
happiness. I must be all woman, not a mere brain, humiliated,
ashamed, tortured by regrets. And you must go at once, at once, at
once. If you stay, if you prove too strong for me, if you force me to
go with you—and I love you so I might go—then we never shall
know the meaning of happiness for a moment. I will follow you
before long. If we don’t win the battle early this year, I will train
some one to take my place. I shall speak, appear in public less and
less, drop out by degrees. I shall soon be forgotten—long before I
can marry you. But to leap from the front rank of these women
straight into a divorce court in a city whose name is a synonym for
vulgarity, that is never mentioned without a laugh or a sneer— Oh,
you see! You see! What an anticlimax to all these years on a
pedestal! What a wife for you, a public man! Oh, God! I should be
the ruin of your own career —”
“Julia!” exclaimed Tay, trying to get his breath.
She fell back limply against a tree, as if exhausted with her own
passion, but neither voice nor eyes lost their power.
“Oh, go! Go! Go! If you don’t, I shall be in the dust. I shall be
incapable of love in my abasement. I know myself. To love, to be
happy, I must be free. I must have my self-respect. I can’t love,
tortured by shame and remorse. I want love and you more than
anything on earth, but I want them utterly. Oh, go!”
For a moment or two Tay had been conscious of an angry
struggle in the depths of his mind. He suddenly became master of
himself. He shot a glance at Julia as piercing as her own, and she
gasped and flung herself face downward on the snow and began to
sob. He made no attempt to pick her up for the moment.
“You have strange powers, Julia,” he said. “If I were weaker than
I am,—and God knows I am weak enough,—I should be slinking
through the woods with my tail between my legs, hypnotized out of
my manhood, and ready to lick your hand for the rest of my life.”
Julia stopped sobbing and listened intently. Tay walked up and down
before he spoke again. “But mind you, I don’t question your
sincerity, your love, whatever the devilish arts you tried to practise
on me. Every leader of a great revolution is a fanatic and a Jesuit.
And, methods aside, every word you spoke was sound common-
sense. I don’t care to assume the responsibility of injuring those
women, and I believe you would be incapable of happiness if you
handed their enemies another weapon—a pretty deadly one it would
be!”
He picked her up and dusted her off. “I am going,” he went on
grimly, “and I shall wait exactly six months. Or rather—” He caught
her hands in his powerful grip, his eyes blazing into hers. “I shall
never see you again, not even with your royal consent, unless you
swear to me here that you’ll not try that on again. That you’ll be
woman to my man from this time forth—that and nothing more. I’ll
be damned if I’ll live with a woman who doesn’t play a square game.
Swear it.”
“Oh, I do, I do! Oh, Dan!” The tears were running down her face,
honest tears, for she was frightened, while rejoicing. “Do believe
that I was only doing my best—I knew that you wouldn’t listen—I
had only one object —”
“Oh, as I told you, I have never questioned your queer
complicated honesty. Only, being a perfectly normal person myself, I
prefer to postpone occult trickery until I reach the next world. No
doubt it will be all in the day’s work there. But I’ve got my job cut
out in this, matching my earthly wits against the next man’s. Now,
you’ve given me your word! If you ever go back on it —”
“Oh, never!” Julia was now really limp, and looked wholly
feminine. Tay took her in his arms once more and dried her tears.
“It’s my fate to love you,” he said, with a sigh. “And that’s about the
size of it. I’m sorry you ever went to your East, but live in the hope I
can make you forget it.”
“And do you love me as much as ever?” asked Julia,
unintellectually.
Tay laughed outright, the ancient formula almost routing the
memory of those moments when the same woman that uttered
them automatically had launched her ruthless will into his relaxing
brain. “Oh, yes,” he said, “I love you, all right, and for good and all.
Now, we’ll be practical. I shall leave England the day I wind up my
affairs in London. That should be in less than a week. I am going to
ask you to stay here until I sail. I am resigned to going without you,
am willing to admit that a separation of a few months is inevitable—
but, all the same, the less temptation, the better. Besides, I shall
need all my wits in London— If you were there —”
“Oh, I’d rather stay, far, far rather! I don’t think I could stand it,
either. Here, at least, I can keep out of doors, exercise until I am
past thought —”
“Well, don’t change your mind. I insist that you stay here. If you
return to London while I am there—well, I’ll not say just what I
won’t do. Enough that I should not return to America alone. Come,
let’s get back to the hotel.”
XIV
Julia went at once to Ishbel’s room. She found that conspirator
sitting on the little balcony enjoying the view of ice peak and forest.
Ishbel sprang to her feet when she saw Julia’s face.
“Oh— Ah— So—”
“Quite so,” said Julia, dryly. “But never mind. I have won out for
a bit. He has promised to go to California at once and wait while I
eliminate myself by degrees. I have promised to follow in six
months. Of course I shall if I can. If I can’t—well, I must make him
listen to reason again. But I hope —”
“Of course, you can’t bolt,” said Ishbel, who was burning with
sympathy for both. “But surely you can manage to let yourself out in
six months. Your vice-president is an efficient woman; and then we
are sure to win this session —”
“I don’t know! If we did, of course I’d make some excuse and go
at once. But—otherwise—I can’t leave them for a divorce court until
I have taught them to forget me—disassociated myself from
them —”
She dropped on the edge of the bed, face and body expressing
utter discouragement. Ishbel half opened her lips, then went out
upon the balcony lest she break her word and tell Julia that France
was dying. But a moment’s reflection convinced her that this
information would only complicate matters at present. She thought
hard for a few minutes, then ran back into the room.
“Julia!” she exclaimed, “I have an idea! Why not go to Nevis?
Your mother is very old. You haven’t seen her for many years. You
can give out that she is ill—or I will if you won’t. My conscience
wouldn’t hurt me a bit, for old people are always ill. No doubt you’ll
find her with rheumatism, lumbago, dropsy, Bright’s disease,
diabetes, tumors, or a few other ills incident to old age. It would
make just the break you need; and it’s just the time to go, for your
officers can attend to everything. Also—you could stay on and on.”
Julia looked up with some return of animation in her heavy eyes.
“It’s not a bad idea, if I could go.”
“Of course you could, and the minute I get to London I’ll set the
whole shop to work on your tropic wardrobe. You can get many
things ready-made, anyhow—people are always going out to India
on a moment’s notice.”
“I’ll think it over while I’m here. I’m to stay until he sails.”
“Ah!—I hate to leave you alone. Shall I stay with you?”
“I think I’d rather be alone.”
“Yes, I understand.” She sat down on the bed and put her arm
about Julia’s relaxed form. “I want you to promise me that you will
marry Mr. Tay, whatever happens. You’ve a right to happiness, if
ever a woman had, and this is your only chance, my dear. There’s
only one real man in every woman’s life, and happiness is the
inalienable right of all of us. Even Bridgit was forced to admit that.”
“Oh, I intend to marry him. But when? That is the question!”
“As soon as possible. You have given four uninterrupted years to
this work, and you have done great things for it. That is enough —”
“We have all gone in—that inner band—to devote a lifetime to it
if necessary.”
“Don’t you suspect that those women have an extra something in
their make-up that the rest of us lack?”
“I have accomplished as much as any of them—”
“Quite so. And enough. Don’t you feel that the spring has gone
out of you?”
“Just now, yes.”
“You’ll never work with the same spirit again, for you never can
be impersonal again. You would feel a hypocrite, for you would
always be resenting the loss of what you really want most in life.
You’ve a duty to yourself, to say nothing of Mr. Tay; and you’re not
going to a frivolous useless life—not with him! No one is
indispensable to any real cause, and in ours there are too many to
carry on the work without the supreme sacrifice on your part.
Promise me, at least, that you will go at once to Nevis. It would be
the beginning of the solution.”
“I’d like to go.”
“You really must want to see your mother, and your old home,”
continued Ishbel, insinuatingly. “One’s mother and one’s birthplace
are the great refuges in time of trouble. You were very fond of your
mother when you were a child.”
“I’m fond of her now, but she seems to have lost all affection for
me.”
“Never believe it. She is a strange proud old woman, but she has
always loved you. Go back to her. There is your refuge.”
“You are playing on my deepest feelings, but you are right.
Nevis! When you are crushed, your own land calls you. And, as you
say, I haven’t much work in me at present.”
“Then you’ll go?”
“When you get to London, telegraph me how matters stand. If it
looks as if the truce would be a long one—yes, I’ll go. I believe I
want to go more than anything else in the world—except one!
Perhaps I’ll get a grip on myself down there. Perhaps I’ll find that—
well, that I love this great cause best, after all.”
“Not a bit of it!” cried Ishbel, in alarm. “Don’t try to persuade
yourself of anything so unnatural and foolish. Do you realize how
few women have complete happiness offered them? I could shake
you.”
Then she reflected that Nevis was a tropical island; and another
scheme was forming in her agile brain. “Well, never mind all that.
You are worn out now. It is not a matter to discuss, anyhow. Stay
out of doors here, and I will prepare your wardrobe. Then you can
start as soon as you return to England. I will tell Collins to pack your
other things. Eric will secure your accommodations on the first
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com

More Related Content

PDF
Object oriented design knowledge principles heuristics and best practices Jav...
PDF
Object oriented design knowledge principles heuristics and best practices Jav...
PDF
Object oriented design knowledge principles heuristics and best practices Jav...
PDF
Oop principles a good book
PDF
Strategies and Opportunities for Technology in the Metaverse World P C Lai
PDF
ArchiMetal Case Study
DOCX
Guia 2-examen-de-ingles
PDF
Design Principles for Embedded Systems Kcs Murti
Object oriented design knowledge principles heuristics and best practices Jav...
Object oriented design knowledge principles heuristics and best practices Jav...
Object oriented design knowledge principles heuristics and best practices Jav...
Oop principles a good book
Strategies and Opportunities for Technology in the Metaverse World P C Lai
ArchiMetal Case Study
Guia 2-examen-de-ingles
Design Principles for Embedded Systems Kcs Murti

Similar to Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S (20)

PDF
E learning guide
PDF
Thesis
PDF
Product engineering
PDF
Model-Driven Engineering and Software Development Slimane Hammoudi
PDF
My Portfolio
PDF
Software Product Line Advanced Topic A Elfaki
PDF
Week 6 assignment 2 critical thinking questions EDU 655
DOCX
Simulation Modelling Practice and Theory 47 (2014) 28–45Cont.docx
PPS
Instructional Design for the Semantic Web
PDF
Software Engineering: What is That?
PDF
Architecting A Knowledgebased Platform For Design Engineering 40 Zhenjun Ming
PDF
Modern Java EE design patterns building scalable architecture for sustainable...
PDF
Data-X-Sparse-v2
PDF
Career Cartography - Careers in IT
DOCX
My Professional Resume
PPTX
Maintainable API Docs and Other Rainbow Colored Unicorns
PPTX
Best Web Development Training in Mohali.pptx
PDF
My Career Portfolio - 2015
DOCX
SYSTEMS ANALYSIS & DESIGN An Object-Oriented Approach with .docx
PDF
How to Build a Career in Software Development: Tips and Tools
E learning guide
Thesis
Product engineering
Model-Driven Engineering and Software Development Slimane Hammoudi
My Portfolio
Software Product Line Advanced Topic A Elfaki
Week 6 assignment 2 critical thinking questions EDU 655
Simulation Modelling Practice and Theory 47 (2014) 28–45Cont.docx
Instructional Design for the Semantic Web
Software Engineering: What is That?
Architecting A Knowledgebased Platform For Design Engineering 40 Zhenjun Ming
Modern Java EE design patterns building scalable architecture for sustainable...
Data-X-Sparse-v2
Career Cartography - Careers in IT
My Professional Resume
Maintainable API Docs and Other Rainbow Colored Unicorns
Best Web Development Training in Mohali.pptx
My Career Portfolio - 2015
SYSTEMS ANALYSIS & DESIGN An Object-Oriented Approach with .docx
How to Build a Career in Software Development: Tips and Tools
Ad

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Sports Quiz easy sports quiz sports quiz
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Computing-Curriculum for Schools in Ghana
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Institutional Correction lecture only . . .
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Anesthesia in Laparoscopic Surgery in India
O7-L3 Supply Chain Operations - ICLT Program
Microbial disease of the cardiovascular and lymphatic systems
Sports Quiz easy sports quiz sports quiz
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Basic Mud Logging Guide for educational purpose
Microbial diseases, their pathogenesis and prophylaxis
VCE English Exam - Section C Student Revision Booklet
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Computing-Curriculum for Schools in Ghana
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Institutional Correction lecture only . . .
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Final Presentation General Medicine 03-08-2024.pptx
Ad

Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S

  • 1. Visit https://ebookultra.com to download the full version and explore more ebooks Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S _____ Click the link below to download _____ https://ebookultra.com/download/object-oriented-design- knowledge-principles-heuristics-and-best-practices- javier-garzas/ Explore and download more ebooks at ebookultra.com
  • 2. Here are some suggested products you might be interested in. Click the link to download Starting Out The c3 Sicilian 1st Edition John Emms https://ebookultra.com/download/starting-out-the-c3-sicilian-1st- edition-john-emms/ Object Oriented Design with UML and Java 1st Edition Kenneth Barclay https://ebookultra.com/download/object-oriented-design-with-uml-and- java-1st-edition-kenneth-barclay/ Java the UML way integrating object oriented design and programming Else Lervik https://ebookultra.com/download/java-the-uml-way-integrating-object- oriented-design-and-programming-else-lervik/ Scientific Software Design The Object Oriented Way 1st Edition Damian Rouson https://ebookultra.com/download/scientific-software-design-the-object- oriented-way-1st-edition-damian-rouson/
  • 3. Design patterns explained a new perspective on object oriented design 2. ed Edition Shalloway https://ebookultra.com/download/design-patterns-explained-a-new- perspective-on-object-oriented-design-2-ed-edition-shalloway/ The Anti Alapin Gambit Death to the 2 c3 Sicilian 1st Edition Cyrus Lakdawala https://ebookultra.com/download/the-anti-alapin-gambit-death-to- the-2-c3-sicilian-1st-edition-cyrus-lakdawala/ Enterprise SOA Service Oriented Architecture Best Practices 9th Edition Dirk Krafzig https://ebookultra.com/download/enterprise-soa-service-oriented- architecture-best-practices-9th-edition-dirk-krafzig/ Object oriented software development using Java principles patterns and frameworks 2nd Edition Xiaoping Jia. https://ebookultra.com/download/object-oriented-software-development- using-java-principles-patterns-and-frameworks-2nd-edition-xiaoping- jia/ Principles of Object Oriented Modeling and Simulation with Modelica 2 1 1st Edition Peter Fritzson https://ebookultra.com/download/principles-of-object-oriented- modeling-and-simulation-with-modelica-2-1-1st-edition-peter-fritzson/
  • 5. Object oriented design knowledge principles heuristics and best practices Javier Garzã¡S Digital Instant Download Author(s): Javier Garzás, Javier Garzás and Mario Piattini ISBN(s): 9781591408987, 1591408989 Edition: illustrated edition File Details: PDF, 5.29 MB Year: 2007 Language: english
  • 7. i Object-Oriented Design Knowledge: Principles, Heuristics and Best Practices JavierGarzás Oficina de Cooperación Universitaria (OCU)S.A., Spain Mario Piattini University of Castilla - La Mancha,Spain Hershey • London • Melbourne • Singapore IDEA GROUP PUBLISHING
  • 8. ii AcquisitionsEditor: MichellePotter DevelopmentEditor: Kristin Roth SeniorManagingEditor: JenniferNeidig ManagingEditor: SaraReed CopyEditor: AprilSchmidt Typesetter: MarkoPrimorac CoverDesign: LisaTosheff Printed at: YurchakPrintingInc. PublishedintheUnitedStatesofAmericaby Idea Group Publishing (an imprint of Idea Group Inc.) 701 E. Chocolate Avenue HersheyPA17033 Tel: 717-533-8845 Fax: 717-533-8661 E-mail:cust@idea-group.com Website:http://www.idea-group.com andintheUnitedKingdomby Idea Group Publishing (an imprint of Idea Group Inc.) 3 Henrietta Street CoventGarden LondonWC2E8LU Tel: 44 20 7240 0856 Fax: 44 20 7379 0609 Website:http://www.eurospanonline.com Copyright © 2007 by Idea Group Inc. All rights reserved. No part of this book may be reproduced, stored or distributed in any form or by any means, electronic or mechanical, including photocopying, without written permission from the publisher. Product or company names used in this book are for identification purposes only. Inclusion of the names of the products or companies does not indicate a claim of ownership by IGI of the trademark or registered trademark. LibraryofCongressCataloging-in-Publication Data LibraryofCongressCataloging-in-PublicationData Object-orienteddesignknowledge:principles,heuristics,andbestpractices/JavierGarzasandMarioPiattini, editors. p. cm. Summary:"Thesoftwareengineeringcommunityhasadvancedgreatlyinrecentyearsandwecurrentlyhave numerousdefineditemsofknowledge,suchasstandards,methodologies,methods,metrics,techniques,languages, patterns, knowledge related to processes, concepts, etc.The main objective of this book is to give a unified and globalvisionaboutMicro-ArchitecturalDesignKnowledge,analyzingthemaintechniques,experiencesand methods"--Providedbypublisher. ISBN 1-59140-896-2 (hardcover) -- ISBN 1-59140-897-0 (softcover) -- ISBN 1-59140-898-9 (ebook) 1. Object-oriented methods (Computer science) 2. Object-oriented programming (Computer science) I. Garzas, Javier, 1975- II. Piattini, Mario, 1966- QA76.9.O35.O244 2006 005.1'17--dc22 2006010089 British Cataloguing in Publication Data A Cataloguing in Publication record for this book is available from the British Library. All work contributed to this book is new, previously-unpublished material. The views expressed in this book are those of the authors, but not necessarily of the publisher.
  • 9. iii Object-Oriented Design Knowledge: Principles, Heuristics and Best Practices Table of Contents Preface .............................................................................................................vi Chapter I The Object-Oriented Design Knowledge................................................... 1 Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain Mario Piattini, University of Castilla - La Mancha, Spain Chapter II The Object-Oriented Design Knowledge Ontology ................................. 8 Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain Mario Piattini, University of Castilla - La Mancha, Spain Chapter III Using Linguistic Patterns to Model Interactions ....................................23 Isabel Díaz, Central University of Venezuela, Venezuela Oscar Pastor, Technical University of Valencia, Spain Lidia Moreno, Technical University of Valencia, Spain Alfredo Matteo, Central University of Venezuela, Venezuela
  • 10. iv Chapter IV A Framework Based on Design Patterns: Implementing UML Association, Aggregation and Composition Relationships in the Context of Model-Driven Code Generation .....................................56 Manoli Albert, Universidad Politécnica de Valencia, Spain Marta Ruiz, Universidad Politécnica de Valencia, Spain Javier Muñoz, Universidad Politécnica de Valencia, Spain Vincente Pelechano, Universidad Politécnica de Valencia, Spain Chapter V Design Patterns as Laws of Quality ........................................................ 105 Yann-Gaël Guéhéneuc, University of Montreal, Canada Jean-Yves Guyomarc’h, University of Montreal, Canada Khashayar Khosravi, University of Montreal, Canada Houari Sahraoui, University of Montreal, Canada Chapter VI Automatic Verification of OOD Pattern Applications .......................... 143 Andrés Flores, University of Comahue, Argentina Alejandra Cechich, University of Comahue, Argentina Rodrigo Ruiz, University of Comahue, Argentina Chapter VII From Bad Smells to Refactoring: Metrics Smoothing the Way ......... 193 Yania Crespo, Universidad de Valladolid, Spain Carlos López, Universidad de Burgos, Spain María Esperanza Manso Martínez, Universidad de Valladolid, Spain Raúl Marticorena, Universidad de Burgos, Spain Chapter VIII Heuristics and Metrics for OO Refactoring: A Consolidation and Appraisal of Current Issues ..................................................................... 250 Steve Counsell, Brunel University, UK Youssef Hassoun, University of London, UK Deepak Advani, University of London, UK Chapter IX A Survey of Object-Oriented Design Quality Improvement .............. 282 Juan José Olmedilla, Almira Lab, Spain
  • 11. v Chapter X A Catalog of Design Rules for OO Micro-Architecture ..................... 307 Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain Mario Piattini, University of Castilla - La Mancha, Spain About the Authors ..................................................................................... 349 Index ............................................................................................................ 356
  • 12. vi Preface In order to establish itself as a branch of engineering, a profession must under- stand its accumulated knowledge. In addition, software engineering as a branch of engineering must take several basic steps in order to become an established profession, highlighting understanding of the nature of its knowledge. Software engineering experts always have used proven ideas. Concretely, in the object-oriented (OO) design knowledge field, the practical experience of it has been crucial to software engineers, and it is in the last years when these ideas, materialized in items such as patterns or refactorings have reached their biggest popularity and diffusion. And in this regard, the software engineering community has advanced greatly and we currently have numerous and defined chunks of knowledge, including standards, methodologies, methods, metrics, techniques, languages, patterns, knowledge related to processes, concepts, and so forth. Although these different areas of knowledge relate to the construction of an OO system, there is a lot of work still to be done in order to systematize and offer this knowledge to designers in such a way that it can be easily used in practical cases. A software architecture is a description of the subsystems and components of a software system and relationships between then.1 Usually, the software ar- chitecture is subdivided into macro and micro architecture. Whereas macro architecture describes the metamodel of design, this that provides the high- level organization, the micro architecture describes details of a design at a lower level.
  • 13. vii OO design is a software design technique, which is expressed in terms of ob- jects and relationships between those; at the level of micro architecture it in- cludes elements such as classes, its relationships, responsibilities, refactorings, and so on. OO micro architectural knowledge is built upon design experiences, such as problem solving, or lessons learned. Therefore, the OO micro architectural de- sign knowledge has grown with time and the increasing complexity of soft- ware. This knowledge expands and accumulates when it is stored in books and other media for the use of designers. In addition, the major part of OO design knowledge is difficult to identify and use. The experience has demonstrated that design often omits common prin- ciples, heuristics, and so on, with a consequent major loss of experience. Con- sequently, actually, serious difficulties are still encountered when we tackle the construction of OO systems. Although designers have accumulated a body of knowledge that they apply during these processes, this is very implicit. Fortu- nately, it is now being specified and popularized in different forms: principles, heuristics, patterns, and more recently, refactoring techniques. However, today, the difference between these concepts is generally unclear and not all of them have received the same amount of attention or have reached the same degree of maturity. In addition, a strong knowledge does not exist on items such as design principles, best practices, or heuristics. The problem confronting the designer is how to articulate all this explicit knowledge and to apply it in an orderly and efficient way in the OODA, in such a way that it is really of use to him or her. In fact, in practice, even such advanced subjects like OO patterns have this problem Design knowledge and best practices are stored in individual expert minds, or implicitly encoded and documented in local organisational processes. It has always been true that a significant part of design knowledge resides in the minds of the experts that make it up. However, communities and companies are beginning to find that it is easy to lose a vital element of their intellectual prop- erty: corporate design knowledge. Therefore, we can say that the major part of the design knowledge today is tacit knowledge: it in the form of project experi- ences, heuristics, or human competencies that are difficult to be captured and externalised. The effective management of this knowledge is today a significant challenge. For knowledge management to be effective, this knowledge should be orga- nized and classified. In addition, with this purpose, developing unified cata- logues of knowledge, ontologies, empirical studies, and so on, books and studies such as those we present here, are very important issues to improve the use of OO design knowledge. Therefore, in this context, we present this book whose main objective is to give a global vision of micro-architectural design knowledge, exposing the main tech- niques and methods, and analyzing several aspects related to it.
  • 14. viii The subject matter in this book is divided into ten chapters. The chapters seek to provide a critical survey of the fundamental themes, problems, arguments, theories, and methodologies in the field of OO micro architectural design knowl- edge. Each chapter has been planned as a self-standing introduction to its sub- ject. Therefore, in Chapter I Javier Garzás and Mario Piattini present an introduc- tion to “The Object-Oriented Design Knowledge,” where they show the main issues and problems of the field. In OO micro-architectural design knowledge, design patterns are the most popular example of accumulated knowledge, but other elements of knowledge exist such as principles, heuristics, best practices, bad smells, refactorings, and so forth, which are not clearly differentiated; in- deed, many are synonymous and others are just vague concepts. An essential issue to building an OO design knowledge discipline is organizing this knowledge. In Chapter II, titled “The Object-Oriented Design Knowledge Ontology,” Javier Garzás and Mario Piattini show an ontology that organize and relation the OO knowledge. The authors propose an ontology in order to struc- ture and unify such knowledge. The ontology includes rules (principles, heuris- tic, bad smells, etc.), patterns, and refactorings. They divide the knowledge on rules, patterns, and refactorings and they show the implications among these. Moreover, they show an empirical validation of the proposed conclusions. Chapter III, “Using Linguistic Patterns to Model Interactions,” by Isabel Díaz, Oscar Pastor Lidia Moreno, and Alfredo Matteo, is a pivotal chapter that changes the focus of the book to more technical information systems issues. This chap- ter shows an elegant example of how highly relevant clinical questions can be addressed in a scientific manner. In this chapter, heuristic-oriented techniques and linguistics-oriented techniques proposed by several authors to model inter- actions are analyzed. In addition, a framework to facilitate and to improve the interaction modeling is described. This framework was conceived to be inte- grated into automatic software production environments. It uses linguistic pat- terns to recognize interactions from use case models. The validation process used and the main results are also presented. In Chapter IV, Manoli Albert, Marta Ruiz, Javier Muñoz and Vicente Pelechano show “A Framework Based on Design Patterns: Implementing UML Associa- tion,Aggregation and Composition Relationships in the Context of Model-Driven Code Generation.” The chapter proposes a framework based on design pat- terns to implement UML (Unified Modeling Language) association, aggrega- tion, and composition relationships, and for it they propose a semantic interpre- tation of these concepts that avoids the ambiguities introduced by UML. Therefore, in “Design Patterns as Laws of Quality” Yann-Gaël Guéhéneuc, Jean-Yves Guyomarc’h, Khashayar Khosravi, and Houari Sahraoui, Chapter V, show how design patterns can be used as facts to devise a quality model and they describe the processes of building and of applying such a quality model.
  • 15. ix The chapter highlights the need for principles in software engineering, where these can be laws or theories formalizing and explaining observations realized on software. For the sake of completeness in this book, automatic verification of design knowledge is addressed in Chapter VI. Andres Flores, Alejandra Cechich, and Rodrigo Ruiz present “Automatic Verification of OOD Pattern Applications.” Chapter VII, “From Bad Smells to Refactoring: Metrics Smoothing the Way”, is authored by Yania Crespo, Carlos López, María Esperanza Manso Martínez, and Raúl Marticorena. This chapter discusses one of the current trends in refactorings: when and where we must refactor. From the bad smell concept, it is possible to discover their existence from an objective viewpoint, using metrics. The chapter presents a study on the relation of refactorings, bad smells and metrics, including a case study on the use of metrics in bad smells detection. The chapter leads to the determination where refactoring is the basis of heuris- tics and metrics, which is likely to be the single most important factor at the moment of use refactorings in the maintenance phase. Therefore, in Chapter VIII, “Heuristics and Metrics for OO Refactoring: A Consolidation and Appraisal of Current Issues,” Steve Counsell, Youssef Hassoun, and Deepak Advani cover this topic in great depth. They look at some of the issues which determine when to refactor (i.e., the heuristics of refactoring) and, from a metrics perspective, open issues with measuring the refactoring process. They thus point to emerging trends in the refactoring arena, some of the problems, controversies, and future challenges the refactoring com- munity faces. A key point to building a OO design knowledge field is to understand the sev- eral contributions to it. Since several OO metrics suites have been proposed to measure OO properties, such as encapsulation, cohesion, coupling, and abstrac- tion, both in designs and in code, in Chapter IX, titled “A Survey of Object- Oriented Design Quality Improvement,” Juan José Olmedilla reviews the lit- erature to find out to which high level quality properties are mapped and if an OO design evaluation model has been formally proposed or even is possible. The chapter is an excellent example of how performing a systematic review of the estate of art. At last, in Chapter X, “A Catalog of OOD Knowledge Rules for OO Micro- Architecture,” by Javier Garzás and Mario Piattini, several types of knowledge such as principles, heuristics, bad smells, and so on, are unified in a rules cata- log. In summary, these chapters constitute an evidence of the importance of micro- architectural design knowledge, representing important ideas in different soft- ware design areas. These are intended to be useful to a wide audience, includ- ing software engineers, designers, project managers, software architects, IS/IT managers, CIOs, CTOs, consultants, and software students.
  • 16. x We hope that the practical vision, scientific evidence and experience presented in this book will enable the reader to use the design knowledge within the field of software engineering and to help the field of software engineering answer how software engineers might acquire its rich and essential accumulated knowl- edge. Javier Garzás and Mario Piattini, Editors Ciudad Real, Spain January 2006 Endnote 1 Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996). A system of patterns: Pattern-oriented software architecture. Addison- Wesley.
  • 17. xi Acknowledgments We would like to thank all the authors, because without their contribution this book would not have been possible. We would also like to thank Kristin Roth, our development editor, for her help and encouragement.
  • 18. The Object-Oriented Design Knowledge 1 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Chapter I TheObject-Oriented DesignKnowledge Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain Mario Piattini, University of Castilla - La Mancha, Spain Abstract In order to establish itself as a branch of engineering, a profession must understand its accumulated knowledge. In this regard, software engineering has advanced greatly in recent years, but it still suffers from the lack of a structured classification of its knowledge. In this sense, in the field of object-oriented micro-architectural design designers have accumulated a large body of knowledge and it is still have not organized or unified. Therefore, items such as design patterns are the most popular example of accumulated knowledge, but other elements of knowledge exist such as principles, heuristics, best practices, bad smells, refactorings, and so on, which are not clearly differentiated; indeed, many are synonymous and others are just vague concepts.
  • 19. 2 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Introduction “Chaos is order waiting to be deciphered” ~ José Saramago Twenty years ago, Redwine (1984) commented that “an expert in a field must know about 50,000 chunks of information, where a chunk is any cluster of knowledge sufficiently familiar that it can be remembered rather than derived,” adding that in mature areas it usually takes about 10 years to acquire this knowledge. Since then, many authors (Shaw, 1990) have commented on the need for defined chunks of knowledge in the software engineering field. In this regard, the software engineering community has advanced greatly in recent years, and we currently have numerous and defined chunks of knowledge, including standards, methodologies, methods, metrics, techniques, languages, patterns, knowledge related to processes, concepts, and so on. Nevertheless, the field of software engineering is still beset by a lack of structured and classified chunks of knowledge (McConnell, 2003) and not all knowledge is transmitted, accessible or studied in the same way. For example, what and where is the enormous amount of practical knowledge regarding object-oriented micro-architectural design? We mean knowledge that has been accumulated from the experience of working with the inherent properties of software, knowledge which normally comes under what is generally accepted or “practices which are applicable to most projects, about which there is a widespread consensus regarding value and usefulness” (Bourque & Dupuis, 2004, p. A-10). Such knowledge may take the form of a source code, compo- nents, frameworks, and so on, but these are no mechanisms for obtaining designs throughout the software life cycle. At this point, many will have already identified one of the essential items of knowledge based on experience with object-oriented micro-architectural design: design patterns. These are just the tip of the iceberg. Let us simplify matters and suppose that we want to specialize as software engineers in object-oriented design. By means of projects like SWEBOK, we can now ascertain what “design” is, how it is subdivided, find the main bibliographical references, and so on, and quite easily acquire a sound theoretical knowledge. If indeed we concentrate part of our professional activity on design, we find that we need to study the practical experience of other experts in the area, and at that moment, the concept of pattern occurs to us. Yet, after examining the main pattern references in object-oriented design, we still feel that something is missing. Missing elements for the formulation of a good micro-architectural design include principles, heuristics, best practices, bad smells, refactorings, and so on. Table 1 gives an example of each of these.
  • 20. The Object-Oriented Design Knowledge 3 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Considerable progress has been made in the accumulation of experience-based knowledge of OO micro-architectural design, but we have advanced consider- ably less in its exploitation and classification. This could be seen as a case of the “Feigenbaum Bottleneck”: “as domain complexity grows, it becomes very difficult for human experts to formulate their knowledge as practical strategies” (Pescio, 1997). First, in the following section, we will analyze the maintenance and design patterns and relationship with analyzability and changeability in more detail. Later, we will show a measurement of the impact of the patterns used. In the last sections, we present acknowledgments, our conclusions and future projects, and references. The Object-Oriented Design Knowledge Serious difficulties are still encountered when we tackle the construction of OO systems, especially in the transition between the analysis processes and the OO design, an aspect which is very vague in this type of paradigm (Henderson, Seller & Eduards, 1990). In practice, designers have accumulated a body of knowledge Table 1. Examples of OO design knowledge PRINCIPLES The Dependency Inversion Principle (DIP) “Depend upon Abstractions. Do not depend upon concretions” (Martin, 1996). HEURISTICS “If two or more classes only share common interface (i.e., messages, not methods), then they should inherit from a common base class only if they will be used polymorphically” (Riel, 1996). BEST PRACTICES “See objects as bundles of behavior, not bundles of data” (Venners, 2004). BAD SMELLS Refused bequest Subclasses that do not use what they inherit (Fowler, Beck, Brant, Opdyke, & Roberts, 2000). REFACTORINGS Extract Interface “Several clients use the same subset of a class's interface, or two classes have part of their interfaces in common. Extract the subset into an interface. [ ]” (Fowler et al., 2000). PATTERNS Observer “Intent: Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically” (Gamma, Helm, Johnson, & Vlissides, 1995).
  • 21. 4 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. that they apply during these processes. Up until a few years ago, this knowledge was very implicit but fortunately, it is now being specified and popularized in different forms: principles, heuristics, patterns and more recently, refactoring, and so on. The difference between these concepts is generally unclear and not all of them have received the same amount of attention or have reached the same degree of maturity. In fact, OO design principles are often confused and few formalized. In this regard, there are few works about it, with the exception of the contributions of a few (Gamma et al., 1995; Liskov & Zilles, 1974; Martin, 1995, 1996; Meyer, 1997). Regarding OO design heuristics the main works to which we can refer are those of Riel (1996) and Booch (1996). Patterns, however, are without doubt one of the elements that have undergone the greatest evolution and proof of this is the existence of numerous publications on the theme. The application of patterns in OO began at the beginning of this decade (Coad, 1992) and was consolidated by the work of Gamma et al. (1995), Buschmann, Meunier, Rohnert, Sommerlad, and Stal (1996), Fowler (1996), and Rising (1998). Amongst the different types of patterns, we can distinguish, mainly, although other categories exist (antipatterns, specific domains, etc.): • Architectural: These focus on the structure of the system, the definition of subsystems, their responsibilities and rules. • Object-oriented analysis/design (OOAD): To support the refining of the subsystems and components as well as the relationships between them. • Idioms: They help us to implement particular aspects of the design in a specific programming language. As we already know, the use of patterns means that we can avoid constant reinvention, thus reducing costs and saving time. Gamma et al., 1995 point out that one thing that expert designers do not do is resolve each problem from the beginning. When they find a good solution, they use it repeatedly. This experi- ence is what makes them experts. However, at the present time, when patterns are used, several types of problems can occur (Schmidt, 1995; Wendorff, 2001): difficult application, difficult learning, temptation to recast everything as a pattern, pattern overload, ignorance, deficiencies in catalogs, and so forth. Refactoring techniques are characterized by their immaturity, although it is true to say that this topic is rapidly gaining acceptance, the main works in this area are Kent Beck and Fowler’s (2000), Tokuda and Batory (2001), and Opdyke (1992).
  • 22. The Object-Oriented Design Knowledge 5 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. The problem confronting the designer is how to articulate all this explicit knowledge and to apply it in an orderly and efficient fashion in the OODA, in such a way that it is really of use to him or her. In fact, in practice, even such advanced subjects like patterns have this problem. Ralph Johnson comments in this sense that “for one thing, the large number of patterns that have been discovered so far need to be organized. Many of them are competitors; we need to experiment and find which are best to use. …Analyzing existing patterns, or making tools that use patterns, or determining the effectiveness of patterns, could all be good topics” (Johnson, 2000, personal communication). These problems could give rise to incorrect applications of the patterns (Wendorff, 2001). The differences between these elements are not clear. Many concern a single concept with different names, while others on occasions do not contain knowl- edge gained from experience, and still others are simply vague concepts. This confusion leads to a less efficient use of knowledge, so concepts such as principles or heuristics are still unknown to some software engineers, few of whom understand completely their goals or relationships. This problem has been brought up at several major congresses, for example the OOPSLA 2001 Workshop: “Beyond Design: Patterns (mis)used,” where such authors as Schwanninger (2001) say “We got more and more aware that a good description of the proposed solution is necessary, but useless for the reader if the problem and the forces that drive the relationship between problem and solution are not covered properly.” Conclusion Expert designers have always used proven ideas. It is in recent years when these ideas, materialized mainly into the pattern concept, have reached their greatest popularity and diffusion. However, more knowledge exists apart from that related to patterns, although it would be true to say that this other knowledge is frequently “hidden.” We should consider that OO micro architectural design knowledge is associated with the pattern concept, but other elements exist, such as principles, heuristics, best practices, bad smells, and so forth. These other elements show a confused description, unification, definition, and so on. Therefore, few studies systematize and offer the OO design knowledge to designers in such a way that it can be easily used in practical cases. In addition, the different studies published show the elements related to design knowledge in a disconnected way. There has not been much effort made on empirical studies about OO design knowledge, and the few works we have found are mainly focused on design patterns.
  • 23. 6 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. As Shaw (1990) states, a branch of engineering must take several basic steps in order to become an established profession, highlighting understanding of the nature of knowledge. We as a discipline must ask how software engineers might acquire this knowledge. References Abran, A., Moore, J. W., Bourque, P., & Dupuis, R. (Eds.). (2004). Guide to the software engineering body of knowledge: SWEBOK. Los Alamos, CA: IEEE CS Press. Booch, G. (1996). Object solutions. Managing the object-oriented project. Red- wood City, CA: Addison-Wesley. Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996). A system of patterns: Pattern-oriented software architecture. New York: John Wiley & Sons. Coad, P. (1992). Object-oriented patterns. Communications of the ACM, 35(9), 152-159. Fowler, M. (1996). Analysis patterns: Reusable object models. Boston, MA: Addison-Wesley. Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (2000). Refactoring: Improving the design of existing code (1st ed.). Boston: Addison-Wesley Professional. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design patterns. Reading, MA: Addison-Wesley Professional. Henderson Seller, B., & Eduards, J. M. (1990). The object-oriented system life cycle. Communications of the ACM, 33(9), 142-159. Liskov, B. H., & Zilles, S. N. (1974). Programming with abstract data types. SIGPLAN Notices, 9(4), 50-59. Martin, R. C. (1995). Object-oriented design quality metrics: An analysis of dependencies. ROAD, 2(3). Martin,R.C.(1996).Thedependencyinversionprinciple.C++Report,8(6),61-66. McConnell, S. (2003). Professional software development. Boston: Addison- Wesley. Meyer, B. (1997). Object-oriented software construction (2nd ed.). Upper Saddle River, NJ: Prentice Hall.
  • 24. The Object-Oriented Design Knowledge 7 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Opdyke, W. (1992). Refactoring Object Oriented Frameworks. Illinois, Urbana- Champain. Pescio, C. (1997). Principles versus patterns. Computer, 30(9), 130-131. Redwine, S. T. (1984). DOD-related software technology requirements, practices, and prospects for the future (Tech. Rep. No. P-1788). Alexandria, VA: Institute of Defense Analyses. Riel, A. J. (1996). Object-oriented design heuristics. Boston: Addison- Wesley Professional. Rising, L. (1998). The patterns handbook: Techniques, strategies, and applications. Cambridge: Cambridge University Press. Schmidt, D. C. (1995). Experience using design patterns to develop reusable object-oriented communication software. Communications of the ACM, 38(10), 65-74. Schwanninger, C. (2001). Patterns as problem indicators. Paper presented at the Workshop on Beyond Design Patterns (mis)Used. OOPSLA, Tampa Bay, FL. Shaw, M. (1990). Prospects for an engineering discipline of software. IEEE Software, 7(6), 15-24. Tokuda, L., & Batory, D. (2001). Evolving object-oriented designs with refactoring. Automated Software Engineering, 8(1), 89-120. Venners, B. (2004). Interface design best practices in object-oriented API design in Java. Retrieved March 25, 2006, from http://www.artima.com/ interfacedesign/contents.html Wendorff, P. (2001). Assessment of design patterns during software reengineering: Lessons learned from a large commercial project. Paper presented at the Proceedings of the 5th European Conference on Software Maintenance and Reeingineering (CSMR).
  • 25. 8 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Chapter II TheObject-Oriented DesignKnowledge Ontology Javier Garzás, Oficina de Cooperación Universitaria (OCU) S.A., Spain Mario Piattini, University of Castilla - La Mancha, Spain Abstract It has been a long time since the object-oriented (OO) paradigm appeared. From that moment, designers have accumulated much knowledge in design and construction of OO systems. Patterns are the most refined OO design knowledge. However, there are many others kinds of knowledge than are not yet classified and formalized. Therefore, we feel it necessary to define ontology in order to structure and unify such knowledge; a good understanding of practical experience is crucial to software engineers. Therefore, this chapter proposes an ontology for object-oriented design knowledge.
  • 26. The Object-Oriented Design Knowledge Ontology 9 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Introduction Since Simula 67 up until the present day, knowledge related to the construction of object-oriented (OO) systems has evolved significantly. Nowadays, due to experience acquired during years of investigation and development of OO systems, numerous techniques and methods that facilitate their design are available to us. By the middle of the 1990s the first catalogue of patterns was published by Gamma, Helm, Johnson, and Vlissides (1995). The application of patterns in OO design was consolidated, among others, by the work of Coad (1992), Gamma et al. (1995), Buschmann, Meunier, Rohnert, Sommerlad, and Stal (1996), Fowler (1996), and Rising (1998). However, more knowledge exists apart from that related to patterns, and this other knowledge is frequently “hidden.” Moreover, now the exclusive use of patterns is not sufficient to guide a design, and the designer’s experience is necessary to avoid overload, non-application or the wrong use of patterns due to unawareness, or any other problems that may give rise to faulty and counterac- tive use of the patterns. In summary, when patterns are used, several types of problems may occur (Wendorff, 2001): difficult application, difficult learning, temptation to recast everything as a pattern, pattern overload, deficiencies in catalogues (search and complex application, high dependence of the program- ming language, and comparatives), and so on. In this sense, we need others’ chunks of knowledge such as principles, heuristic, patterns, best practices, bad smells, refactorings, and so on. Nevertheless, there is much uncertainty with the previous elements, and these elements have never been studied as a whole. Its compatibility has been studied nor does a method based in this knowledge exist. In order to improve OO designs, using all OO design knowledge in a more systematic and effective way, we have defined an ontology, which unifies principles, heuristics, best practices, and so on, under the term of “rule”; the ontology show the relationship among these “rules” and patterns and refactorings. We have also defined an improved OOD process, which takes into account this ontology and the OOD knowledge. Moreover, we present in this chapter an empirical evaluation of this approach. The empirical validation is based on Prechelt, Unger, Philippsen, and Tichy (1997); Prechelt, Unger, Tichy, Bössler, and Votta (2001); and Wohlin, Runeson, Höst, Ohlson, Regnell, and Wesslen (2000). This controlled experiment is ascertain if the usage of the ontology for OOD knowledge really improves the OOD process, helping in the detection of defects (rules violated) and solutions (patterns).
  • 27. 10 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Ontology An ontology describes knowledge of a domain in a generic way and provides an agreed understanding of it. Ontologies have a number of advantages: structuring and unifying accumulated knowledge, benefits for communication, teaching concepts and their relation- ships, sharing of knowledge and resolving terminological incompatibilities. It would therefore be beneficial to define an ontology for the structuring and unifying of OO micro-architectural design knowledge (see Figure 2). Before describing the ontology, we shall explain its field and scope. To this end and to avoid ambiguity, we start by referring to the SWEBOK (Abran, 2004) to ascertain where an ontology for OO micro-architectural design knowledge could fit in, to find that it falls under “software design” (see Figure 1). What is not so clear, however, is which of the five sub-areas of software design it belongs to (see Figure 1), although we do find places for two elements of knowledge: principles within “basic concepts” (“enabling techniques” in the SWEBOK text) and design patterns in “structure and architecture.” However, the place of such other concepts as refactorings is not so obvious (it is only briefly touched on in the maintenance section). As our ontology concentrates on micro-architectures, after examining the other areas, we consider the best place to be “structure and architecture,” as this is what the strategies of architectural design are focused on. Our proposition (see Figure 1) is to include a more generic area within Figure 1. Context and situation of the ontology of OO micro-architectural design knowledge according to the SWEBOK Software Design Software Engineering Body of Knowledge Basic Concepts Key Issues in Design Structure and Architecture Quality Analysis and Evaluation Notations Strategies Methods Architectural Structures- viewpoints Architectural Styles- patterns Micro Architectural Knowledge Families and Frameworks OO Micro architectural Design Knowledge OO Micro architectural Design Knowledge Function Oriented Micro architectural Knowledge
  • 28. The Object-Oriented Design Knowledge Ontology 11 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. “structure and architecture” called “micro-architectural knowledge” and divide it into OO and functional micro-architectural knowledge. Our ontology struc- tures the OO part. Entities When we start to describe the elements of the ontology, as we mentioned before, we find many terms related with essential knowledge gained from experience with object-oriented micro-architectural design, together with others arousing confusion as to whether they constitute knowledge or not. In order to clarify the situation, we have grouped the terms in question into two initial groups: • Declarative knowledge: Concepts describing what to do with a problem: Heuristics, patterns, bad smells, best practices, and so forth. • Operative knowledge: Where there is a body of accumulated knowledge concerning operations or processes for carrying out changes in software (i.e., parameterized transformation of a program preserving its functional- ity (Opdyke, 1992) including such concepts as refactoring.) Here we should stress that we mean design refactoring, not code refactoring, which is more common. Although we consider it important to group together all knowl- edge related to OO micro-architectural design, we are naturally aware that Figure 2. OO Micro-architectural design knowledge ontology OO Micro Architectural Design Knowledge name intent also known as motivation applicability consequences known uses Refactoring mechanics Declarative collaborations participants Operative sample design 1..* 1..* is introduced by 0..* 0..* is composed of Pattern structure (or solution) 0..* 0..* implies the uses of Rule recomendation (pre and pos condition) 0..* 0..* implies the use of
  • 29. 12 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. refactoring could be placed under the maintenance category in the SWEBOK. We can thus establish an initial classification of essential experience-based knowledge of software design with two parts: declarative (what) and operative (how). The former tells us what to do and the latter how, in both cases according to experience (see Figure 2, where a UML class diagram is used to express the ontology). Considering “declarative knowledge” alone without regard to design patterns, we have observed that principles, heuristics, bad smells, and so forth, have the same common structure, there being no substantial difference between them, as they all have the structure and form of a rule — they posit a condition and offer a recommendation. It should be stressed that the “recommendation” is not a solution like that of the pattern. Patterns are more formalized than rules and pattern descriptions are always broader. They propose solutions to problems, while rules are recommendations which a design should fulfill. Unlike patterns, rules are greatly based on using natural language, which can be more ambiguous (Pescio, 1997). Lastly, in order to complete the description of the entities, we will concentrate on their attributes. We based our determination of these on the terms used in Gamma et al. (1995) to describe a design pattern: name, intent, also known as motivation, structure, applicability, participants, collaborations, consequences, implementation, sample code, known uses, and related patterns. It will be observed that many of these items are common to other elements of knowledge and these common attributes are located in the top entity (see Figure 2). As to the other attributes under consideration, the structure attribute is a synonym for solution in a pattern, while we have created the recommendation attribute for rules, which would be close to the solution of the pattern (Pescio, 1997) and the mechanics attribute for refactorings, our choice of name being taken from Fowler, Beck, Brant, Opdyke, and Roberts’ (2000) refactoring catalogue. The attributes participants (the classes and/or objects participating in the design pattern and their responsibilities) and collaborations (how the participants carry out their responsibilities together) concern declarative knowledge. The sample design attribute concerns operative knowledge. The implementation attribute is substituted for mechanics (this is in refactoring, as we are dealing with design refactoring, not code refactoring). The related patterns attribute has been generalized and appears in each of the relationships between entities. In line with our ontology we have developed a unified catalog of rules, which we see in Chapter X, where in order to improve the detection of rules, these are named according to their condition.
  • 30. The Object-Oriented Design Knowledge Ontology 13 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Relationships We shall now concentrate on the relationships between entities (see Figure 2): • “To apply a rule implies the use of a pattern.” Often, when we introduce a rule, we obtain a new design, which needs a pattern. One example of this situation is the application of the “dependency inversion” rule, a principle (Martin, 1996) which introduces an abstract class or an interface, which in turn necessitates a creational pattern (Gamma et al., 1995) to create instances and associate objects in the new situation. Observe that this does not always happen (cardinality 0 to n), not all the rules imply the introduction of a pattern, a clear example of this being when we apply rules which work only inside a module, for example the “long method” rule, a bad smell according to Fowler et al. (2000). • “To apply a pattern implies the use of another pattern.” This relationship is quite obvious, since it has been featured in catalogs and pattern languages for some time. An example of this is the map of relationships between patterns presented in (Gamma et al., 1995). Observe that in this case, cardinality is from 0 to n (we can see in Gamma et al. (1995) how adapter, proxy and bridge patterns are isolated). • “The declarative knowledge is introduced by operative knowledge.” This relationship expresses that all declarative knowledge (rules and patterns) is introduced in the design by an element of operative knowledge (a refactoring); note that cardinality is from 1 to n. This is quite obvious since it does not make sense for an element of declarative knowledge to exist if it cannot be introduced. • The relationship between patterns and refactorings can be observed in an implicit way by reading some of the refactoring catalogues which concen- trate on the design level, a good example of this being the Fowler et al. (2000) catalog. Gamma et al. (1995) state that “design patterns provide the refactorings with objectives,” and there is a natural relationship between patterns and refactorings, where the patterns can be the objective and the refactorings the way of achieving them. In fact, as Fowler et al. (2000) say, there should be catalogs of refactorings which contemplate all design patterns. In this way, refactorings, such as “replace type code with state/ strategy” or “form template method,” concentrate on introducing patterns within a system (again to emphasize that these are design refactorings, not code refactorings). • The relationship between rules and refactorings has not been studied as much as that between patterns and refactorings. Generally, we observe
  • 31. 14 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. that rules are introduced in the design, just like patterns, by means of the refactorings. And in the light of what has been said previously, it becomes clearer how refactorings store knowledge about how to introduce elements in designs in a controlled way. Continuing with the example of the “dependency inversion” rule we see that in order to resolve the violation of this rule we insert an abstract entity into the design, which would be carried out with the refactorings. • “An element of operative knowledge is composed of others.” Examples of this composition can be found in refactoring catalogs such as Fowler et al. (2000) where, for example, the refactoring “extract method” is not com- posed but it is used by others (cardinality 0 to n). Lastly, we shall explain why other relationships are not included. • Relationship: “A pattern implies the use of a rule.” The introduction of a pattern must not allow a rule to be violated (applying a pattern should never reduce design quality). • Relationship: “A rule implies the use of a rule.” In a similar way to the previous case, the introduction of one rule must not allow another rule to be violated (applying a rule should never reduce design quality). • Relationship: “An operative knowledge implies a declarative knowl- edge.” A refactoring does not know what rule or pattern it uses. An Empirical Validation In this section, we will present a description of the process followed to carry out the empirical validation, which is based on Wohlin et al. (2000); Prechelt and Unger (1998); Prechelt et al. (1997); Prechelt et al. (2001); Kitchenham, Pfleeger, Pickard, Jones, Hoaglin, El Eman, et al. (2002); and (Kitchenham, Dybå, and Jorgensen, 2004). The main intention of this controlled experiment was to compare the effectiveness and efficiency of “traditional” OO design vs. the use of OO design knowledge. Moreover, we aimed at analyzing if disposing of a rules catalog that unifies design knowledge as principles, best practices, heuristics, and so on, and their relations with patterns has influence on the effectiveness and efficiency in the improving of the quality of OO micro architectures. Based on the GQM (goal question metrics) template, the goal definition of our experiment can be summarized as shown in Table 1.
  • 32. The Object-Oriented Design Knowledge Ontology 15 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Planning The experiment is specific since it is focused on one technique applied to one domain; the ability to generalize from this specific context is further elaborated below when discussing threats to the experiment. The experiment addresses a real problem, which is whether the method presented is more effective and efficient to be used in OO micro architectural quality improvement. Eighteen professionals of two companies carried out the experiment. The selected subjects were professionals having extensive experience in OO design. We classified the subjects into two groups according to their professional experience. The subjects were asked to fill a questionnaire out about their expertise, and taking into consideration the collected responses, we formed two groups of subjects, trying to have the same number of subjects with good marks and bad marks in each group. Both groups had a patterns catalog (Gamma et al., 1995), but only one of them had the rules catalog (see Chapter X). In addition to this, in a previous 30 minutes session, we explained to this group some notions about rules and their relationships to patterns and how to apply the rules catalog. For each subject, we had prepared a folder with the experimental material. Each folder contained one micro-architectural diagram and a questionnaire for an- swers. We had to consider what independent variables or factors were likely to have an impact on the results. These are OO micro-architecture. We considered two dependent variables (Thelin, Runeson, Wholin, Olsson, & Andersson, 2004): • Effectiveness: Number of defects found/total number of defects. This is the percentage of the true improvements found by a designer with respect to the total number of defects. • Efficiency: Number of defects found/inspection time, where inspection time is related to the time that subjects spent on inspecting the micro architecture; it is measured in minutes. Table 1. Definition of experiment Analyze The improvement method based on the rules catalog for the purpose of evaluating with respect to effectiveness and efficiency from the point of view of software engineers in the context of software companies in Spain
  • 33. 16 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Hypotheses Formulation Our purpose was to test two groups of hypotheses, one for each dependent variable. Effectiveness hypotheses: • H0,1. There is no difference regarding effectiveness of subjects in detecting the violation of rules using a rules catalog and their relationship with patterns as compared to subjects without using the rules catalog. // H1,1 : ¬ H0,1 • H0,2. There is no difference regarding effectiveness of subjects in detecting the application of patterns implicated by rules using a rules catalog s and their relationship with patterns as compared to subjects without using the rules catalog. // H1,2 : ¬ H0,2 • H0,3. There is no difference regarding effectiveness of subjects in detecting the application of patterns not implicated by rules using a rules catalog and their relationship with patterns as compared to subjects without using the rules catalog. // H1,3 : ¬ H0,3 Efficiency hypotheses: • H0,4. There is no difference regarding efficiency of subjects in detecting the violation of rules using a rules catalog and their relationship with patterns as compared to subjects without using the rules catalog. // H1,4 : ¬ H0,4 • H0,5. There is no difference regarding efficiency of subjects in detecting the application of patterns implicated by rules using a rules catalog and their relationship with patterns as compared to subjects without using the rules catalog. // H1,5 : ¬ H0,5 • H0,6. There is no difference regarding efficiency of subjects in detecting the application of patterns not implicated by rules using a rules catalog and their relationship with patterns as compared to subjects without using the rules catalog. // H1,6 : ¬ H0,6 Operation In this section, we will describe the preparation, execution, and data validation of the experiment. Before the day of the experiment execution, we gave a seminar to the subjects of the group that would use the rules catalog. In this
  • 34. The Object-Oriented Design Knowledge Ontology 17 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. seminar, we explained to the subjects how to apply the rules catalog. The subjects had to manually fulfill their proposed solution, writing down the start and end time of the activity. We collected the forms filled out by the subjects, checking if they were complete. Analysis and Interpretation Figure 3 shows the averages obtained from the experiment. Outliers have not been identified. In order to decide how to test the validity of the hypotheses, we evaluated if the data followed a normal distribution. The result was normal; we decided to perform a t-Student test. In Table 2 the results obtained by means of t-Student are shown. The first column represents the t-stat and the second column shows the t critical two-tail. We have obtained the following results. Firstly, it was confirmed by the t-Student test that the group with the rules catalog obtained better results in “efficacy and efficiency in detection of rules” and “efficacy and efficiency in detection of patterns implicated by rules.” In the second place, the t-Student test could not confirm that the group with the rules catalog obtained better results in “efficiency in detection of patterns not implicated by rules.” However, this group obtained better averages; we have to highlight that “efficiency in detection of patterns not implicated by rules” is not influenced by the rules catalog, since these patterns are not in the catalog because they are not implicated by rules, and the application of these patterns will result in the detection of design problems more than design recommendations. Lastly, in a similar way, we could not confirm by using the t- Student test that the group without the rules catalog obtained better results in “efficacy in detection of patterns not implicated by rules”; however, again, this result is not influenced by the rules catalog. Figure 3. Averages obtained from the experiment 0,64 0,64 0,68 0,26 0,08 0,18 0,12 0,71 0,18 0,04 0,07 0,04 0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 Efficacy in Detection of Rules. Efficacy in Detection of Patterns not implicated by rules. Efficacy in Detection of Patterns implicated by rules. Efficiency in Detection of Rules. Efficiency in Detection of Patterns not implicated by rules. Efficiency in Detection of Patterns implicated by rules. Group with catalog of rules Group without catalog of rules
  • 35. 18 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Threats to Validity A list of issues that threatens the validity of the empirical study is identified below. Conclusion Validity The results confirmed by means of the t-Student test that there was a significant difference between the two groups, and that the new approach seems to be more effective and efficient for carrying out the OO micro architectural quality improvement. The statistical assumptions of each test were verified, so that the conclusion validity was fulfilled. Internal Validity • Differences among subjects: We formed two groups, and the subjects were apportioned between these two groups according to their expertise and skills. For this reason, the subjects were asked to fill out a questionnaire about their expertise, and taking into account the collected responses, we formed the two groups of subjects. • Differences among OOD diagrams: We used only one OOD diagram. • Precision in the time values: The subjects were responsible for record- ing the start and finish times of each test, so they could introduce some imprecision but we think it is not very significant. • Fatigue effects: The average time for carrying out the experiment was 20 minutes, so fatigue effects were minor. Table 2. Results obtained by means of t-Student t stat t Critical two-tail Efficacy in Detection of Rules. 5.38887 2.26215 Efficacy in Detection of Patterns not implicated by rules. -0.22360 2.20098 Efficacy in Detection of Patterns implicated by rules. 3.36269 2.20098 Efficiency in Detection of Rules. 7.03868 2.26215 Efficiency in Detection of Patterns not implicated by rules 0.22269 2.26215 Efficiency in Detection of Patterns implicated by rules 4.35678 2.17881
  • 36. The Object-Oriented Design Knowledge Ontology 19 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. • Persistence effects: Persistence effects are not present because the subjects had never participated in a similar experiment. • Subject motivation: The subjects were very motivated. • Other factors: For instance, plagiarism and influence among subjects were controlled. External Validity Two threats to validity have been identified which limit the possibility of applying any such generalization: • Subjects: We are aware that more experiments with professionals must be carried out in order to be able to generalize these results. However, the subjects could be considered “common” OO designers at least in the context of Spanish software companies. • Material used: We believe that the documents used might not be representative of an industrial problem, so more experiments with larger diagrams are needed. Works Related with Empirical Studies About OO Knowledge There are few empirical studies and related work about this topic. The recent interest in empirical studies about patterns, mainly, or any other kind of knowledge has focused on how these factors impact on the software mainte- nance process. In this regard, the main and more important studies are Prechelt’s works that are the best example of empirical investigation about patterns. The Prechelt et al. (1997) empirical study affirms that depending on the particular program, change task, and personnel, pattern documentation in a program may considerably reduce the time required for a program change and may also help improve the quality of the change; and recommends that design patterns are always explicitly documented in source code. In Prechelt and Unger (1998), the experiments showed that carefully document- ing patterns usage is highly recommendable because it works well during maintenance and that design patterns can be beneficial even when an alternative solution appears to be simpler but that unsuitable application can also be harmful in other situations. The resulting practical advice calls to apply common sense
  • 37. 20 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. when using design patterns instead of using them in a cookbook fashion. Prechelt et al. (2001) state that it is not always useful to apply design patterns if there are simpler alternatives; they recommend using common sense to find the exceptions where a simpler solution should be preferred and even where this common sense suggests that using a patterns might not be a good idea. On the other hand, there are very few works related to empirical studies about designknowledgedifferenttopatterns.Inthissense,wecanhighlight(Deligiannis, Shepperd, Roumeliotis, & Stamelos, 2003) work, which investigated the effects of a single design heuristics (god class) on system design documents (with respect to understanding and maintainability), where the results showed that design heuristics can affect maintainability, where designs with heuristics are easier to understand and modify. According to this study, a design initially structured under heuristics has a higher probability of continuing to evolve in a resilient and flexible manner; if heuristics are violated, the probability of maintenance changes leading to poorer designs increases. Acknowledgments This research is partially supported by the ENIGMAS (Entorno Inteligente para la Gestión del Mantenimiento Avanzado del Software) project, sup- ported by the Department of Education and Science of the Junta de Comunidades de Castilla - La Mancha (Regional Government of Castile - La Mancha) (PBI- 05-058). Conclusion The motivation of the authors of the first catalog of patterns and of the community that investigates patterns has been to transfer the OODK accumu- lated during years of experience. Since then, designers have been reading and using patterns, reaping benefit from this experience. Nevertheless, more knowl- edge exits apart from patterns. We need to characterize the OO design knowledge, and we created an OODK ontology for it. An ontology describes domain knowledge in a generic way and provides agreed understanding of a domain. As Gruber (1991) said, “I use the term ontology to mean a specification of a conceptualization. That is, an ontology is a description of the concepts and relationships that can exist”.
  • 38. The Object-Oriented Design Knowledge Ontology 21 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. On the other hand, there are few empirical studies related to OO design knowledge. We presented a description of the process followed to carry out an empirical validation, which is based on the use of OO design knowledge. The main objective of this controlled experiment was to compare the effectiveness and efficiency of a “traditional” OOD process with the new OOD approach. Eighteen professionals (selected for convenience) of four Spanish companies (divided in two groups) carried out the experiment. In a previous session of 30 minutes we trained one group in the using of the new approach. For each participant, we had prepared a folder with one OO class diagram and one questionnaire, and for the members of the “new approach” group we included the OOD ontology with the main OOD “knowledge” (rules, patterns, etc.). The results confirmed by means of t-Student test that there was a significant difference between the two groups, and that the new approach seems to be more effective and efficient for carry out the OOD Process. References Abran, A. (Ed.). (2004). Guide to the software engineering body of knowl- edge: SWEBOK. Los Alamos, CA: IEEE CS Press. Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., & Stal, M. (1996). A system of patterns: Pattern-oriented software architecture. Addison- Wesley. Coad, P. (1992). Object-oriented patterns. Communications of the ACM, 35(9), 152-159. Deligiannis, I., Shepperd, M., Roumeliotis, M., & Stamelos, I. (2003). An empirical investigation of an object-oriented design heuristic for maintain- ability. Journal of Systems and Software, 65(2), 127-139. Fowler, M. (1996). Analysis patterns: Reusable object models. Boston: Addison-Wesley. Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (2000). Refactoring: Improving the design of existing code. Boston: Addison-Wesley Profes- sional. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design patterns. Reading, MA: Addison-Wesley Professional. Gruber, T. (1991). The role of a common ontology in achieving sharable, reusable knowledge bases. Paper presented at the Second International Conference on Principles of Knowledge Representation and Reasoning, Cambridge.
  • 39. 22 Garzás & Piattini Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Jurisica, I., Mylopoulos, J., & Yu, E. (1999, October). Using ontologies for knowledge management: An information systems perspective knowl- edge: Creation, organization and use. Paper presented at the 62nd Annual Meeting of the American Society for Information Science (ASIS 99), Washington, DC. Kitchenham, B. A., Dybå, T., & Jorgensen, M. (2004). Evidence-based software engineering. Paper presented at the International Conference on Software Engineering (ICSE), Edinburgh, Scotland, UK. Kitchenham, B. A., Pfleeger, S. L., Pickard, L., Jones, P., Hoaglin, D., El Eman, K., et al. (2002). Preliminary guidelines for empirical research in software engineering. IEEE Transactions on Software Engineering, 28(8), 721-734. Martin, R. C. (1996). The dependency inversion principle. C++ Report, 8(6), 61-66. Opdyke, W. (1992). Refactoring object-oriented frameworks. Thesis, Com- puter Science, Urbana-Champain, IL. Pescio, C. (1997). Principles versus patterns. Computer, 30(9), 130-131. Prechelt, L., & Unger, B. (1998). A series of controlled experiments on design patterns: Methodology and results. Paper presented at the Softwaretechnik1998GIConference(Softwaretechnik-Trends),Paderborn. Prechelt, L., Unger, B., Philippsen, M., & Tichy, W. (1997). Two controlled experiments assessing the usefulness of design pattern information during program maintenance. IEEE Transactions on Software Engineering, 28(6), 595-606. Prechelt, L., Unger, B., Tichy, W., Bössler, P., & Votta, G. (2001). A controlled experiment in maintenance comparing design patterns to simpler solutions. IEEE Transactions on Software Engineering, 27(12), 1134-1144. Rising, L. (1998). The patterns handbook: Techniques, strategies, and applications. Cambridge: Cambridge University Press. Thelin, T., Runeson, P., Wholin, C., Olsson, T., & Andersson, C. (2004). Evaluation of usage based reading conclusions after three experiments. Empirical Software Engineering, 9(1-2), 77-110. Wendorff, P. (2001). Assessment of design patterns during software reengineering: Lessons learned from a large commercial project. Paper presented at the Proceedings of the 5th European Conference on Software Maintenance and Reeingineering (CSMR), Lisbon, Portugal. Wohlin, C., Runeson, P., Höst, M., Ohlson, M., Regnell, B., & Wesslen, A. (2000). Experimentation in software engineering: An introduction. Kluwer Academic Publishers.
  • 40. Using Linguistic Patterns to Model Interactions 23 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. ChapterIII UsingLinguistic Patterns to Model Interactions Isabel Díaz, Central University of Venezuela, Venezuela Oscar Pastor, Technical University of Valencia, Spain Lidia Moreno, Technical University of Valencia, Spain Alfredo Matteo, Central University of Venezuela, Venezuela Abstract The dynamic behavior of a system is elicited, specified, and analyzed by means of interaction modelling. This activity is important for object- oriented software development because it provides the information that is required to construct the system conceptual model. Several interaction modelling techniques have been proposed. However, this activity continues to be a complex and tedious task for the modellers. These problems arise from the intrinsic difficulties of interaction modelling and the lack of effective techniques and tools to support to the modellers. In this chapter, heuristic-oriented techniques and linguistics-oriented techniques proposed by several authors to model interactions are analyzed. In addition, a
  • 41. 24 Díaz, Pastor, Moreno, & Matteo Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. framework to facilitate and to improve the interaction modelling is described. This framework was conceived to be integrated into automatic software production environments. It uses linguistic patterns to recognize interactions from use case models. The patterns were validated with expert modellers. The validation process carried out and the main results are also presented. Introduction Dynamic models fulfil an important role in the development of object-oriented software systems. These describe the behavior of a system in terms of: (1) the state change of an object, which is due to an event or the execution of an operation (intraobject dynamic perspective); and (2) how the objects should interact to provide the system with a determined behavior (inter-object dynamic perspective). This chapter is based on the study of the interobject dynamic perspective and, in particular, on the construction process of the object interac- tion models in order to describe the behavior of a system. The modelling of interactions is one of the most frequently overlooked practices in software development. While the structural model is considered to be fundamental for the analysis and design of the systems, the dynamic model is considered to be optional (Larman, 2004; Rosenberg & Scott, 1999). Neverthe- less, both models contribute two complementary views of the system design that, taken separately, would be insufficient. Our experience, which coincides with that reported by other authors, has led us to believe that this problem may have originated in the high level of difficulty of interaction modelling, especially for inexperienced modellers (Larman, 2004; Rosenberg & Scott, 1999; Song, 2001). On the one hand, modelling is an inherently complex activity that, in any case, depends on the experience and the domain knowledge of the modeller. On the other hand, the difficulty of constructing interaction models is also determined by other circumstances that are explained below. The result of a thorough review of the literature has indicated that software development approaches that describe a technique for interaction modelling are scarce. The aids offered to the modeller to facilitate the task of identifying and specifying interactions are very few when compared to the extensive descrip- tions that are made of the modelling language. The nature of the diagrams that are used to graphically represent the interaction models, generally sequence diagrams (SDs) or message sequence charts (MSCs), also constitutes an obstacle for modelling (ITU, 2000; OMG, 2003). The amount of time that must be spent on elaborating and troubleshooting these diagrams makes them tedious activities, which many modellers attempt to avoid. Model editing tools available
  • 42. Using Linguistic Patterns to Model Interactions 25 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. on the market, such as Rational or Visio, are not very flexible and do not offer mechanisms that adapt to specific graphical needs. The complexity of interaction modelling is even greater when the difficulty of maintaining consistency between this model and other structural and dynamic models of the system is added. The purpose of this chapter is to establish the basis that a generic framework created to facilitate interaction modelling and to promote this activity during system development must have. The strengths and weaknesses of the interaction modelling techniques that are commonly applied are analyzed in order to determine the requirements that this framework must fulfil. Thus, the framework is defined in the context of the contributions that other approaches have made to interaction modelling. The goal of this framework (hereafter called metamorphosis) is to provide support to modellers in the interaction model construction during the first stages of the development of a system. However, its use can be extended to the complete life cycle of the software (OMG, 2003; Van Lamsweer, 2000). Metamorphosis assumes that the system behavior specification is expressed through use case models (Nuseibeh & Easterbrook, 2000; OMG, 2003). A use case is a document written in natural language that describes part of the system functionality from the perspective of its users (Jacobson, Christerson, Jonsson, & Övergaard, 1992). The analysis or interpretation of the use cases shows how the system components exchange information so that the system has the behavior specified by the analysts (OMG, 2003; Van Lamsweer, 2000). The result of this analysis is represented using interaction models. In metamorphosis, the analysis process lies in the automatic generation of the interaction diagrams from the use cases in order to guarantee the following: (1) consistency of the interaction model itself, as well as its consistency with the corresponding use case model; (2) ease of use promoting the automatic generation of the interaction diagrams, so that the modeller can spend more time on more important tasks such as the resolution of conflicts originated by the ambiguity inherent in the use of natural language, the incorporation of supple- mentary information into the interaction diagrams (restrictions, comments, etc.), or the validation of the model obtained; (3) traceability to establish links that can be documented, controlled, and maintained, so that the modeller can determine the part of the use case text from which an interaction was generated and vice- versa; and (4) representation richness to incorporate relevant semantic information beyond the basic elements of an interaction (i.e., synchronous/ asynchronous messages, concurrence specification, repetition, or conditioning of interactions, parameter identification, consultations/updating, etc.). The metamorphosis framework must reconcile contributions from both compu- tational linguistics and software engineering to be able to fulfil the requirements described above. Computational linguistics provides metamorphosis with the
  • 43. 26 Díaz, Pastor, Moreno, & Matteo Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. natural language processing techniques and tools to recognize the elements participating in an interaction model from the use case text. Software engineer- ing provides metamorphosis with a system development orientation that is focused on the construction and the successive transformation of these models. Thus, text analysis of the use cases is defined at a high level of abstraction, making it independent from the domain of the system under development and from specific implementation considerations. In addition, it is convenient to use patterns to describe the analysis solutions. A pattern can specify the generic solution to a recurrent problem of use case analysis. The patterns are suitable resources for storing the knowledge about these solutions so that it can be reused, shared and communicated whenever this knowledge is necessary (Gamma, Helm, Johnson, & Vlissides, 1992). This chapter has been structured in five sections. The next section presents an overall view of the most representative approaches about interaction modelling as well as their advantages and disadvantages. The second section explains how metamorphosis interprets the interaction concept and describes the properties of the interaction model. The third section explains the process of extracting information from the use cases, and the strategy followed to transform them into interactions. It also presents an example of the application of the transformation framework. The fourth section describes an experiment performed to validate the transformation patterns as well as some of the results obtained. The last section presents the lessons learned and future directions. Interaction Modelling Techniques: An Overview In general, approaches that propose interaction modelling as a resource to develop systems emphasize the description of the syntax and semantics of its elements; however, they barely explain how this model can be constructed. Some approaches have attempted to answer this question by formulating procedures to aid modellers in their work. In this study, the procedures set forth by these approaches will be referred to by the generic name of interaction modelling techniques regardless of the scope, formality or level of complexity (Rumbaugh, 1995; Wieringa, 1998). Interaction modelling techniques can be characterized as being based on: (1) a heuristic application, using a step-by-step guide in the construction of interaction models (heuristic-oriented techniques); or (2) the use of linguistic information, as a way to identify and to specify interactions (linguistics-oriented techniques). The purpose of this type of classification is to simplify the analysis and to determine the strengths and weaknesses of these techniques.
  • 44. Using Linguistic Patterns to Model Interactions 27 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Heuristic-Oriented Techniques One of the pioneers in the use of interaction models to describe the behavior of a system was Jacobson, whose object-oriented software engineering (OOSE) method introduces object interaction diagrams (Jacobson et al., 1992). These diagrams are prepared for each use case after preparing their robustness diagrams. A robustness diagram shows the entity classes, interface (or bound- ary) classes, and control classes of each use case, and the possible dynamic relations between these object classes, including the participation of the actors. To construct the object interaction diagrams, the OOSE method suggests going through the following steps: (1) partitioning the use case text, and placing these fragments on the left side of the diagram; (2) placing the use case actors; (3) adding the interface and control objects identified in the robustness diagram; (4) adding the entity objects of the use case identified in the robustness diagram; and, (5) identifying the messages exchanged by the classes for each piece of text of the use case (each piece of text is located on the left side of the diagram, near the identified messages). The OOSE method transfers the complexity of elaborating interaction diagrams to the robustness diagrams. However, the method does not offer further help to construct the robustness and interaction diagrams; therefore, the identification of the interactions (step 5) remains unresolved. Furthermore, the interaction diagrams are troublesome to prepare due to the use of different types of classes and the incorporation of the pieces of text of the use cases. Rosenberg and Scott basically follow the same procedure described by the OOSE method for modelling interactions (Rosenberg & Scott, 1999). In an attempt to facilitate the recognition of messages, they suggest the use of class- responsibility-collaboration (CRC) cards (Wirfs-Brock, Wilkerson, & Wiener, 1990). This strategy helps in determining the operations of a class, but it is not performed in the context of message exchange. Thus, the CRC cards cannot guarantee the identification of all the necessary operations for the system to adopt certain behavior. Another process that proposes the construction of SD as part of the analysis and design activity of the system use cases is the rational unified process (RUP) (Jacobson, Booch, & Rumbaugh, 1999). The procedure set forth in the RUP offers no substantial differences with respect to the techniques described previously. The Ambler technique formulated to facilitate SD construction is similar to the RUP technique (Ambler, 2004). A similar process is carried out during the requirements analysis phase of the OO method (object-oriented method) (Insfrán, Pastor & Wieringa, 2002; Pastor, Gómez, Insfrán, & Pelechano, 2001). The main activity of this phase is the elaboration of SD, which is based on a characterization of the information
  • 45. 28 Díaz, Pastor, Moreno, & Matteo Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. contained in the system use cases. The paths of the use cases describe actor/ system communication actions (actions performed by the actor or the system to exchange information) or system response actions (system actions that are potentially capable of changing the system state). The SD of the OO method uses the Unified Modelling Language (UML) and distinguishes the types of object classes introduced by Jacobson: entity, boundary and control classes (Jacobson et al., 1992; Rosenberg & Scott, 1999). The steps that the modeller must perform are the following: (1) to prepare a SD for each of the use case paths (one for the basic path and one for each alternate path); (2) the use case actors participate as classes in the SD; (3) each actor/system communication action of the use case is represented through one or more messages between an actor class and a boundary class (which is usually called system); (4) each use case action of the system response type is represented in the SD by one or more messages between the boundary class and the entity classes, or by one or more messages between entity classes. As in the above-mentioned approaches, the OO method provides no further help to recognize the entity classes or the messages that they exchange. The technique proposed by Larman uses system sequence diagrams to represent the use case scenarios (Larman, 2004). These diagrams show the interaction between the actor and a generic entity called system. This entity acts as a black box that hides the system internal structure. Each identified interaction must later be analyzed using patterns. A pattern explains in detail how this interaction can be broken down into one or more messages between system objects. The SD uses the UML and does not distinguish the types of objects in an explicit way. Larman’s idea based on patterns is novel and seems effective. Nevertheless, it lacks both a systematic process to be able to apply conveniently these patterns and a catalog containing the patterns corresponding to the most representative interactions. Song sets forth the application of the ten-step heuristic on sequence diagram development (Song, 2001). The application of this technique requires the prior preparation of the system object model and the use case model (diagrams and textual specification). It uses the UML to represent the SD in which the types of objects (entity, control, and boundary) are distinguished. The steps of this technique can be summarized as follows: (1) the message initiating the flow of events is sent by the actor to the system; (2) a primary boundary object and a primary control object are defined for each use case; if needed, secondary objects (boundary or control) are created; (3) a secondary control object is defined for each use case that is included or extended; (4) the problem-solving operations (creation/destruction, association forming, or attribute modification) are identified in the use case; and (5) each message is named and supplied with optional parameters. To identify the types of problem-solving operations, Song suggests highlighting the verbs in the use case text and selecting those that
  • 46. Using Linguistic Patterns to Model Interactions 29 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. indicate actions that were formulated to solve the problem. These verbs can be considered as names of potential problem-solving operations. This technique can be considered a step forward with respect to other techniques, because it is more thorough in identifying instances and in recognizing messages (through the problem-solving operations). However, Song’s technique leaves two questions unresolved: how to identify the sending and receiving classes of these messages and how to deduce an interaction composed by more than one message from a single verb. Hilsbos and Song have improved their initial proposal with the tabular analysis method (TAM) (Hilsbos & Song, 2004). The introduction of this method attempts to answer the two preceding questions. The TAM lies in applying heuristics to complete a seven-column table before constructing the SD of each use case. Each column respectively indicates the number of each step of the use case, the action described in that step, the name of the message, its parameters, its restrictions, its sender, and its receiver. Initially, messages that are always sent and received by the actor or the system are obtained from the table. Then, this information is refined by breaking down each of the messages in terms of other messages that have been established between the primary control object and entity objects, or between two or more entity objects. To support the task of identifying these messages, the guidelines that recognise the problem-solving operations presented in Song should be followed (Song, 2001). The TAM facilitates the organization of the information obtained from the use cases. However, it supplies no further help for the modeller to recognize this informa- tion. The graphic representation of the SD can be carried out with the information contained in the table. Linguistics-Oriented Techniques In recent decades, many approaches have relied on natural language processing techniques to facilitate the development of software systems (Boyd, 1999; Chen, 1976; Métais, 2002; Rumbaugh, Blaha, Premerlani, Eddy, & Lorensen, 1991). In this section, we refer to those approaches that are based on the linguistic properties of a text to obtain information and that allow the automatic construc- tion of models (Burg & van de Riet, 1996; Juristo, Moreno, & López, 2000; Overmyer, Lavoie & Rambow, 2001). More specifically, we study the ap- proaches that allow dynamic models to be obtained from system behavioral specifications written in unrestricted natural language (Burg & van de Riet, 1995; Flield, Kop, Mayerthaler, Mayr, & Winkler, 2000). To facilitate this review, we distinguish two groups. The first group includes first-generation proposals that do not set forth a procedure to directly derive the system interaction
  • 47. 30 Díaz, Pastor, Moreno, & Matteo Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. model. The proposals representing this group are: Color-X (Burg & van de Riet, 1995; Dehne, Steuten, & van de Riet, 2001), NIBA (Kop & Mayr, 2002), and the behavior model presented in Juristo et al. (2000). These works are very interesting from the perspective of natural language processing; however, they are not studied in this chapter, as these approaches do not allow the direct deduction of complete interaction models. They use intermediate models to give information to the modellers so that they can later obtain the interaction models. The second group of linguistic-oriented techniques includes second-generation proposals. They have been especially created to deduce interactions from use cases, such as the works of Feijs and Li, which can be considered referential for our research (Feijs, 2000; Li, 2000). Feijs establishes correspondences between some types of sentences written in natural language and MSC (ITU, 2000). A use case is considered as a sequence of sentences, each of which is associated to a semantically equivalent type of MSC. A sentence has a specific syntactic structure that contributes information about active and passive objects, values, instance identities, properties (attributes), methods, and events. This information has a counterpart in its corresponding MSC. Sentences are classified as information, action, or state. They describe information exchange, object handling, or state, respectively. A context-free grammar is defined, and a set of correspondence rules is proposed between the syntactic components of each sentence and the elements of an MSC. It assumes the preexistence of a domain object model to ensure the terminological consistency of the use cases. The proposal does not address the identification of message arguments, nor does it study conditional sentences, iterations, or relationships between use cases (extension and inclusion) and their respective equivalents in an MSC. Li also sets forth a semiautomatic process for deriving SD from the textual descriptions of the use cases. The text of the use case is normalized. The description can only use sentences with a single subject and a single predicate or action. The translation partially generates a set of instances and some of the messages that are exchanged. The SD must then be completed manually by the analyst. This proposal takes into account conditional sentences and iterations, but it does not address the relationships between use cases (extension and inclusion). An Outline of Interaction Modelling Techniques Each of the techniques studied reveals the trends followed in areas such as software engineering, which serves as the framework for heuristic-oriented techniques.
  • 48. Using Linguistic Patterns to Model Interactions 31 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Therefore, the predominant aspect of the heuristic-oriented techniques is the use of models that are especially created to both specify and analyze system dynamic behavior. The information used to generate the interaction diagrams is obtained from an initial model that describes the system domain. The semantic richness of the modelling language acquires importance. Thus, most heuristic-oriented techniques coincide in the following: 1. To differentiate the instances that participate in these diagrams, using Jacobson’s classification on control, boundary, and entity objects (Jacobson et al., 1992). 2. To establish close semantic relationships between some of the model abstractions from which information is extracted and the abstractions of the obtained model (i.e., the actor in the use case model is an element in the interaction model having the same meaning). 3. To derive the interactions using information from the use case model. A use case is considered as an analysis unit to derive interaction diagrams. 4. To use the object model to facilitate the identification of the instances that participate in a SD and to ensure the consistency of the models. 5. To establish structural correspondences between the elements that de- scribe both the use case model and the interaction model (i.e., a control object is created for each use case included or extended). 6. To set up heuristics or rules to obtain the interaction model. The application of these rules depends exclusively on the modeller’s criterion, personal experience, and domain knowledge. 7. To facilitate the graphical representation of the interaction models with the aid of tools. The tools do not support the automatic generation of these representations or the handling of the model consistency. Computational linguistics has served as the basis for linguistics-oriented tech- niques. In particular, the second-generation outline of these techniques has been adjusted to the most important characteristics of the heuristic-oriented tech- niques. Thus, second-generation linguistics-oriented techniques synthesize the properties of all the other techniques, overcoming many of their weaknesses. They have adopted a model-oriented approach, both to describe the information extraction source and the interaction representation. Syntactic analysis has been considered as a fundamental resource for generating the interaction model. The main characteristics of second-generation linguistics-oriented techniques are thefollowing:
  • 49. 32 Díaz, Pastor, Moreno, & Matteo Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. 1. The use case model is used to extract information. This model is widely known and has been developed to specify system behaviors. 2. The dynamic model generated is based on the basic primitives for interac- tion representation (instances, messages, and parameters). 3. In addition to the information provided by the syntactic analysis of the use case sentences, the interaction deduction process uses the system struc- tural information. 4. The second-generation linguistics-oriented techniques presume the support of a tool that allows the (semi)automatic generation of the interaction diagrams. The modeller’s participation is then limited to completing the generated diagrams and validating them. New Alternatives In spite of the contributions of the interaction modelling techniques, they have some weaknesses that should be eliminated in order to improve this activity. The creation of the metamorphosis framework attempts to fulfil this goal. Therefore, the metamorphosis definition must: (1) overcome the limitations of the interaction modelling techniques that have been proposed until now; (2) take into account the strengths that these techniques have demonstrated; and (3) utilize the current proposals in software engineering and computational linguistics to enrich the interaction modelling techniques. These three factors have contributed to determi- nate an outline for the metamorphosis framework. This outline has the following characteristics. Model-centered transformation architecture. Until now, use case information extraction and interaction diagram generation have been described through a set of rules that apply the techniques. The information source and the form that it takes later on are not treated as models when specifying the deduction process. This produces some inconveniences that affect the efficiency of the systems that provide support to these techniques; this not only makes maintenance difficult, but it also makes the code evolution and generation tasks more complex. Great interest in model-driven approaches that are based on the automatic transformation of models has recently emerged. In this software development paradigm, the models and their transformations are specified at a high abstraction level, separating the system structure and behavior from its implementation and supporting evolution, refinement, and code generation (Kleppe, Warmer, & Bast, 2003). Following this approach, metamorphosis proposes the automatic generation of a target model (the interaction model) from a source model (the use case model). The model definition is abstract at the metamodel level so that the transformation does not depend on the technological aspects nor on a specific domain.
  • 50. Using Linguistic Patterns to Model Interactions 33 Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited. Linguistic orientation. Metamorphosis uses natural language processing to support information extraction from the text of a use case (Boyd, 1999). Currently, natural language processing is a mature area of computer science that provides techniques and tools to perform this task efficiently (Métais, 2002; Mich, Franch, & Inverardi, 2004). Based on patterns. Metamorphosis attempts to capture the transformation knowledge by means of patterns (Gamma et al., 1992). These patterns are going to describe how each sentence of a use case is transformed into interactions. In metamorphosis, a pattern is a reusable and generic specification that can be implemented using any programming language and integrated into several automatic software production environments. Role-driven. Metamorphosis provides special meaning to the modelling ele- ments by means of role definition. The roles contribute to the recognition of these elements at model-time and facilitate the understanding of the patterns (France, Kim, Ghosh, & Song, 2004; Gildea & Jurafsky, 2002). Flexible normalization. The normalization process requires use cases to be written using only a previously known set of syntactic structures. Imposing such a restriction facilitates the information extraction process and allows the elimination of the potential ambiguities generated by the use of natural language (Ben-Achour, Rolland, Maiden, & Souveyet, 1999; Berry & Kamsties, 2004; Rolland & Ben-Achour, 1998). Nevertheless, the advantages achieved by imposing this normalization on the language reduce the expressive capability of the system specification. Therefore, establishing restrictions could only be justified as a means to ensure the quality of the use cases, in terms of their completeness and correctness. Furthermore, this quality could be ensured through using other resources without overloading the modeller with this responsibility. Metamorphosis proposes to make the normalization process of use cases flexible by means of: (a) a tool guiding the modeller in the use case editing process; or (b) automatically identifying text ambiguities (structural or semantic) and resolving them (i.e., transforming it; marking it with information to clarify its semantics; classifying doubtful text; etc.). UML compliant. Metamorphosis uses UML because this language allows us to specify models and transformations that can be comprehended and applied by many modellers and tools. The UML semantics and syntax is currently a de-facto standard due to its widespread use (OMG, 2003). Furthermore, the UML 2.0 version thoroughly describes the interaction concept taking into account the necessary semantics and notation to represent both the SD and the MSC. Interactions in the UML 2.0 version can be represented graphically using: sequence diagrams (that synthesize the properties of the MSCs), communica- tion diagrams, or interaction overview diagrams (OMG, 2003). For simplicity, in this chapter, we use the generic terms sequence or interaction diagram to refer to the graphic representation of the interactions.
  • 51. Another Random Scribd Document with Unrelated Content
  • 52. career on the turf. His racing stud was notable, and rarely a year passed without adding to its reputation. He also amused himself with politics and society. Devoted to Ishbel for years before he could marry her, he was now as completely happy as a man may be whose wife is giving a large part of her energies to a cause of which he fastidiously disapproves. Broadminded, he was quite willing that all women outside of his particular circle should vote, but wished that his ancestors had settled the question and spared his generation. Astute in all things, however, he not only gave his wife her head up to a certain point, but of late had done what he could to help rush the thing through and have done with it. Ishbel, like Julia, was pledged to ignore the detested subject during this brief vacation. “Jolly place, Munich,” he observed. “We always come here in August for the Wagnerfeste. You see all Europe as well as hear good music in comfort, which is more than you could ever say of Baireuth. We’ve never been here in winter before. Have you read up a bit? There ought to be good winter sports in the mountains.” “Rather. I don’t fancy Mr. Tay was here an hour before he discovered there was tobogganing (rodelling) and skiing at Partenkirchen. He’s talked of little else.” “Good! Then we’ll be really happy for a week.” Meanwhile Ishbel was gently extracting a declaration of Tay’s intentions toward Julia by the diplomatic method of assuming all. “It is too dreadful that you will take Julia from us,” she said plaintively. “Couldn’t you live in London?” “Not yet.” Tay turned upon her a face of almost boyish delight. “But if she’ll really have me, we could come over every summer. Do you think she will?” “In the end, of course. I’ve known Julia for sixteen years, and waited for her to fall in love. She never does anything by halves. But she may think she can’t leave England yet.” “I wish these women didn’t take themselves so seriously,” said Tay, viciously. “One would think the fate of England depended on them.”
  • 53. Ishbel laughed. “How like Eric! But we are used to the sixteenth century masculine attitude. It wouldn’t matter so much about me, except that every one of us helps to swell the total, but Julia is a great leader, with a wonderful power of attracting attention, making recruits, and inspiring her followers. We couldn’t spare her if the fight was to go on, but if it is won this year—well, I have told her to go and leave the rest to the other women in command.” “Oh, you have! Bully for you! What did she say?” “She wouldn’t commit herself. If I were you, I’d simply marry her.” “So I shall, if I’m convinced she really cares for me.” “You don’t doubt it?” “I don’t know. She’s a puzzle to me. Sometimes I think she’s the most natural being on earth, and at others—well—the so-called complex women aren’t in it.” “She’s both, but none the less interesting.” “Oh, she’s interesting, all right. But she’s become such an adept at bluffing herself that I doubt if she always knows just where she’s at. Just now she’s bluffed—or hypnotized?—herself into thinking she’s interested in me. But I have an idea she could switch off in the opposite direction as easily.” “Julia is a bit odd,” admitted Ishbel. “Especially since she came back from the East. Even before she went, she wasn’t much like anybody else, owing, no doubt, to that strange old mother of hers; but au fond she’s the most loyal and sincere of mortals. And it takes matrimony—a love-match—to clear a woman’s brain of cobwebs. Marry Julia and take her to the young world, and I’ll venture to say she’ll forget all she learned in the East, and a good part of her inheritance. Then she’ll be the most charming of women.” “That’s the way I talk to myself when I’m not in the dumps. But do you really want her to marry an American? It would be more like you to want to keep her over here.”
  • 54. “I did once plot and scheme to make her marry a very dear friend of us all, Lord Haverfield—Nigel Herbert—you must have read his books.” “Ah!” “That was rather imprudent of me. But it’s all over long ago. Julia never cared for him, and I have always said that when she did care for any man, I’d turn match-maker in earnest and do all I could to help him marry her—that is, if I liked him—and we’re all quite in love with you.” She flashed the sweetness of her charming countenance on him, and he thought her almost as beautiful as Julia. “I want her to be happy, for she was once terribly unhappy. Her experience was truly awful —” “I never want to think of it,” said Tay, hastily. “I refuse to remember that she has ever been married. Look at here—will you promise to be on my side if she goes off on one of her tangents?” “I will!” and she gave his hand a little shake. She longed to tell him that France might die any minute, but she had once more given her word to Bridgit, and could only hope that France would take himself off before Tay left England. “But if the worst comes to the worst, I’ll get round it somehow,” she thought. A moment later a rapid change of partners was effected, Tay threw his arm lightly round Julia’s waist, and they waltzed down the lake to the amazement of the less agile Germans. “Suppose you look up,” said Tay. “If you’re blushing because I have my arm round you for the first time, I’d like to see it.” Julia laughed and threw back her head. She was blushing, and her eyes sparkled. “I’ll admit I never felt so happy in my life.” “Are you as much in love with me as you were two days ago?” he asked dryly. “Oh—rather more, I think.” “If you like the sensation of my arm round you at a temperature of ten above zero, in full view of all Munich, can you imagine the
  • 55. ineffable happiness of being kissed by me in the vicinity of one of those tiled stoves with the door shut?” “Then if all these people should suddenly disappear, you wouldn’t care to kiss me in the midst of this enchanted wood?” “I’d kiss you wherever I got a chance, and what’s more I’ll do it. So prepare yourself.” “Your promise!” “Promise nothing. I absolve myself right here. And you talk Suffrage if you can!” “Alas, I don’t want to. But I shan’t let you make love to me.” “Oh, yes, you will,—when and where I please.” Julia looked a little frightened. “Oh, no—we mustn’t go that far —” “You merely want to flirt and make me miserable? Well, I’ve had just as much of that as I propose to stand. You’re laying up a frightful retribution, my lady.” He tightened his clasp and drew her as close as the skates would permit. “Be consistent,” he whispered. “You are eighteen. You remember nothing. We are really engaged, you know. You are mine this week. We have four days more. Put that imagination of yours to some good use. Believe that we are to be married this day fortnight.” “If I go too far—you would never forgive me.” He laughed grimly. “If you go that far, you’ll go farther. Of course I understand you. It’s a proof of the adorable innocence you have managed to preserve that you don’t know what playing with fire means to the man. You propose to abandon yourself discreetly, get a certain excitement out of words and coquetry while we’re here safely chaperoned, and then throw me down hard in the cause of duty when we return to London. Well, that’s not my program. Now, we’ll say no more about it.” They climbed up the interior of the great statue Bavaria, in the afternoon, to gaze at the tumbled peaks of the Alps glittering through the haze that promised fine weather. Then the women
  • 56. rested for the opera of the evening, and Tay and Dark smoked in one of the cafés, talked horse and business, and, incidentally, drifted into a friendship that was to lead to strange results. Dark had influential friends in the City and promised Tay his immediate assistance in bringing his prospective partners to terms. Tay, who liked sport as well as most American men, although he had little time to devote to it, forgot that he was in love while “swapping” stories of the race-track. Both, secretly despising the other’s nationality, discovered that when men are men they are pretty much the same the world over. They cemented the bond by cursing Suffrage with all the epithets, profane, picturesque, savage, and humorous, in their respective vocabularies, and left the café arm in arm, feeling that they had talked woman back into her proper sphere and that all was well with the world.
  • 57. X Those were the last days of the Munich Opera-house in all its glory. Mottl, prince of conductors, was alive; Fay, Preuse-Matzenauer, Bosetti, Bender, Feinhals, the incomparable Fassbender, sang every week, and, now and again, Knote and Morena. To-day death and disaster have overtaken that great company, and few are left to make the pilgrimage to Munich worth while. “Die Walküre” was given on Monday night, and included nearly all of the staff. The hotel portier had reserved seats for the English party in the first row of the balkon, and they had a full view of a typical Wagnerian audience. In these days, owing no doubt to the American residents, the entire auditorium, as well as the balkon and loges, was well dressed. No more did the hausfrau come in her street costume of serviceable stuff turned in at the neck with a bit of tulle, but made shift to wear a demitoilette of sorts, and light in color even if of mean material. The fashionable Müncheners outdressed the Americans and occupied the first row of the balkon and the loges. Even the royalties presented a far better appearance than in the old days, and the large number of officers present alone would have given the house a brilliant appearance. The upper tiers were picturesque with the girl students in their Secessionist costumes and bazaar heads, the men with their untidy hair and flowing ties. But the crowning grace of the “Hof” at all times is that no one is allowed to enter after the overture begins, nor dares to speak until the curtain goes down. Julia had carefully arrayed herself in her most becoming gown, a white Liberty satin under pale green chiffon, so casual in effect that it looked as if held together by the sheaf of lilies-of-the-valley on the corsage. Ishbel was resplendent in black velvet and English pink; and the party was the cynosure of the audience below, standing with its back to the stage and frankly inspecting the balkon until the last bell rang and the lights went out.
  • 58. The tenor was wrenching the sword from the tree, and Fay was standing with her famous arms rigidly aloft, in one of the prescribed Wagnerian attitudes, when Tay saw Julia move restlessly, sit forward with a frown, and then sink back with an expression of sadness so profound that he longed to ask what ailed her now, but had no desire to be hissed down or put out by the fat doorkeeper. When they were in the buffet, however, during the first pause, and he had walked up two trains and nearly lost his cufflinks in a determined effort to procure ices, and they were alone at a table in a corner, he referred to the incident, if only to prove that no performance, no matter how great, could divert his attention from her. “Oh, I was only thinking,” said Julia. “I wonder where the Darks are?” “Engaged in a wrestling match, probably. Aren’t you always thinking? What struck you so suddenly in the middle of that alleged dramatic scene where the fat man, purple in the face, was struggling to get a tin sword out of a paper tree and trying to sing at the same time? Never was so excited in my life.” Julia laughed. “I was sure you were not musical.” “You insult San Francisco. We are the most musical people in America. The very newsboys whistle the opera tunes. But I like to see a decent sense of the proprieties observed. Those two could have said all they had to say in five minutes. Set to music, it should take about fifteen. However— Tell me what struck you all of a heap.” “Oh—well—I—” “Shoot!” “What?” “More slang. Fire away.” “Do you expect to know all my thoughts?” “I don’t, but I’d like to.” “I wonder! However—I don’t mind telling you. It occurred to me rather forcibly how much simpler women’s problems were in those days. Two young people, isolated from the world, meet and
  • 59. spontaneously fall in love. They are creatures of instinct, and ignorant of any law except Might. A sleeping potion in the savage husband’s nightly horn settles that question, and they run away into the forest and are happy—would be happy forever more if let alone. But in these complicated days—all our obstacles are inside of us! Any one can find courage to defy the primitive and obvious —” “Plenty of primitive people right in the midst of civilization,” interposed Tay, grimly. “Yes, I know, and in your country divorce is easy. But for the highly civilized, life, even with divorce, is anything but easy. Women question that condition called happiness when it would appear to offer itself, examine it on all sides. They know men too well—life— above all, themselves. Or they have assumed impersonal duties and responsibilities. Or their brains have become so complex that love alone cannot satisfy. They would have love plus far more! If the choice must be made, they dare not cast for love, in their fear of disaster. Nothing is so dishonest as the so-called psychological novel, which leaves two thinking moderns in each other’s arms at the end of a forced situation, with their natures unchanged, all their problems—their inner problems—unsolved. They never can be solved by love, marriage, children, the good old way. The sort for whom all problems can be treated by the conventional recipe are not worth writing about. But it is a terrible proposition; for these highly civilized women have the automatic desires of their sex for love and happiness—intensified by imagination! But—they know that a greater need still is to fill their lives and use their brains.” Tay had turned pale. “The modern man, unless he is an ass, gives his wife her head.” “That is beside the question. The real trouble doesn’t sound particularly attractive when put into plain English: it is the raising of the ego to the nth power that makes these women want to stand alone, resent the idea of finding completion in a man.” “Then let us pray that they will all die old maids, and their race die with them.”
  • 60. “No hope! Children of the most commonplace parents are the products of their times. Heredity is modified from generation to generation. Otherwise, we should all be Siegmunds and Sieglindes. Their little brains are impregnated by forces seen and unseen. Hadji Sadrä would explain it by the theory of reincarnation, or by planetary conditions at birth—the only reasonable explanation of Shakespeare, by the way, if he wasn’t Bacon. But although, no doubt, many of the great do return to complete their work, there are not enough to go round. And there is a simpler explanation. In these vibrating days the very air is flashing and humming with secrets for those that have the magnet in their brains. Bright minds learn from life, not from their old-fashioned parents. Oh, the breed will increase, not diminish! Happiness, old style, is about done for. Women will be happier in consequence—or in another way. I don’t know about men. They have reigned too long. And then they are simple ingenuous creatures, the most tyrannical of them, and pathetically dependent upon women. Women are growing more independent every day, more indifferent to that sex ‘management’ of men, which so far has constituted a large part of man’s happiness.” Tay was angry, therefore more jocular than ever. “Don’t forget the adaptability of even the male animal, also that man is born of woman; also brought up by her. I don’t worry one little bit about the future happiness of man. As for the Home—apartment-houses and the decline and fall of servants have about relegated it to the last stronghold of the old-fashioned love story—the country town. I said just now that I’d like to know all your thoughts. Well, I shouldn’t. My idea of happiness is a lifetime with a woman who would always be more or less of a mystery, who would have her own life—inner and outer—as I should have mine. And I’m not so sure that mine would be simple and ingenuous. Marriage with her would be a sort of intense personal partnership, with separations of irregular recurrence and length. Then, my lady, there would be a constant ache; passion would never wear itself out; and neither would be looking for novel affinities elsewhere.”
  • 61. Julia smiled. “It sounds very enticing. But that isn’t the point. The subtlest enemy—it is that desire to find our highest completion alone.” “A bully good phase for the next world. Something to look forward to. The Fool’s Paradise in this life is the grandest failure on record. Men and women are not constituted to perfect by their lonesomes. Otherwise the mutual attraction of sex would not be what it is. No woman that a man wants was ever intended to complete herself; nor can she become so highly developed in this life as not to find it quite safe to follow her instincts on her own plane.” The second bell had rung and the buffet was nearly empty. He leaned across the table and brought his face close to hers. “If you are dead sure that I never could make you happy, that you never could love me, that you haven’t a human instinct that I could gratify, then chuck me. But if you are only psychologizing on general principles, then chuck that as fast as you can. I don’t want to hear any more of it, and I shan’t pay any more attention to it hereafter than if you were speculating about possible grandchildren inheriting a taste for drink from your brother. Switch off! You are eighteen.” Julia sprang to her feet with a laugh, her seriousness routed. “Right you are! Come, or we’ll be locked out.” Both Dark and Tay stolidly refused to remain for the last act, and the party went to the best of the restaurants for the supper, which was to take the place of dinner; the opera had begun at six o’clock. The meal was cooked by a chef, and they lingered over it until long after the Wagnerites were in bed. Dark and Tay were in the best of spirits, for however they might love music, they loved dinner more; Julia and Ishbel, who were disposed to be sulky, soon recovered, and the party was so gay that even the yawning waiters smiled and felt sure of recompense. When they finally left the restaurant, Munich might have been the tomb of its history. Not a cab was on the rank. Not a policeman was to be seen. When they reached the small paved square before the loggia, Dark threw his arm about Julia, and they waltzed until Tilly must have longed to step down and join them. A delighted giggle did come from the sentry-boxes
  • 62. before the side portals of the palace as Tay and Ishbel followed the example of their companions. It is not often that the Munich night is disturbed by anything more original than roistering students. The moon was out, the cold air crisp. They could have danced for an hour, but Ishbel suddenly reminded them that they were to start for Partenkirchen in a few hours, and they raced one another to their hotel.
  • 63. XI They spent the rest of their week at Partenkirchen, a village in a mountain valley, surrounded by a chain of glittering peaks. The village was little more than one steep street bordered by inns and shops, but there were farms in the valley and on the nearer hillsides. The natives wore high fur caps, not unlike the cossack headgear, and seemed to exist for decorative purposes only, although alive to the lure of tourist silver. The hotel at the top of the street was very modern, with a good cook, little balconies for those that would enjoy the view, and many nooks in the rooms downstairs for those that would talk unhindered if not unseen. At this season there were no other English or Americans, but a sufficient number of Europeans of the leisure class to make the dining-room brilliant at night and animated at all times. Julia and Ishbel had provided themselves with short white skirts of thick material, white men’s sweaters, and white Tam o’ Shanters. The men couldn’t wear white, but looked their best, as men always do, in rough mountaineering costume. They climbed, skated, skied, and tobogganed; and, under Julia’s gentle manipulation, kept close together. It was natural that Tay should fall to Ishbel in their outings, and only once or twice did he manage to drag Julia’s sled up the hill, or direct her uncertain footsteps when on the snow-shoes. Then she was so excited with the new sport that she paid little attention to him. She threw herself into it with the zest of a child, and he couldn’t flatter himself that her merry laugh was forced, nor the dancing lights in her eyes. Nor was he depressed himself by any means; the tonic air went to the heads of all of them, and they enjoyed themselves with an abandon possible only to those that have seen too much of life. But on the last day, Ishbel, who saw through Julia’s manœuvres, deliberately stayed in bed with a headache, and Dark, without
  • 64. warning of his intention, departed early with a guide. Tay and Julia met alone at the breakfast table. “Now!” he said gayly. “I’ve got you. What are you going to do about it? If you shut yourself up in your room, I’ll break the door down.” “As if I’d do anything so silly. How I wish we could stay here a month.” “Why not?” “I left no address, and I may have stayed too long already —” “Sh-h!” “You could not, either.” “Oh, yes, I could. Dark has been pulling wires, and I’m dead sure now that the thing will go through.” “I’m so glad! But no doubt you could have managed it by yourself sooner or later. I fancy you’ll always be a success in business.” “Thanks. If you mean to insinuate that business and cards are in the same class, I’m not a bit discouraged.” “Pour me out another cup of coffee. I believe American men like to wait on women.” “It’s part of our game. You see how honest I am. You’ll marry me without illusions.” “Shall you boss me frightfully?” Julia looked at him over her cup, and he nearly dropped his. He kept his bantering tone, however. “The more you do for me, the more I’ll spoil you. It will be quite an exciting race. How should you like being spoiled for a change?” “It would be glorious. So irresponsible.” “Exactly. That’s what makes many a man get drunk. Few sensations so delightful as that of complete irresponsibility.” “Do you get drunk?” asked Julia, in mock alarm. “Gorgeously. Am I not a good San Franciscan? Not too often, however. Bad for business.”
  • 65. “You never told me if you went on that spree when you got those ten thousand dollars. Or didn’t you get it? Perhaps you anticipated, and your father wouldn’t—what did you call it—plunk?” “I didn’t, and he did, and I did. I whooped it up for just five days. To tell you the truth, I didn’t find as much in it as I expected, but felt I owed it to myself. Wish now I’d come over and eloped with you.” “Ah!” Julia made a rapid mental calculation. He would have arrived at about the time Nigel was laying his last desperate siege. Poor Nigel! Julia could picture Tay’s wooing and methods. Would he have won where her more courtly knight had failed? “Suppose I had never turned up?” asked Tay, abruptly. “That husband of yours can’t live forever, is many years older than you, anyhow. Do you fancy you would have eventually married Herbert? Corking books! He must be some man.” Julia had flushed to her hair. “How did you know I was thinking of him?” she stammered. “Were you? Well, those flashes happen, you know. You haven’t answered my question.” “It is quite impossible for me to tell, even to imagine, what I might have done if you—well, if you had not come over again. I’ve never really thought of marrying Nigel, but there would be a certain rest in it—not now, but later, perhaps. And we think and work with much the same objects.” “Nothing in rest till you’ve had the other thing first. How much thinking did you expend on that other thing before you were submerged in the unmentionable?” Julia blushed again, then laughed. “Oh, well—some day, I’ll tell you a funny experience I had in India.” “Tell me now.” “Over empty coffee-cups and fragments of buttered rolls? Not I. What shall we do first? Skate?” “If you like. Do you want to toboggan afterward?”
  • 66. “I think I’d like a tramp through the woods. We’ve never really investigated them.” “Good. Come along.” They found the lake deserted and skated in silence until Tay remembered her promise. “This is a sufficiently romantic spot for confidences,” he observed. “And in full view of the waiters of the hotel, who appear to have nothing to do but watch us. Tell me your Indian experience. Whom did you think you were in love with over there?” “Nobody. That was the trouble.” “Did he love and ride away, perhaps? That’s just the sort of experience you need.” “Well, I’ve never had it,” said Julia, indignantly. “A man never minds telling when he’s been left, but I doubt if a woman ever admits it even to herself. You’re weak-kneed creatures, the best of you, and need nine-tenths of all the vanity there is in the world to keep going.” “I believe you really despise women. But you’re just the sort that couldn’t live without them.” “Right and wrong. I shan’t explain that cryptic statement. Fire away.” “You’ll laugh at me.” “If I really could laugh at you, I’d be half cured. I try, but it does no good. What would be funny in another woman is tragic in you— and pathetic.” “Ah?” She was prepared to be indignant again, but met a new expression in the eyes with which he was intently regarding her. “What do you mean by that? I am not to be pitied.” “You poor isolated child! I’ve never felt sorrier for anybody in my life. But never mind. Tell me your Indian experience.” “Well—one night—a warm heavenly Indian night—I was alone in a boat on a lake. There was a great marble palace at one end. The nightingales were singing in the forest; and such perfumes!”
  • 67. “Gorgeous! Why wasn’t I there? Some fun, love-making in southern Asia. But this is just the setting for real enjoyment of the story. Go ahead.” “Yes, I never could be in a sentimental mood in this temperature. Well, I was completely happy—I had been happy for nearly a year in India, enjoying its strange beauty and never wishing for a companion. It was happiness enough to be alone and free. But that night—suddenly—I felt furious —” “Ah! I begin to catch on.” “I wish you wouldn’t always guess what I’m going to say.” “Shows I’m the real thing. Go on.” “I did wish with all my soul—every part of me—that I had a lover and that he was there. Heavens, how I could have loved him! I felt abominably treated by fate. Up to that time I hadn’t even thought about love. My experience had been too dreadful. I had felt sure that all capacity for love had been withered up at the roots. When a man looked at me as men do look at women they admire very much, it was enough to make me hate him. But I suddenly realized all that had passed. I had come to the conclusion that Harold had been mad from the beginning, so I could do no less than forgive him. That seemed to wipe it all out.” “When did this happen?” asked Tay, abruptly. “What year?” “It must have been—in 1903.” “Oh! Cherry hadn’t been to England for two or three years. She went that year and came back with a good deal of your story—got it from your aunt, of course. I remember I thought about you pretty hard for a time. Was on the brink of falling in love with another girl, and it all went up in smoke. What time of the year was it?” “Late autumn.” “Yes! I told myself it was tomfoolery. That you had forgotten me; and I had pretty well forgotten you. Nevertheless, I couldn’t get you out of my head. You believe in that sort of thing, I suppose!” “Oh, yes. I wonder!”
  • 68. They were both pale and staring at each other. “Well, go on,” said Tay. “What next?” “I made up my mind that I would find some one to love; and take the consequences. I went down to Calcutta, and for a whole winter tried to fall in love. There were many charming men, but it was no use.” “Now are you convinced?” There was a bend in the lake, which Julia had artfully avoided. Tay swung her suddenly around it, and in spite of her desperate attempt to free herself, caught her in his arms. “Now,” he said, “I propose to show you that temperature has nothing to do with it. Keep quiet. You are on skates, remember.” And he kissed her. “You can kiss me again,” said Julia, after a moment or two. “I thought so.” And he kissed her for several minutes. “You look quite different,” murmured, Julia finally. “I can look more so. Skates and worsted collars that take your ears off are infernally in the way.” “Will you always joke?” “My dear child, if I didn’t joke, I might really frighten you.” Julia shivered. “I’ve been frightened for days. I knew this would come. If I’d been really wise, I’d have run away.” “It wouldn’t have done you one bit of good. Never try that game. If you do, I’ll jump right up on the platform in Albert Hall and kiss you in the presence of ten thousand suffragettes—damnable word!” “I believe you would.” “I would.” And he kissed her again. This time she didn’t respond, and he gave her a little shake. “Forget it. You’re to think of nothing but me this long day we have all to ourselves. Time enough in London for you to set up your ninepins for me to bowl over. You’ve shown what you can do. Lady
  • 69. Dark told me that you did nothing by halves, and you’ve just proved it. To-day for love. Do you hear?” Julia smiled radiantly. “I couldn’t think of anything but you for more than a minute if I would. That was one thing that terrified me at night—when I had time to think— I had switched off with a vengeance! The past seemed blotted out. I wonder! I wonder!” “I don’t. And I never saw a mortal woman look so happy. Your faculty of living in the moment is a grand asset, my dear. Ten months— Good lord! It takes all of that time to establish a residence in Nevada, and all the rest of it. However— Well, let us go for a walk in the woods.” He glanced about with a quickening breath. “Blessed spot! We’ll come back to it one of these days.”
  • 70. XII “It shows how much in love we are that we don’t mind this luncheon,” said Tay, who made a face, nevertheless. They had decided to remain away from the hotel all day, and were fortifying themselves at the inn on the lake. The meal was the usual one of watery veal, fried potatoes, and pastry. “I remember eating ‘kalb’ when I was in Germany before until I choked. Can any one explain why there are more calves in Germany than anywhere else on the face of the globe? You don’t see so many cows. The offspring must arrive in litters like pigs.” “And the German, true to his creed, is furious if you flout his commonest staple.” Julia smiled, but, in truth, her mind was deeply perturbed, and she spoke mechanically. There had been no more love-making, for guests and peasants had met them at every turn of the woods. Her Hindu master had once told her that profound as were the suggestions he had given her, and systematic as was the control she had been taught to acquire over herself, either might suffer interruption unless she lived in India for many years longer. A violent awakening of the primal emotions, the assault of a mind and nature, temporarily, at least, stronger than her own, and that devil that lives in the subconsciousness would sit on his hind legs and chuckle. During the hours that had succeeded those moments of unquestioning surrender on the lake, her thirty-four years with their highest accomplishment had crept back, and she had ceased forever to feel eighteen. The immediate future rose before her like a black wall pricked out with menacing fingers. There was no question as to where her duty lay for the moment, as to what she must accomplish before she could think of happiness. All the steel in her nature had reasserted itself, her brain was cold and keen. She would put an end to the present state of affairs this very day. But how? How? She continued pleasantly.
  • 71. “Perhaps it would have been better to go back to the hotel.” “Not much. The hotel is associated with three evenings of fruitless manœuvrings to get you alone in one of those corners. Besides, Lady Dark may have recovered. I’ll take no chances. You are to be mine alone for an entire day.” “We could stay a few days longer.” “No, on the whole, I want to wind up London as quickly as possible. So must you. I shall send you on a steamer ahead to make sure of you.” Julia laughed. “How like a man. We could hardly be happier than we are now. Why not let well enough alone, for a bit?” “Well, you see, I am a man, and therefore differ from you as to what constitutes real happiness. I want to get the cursed Reno matter over as quickly as possible. Besides, I am due at home. The business might wait, but there’s a big piece of political work to pull off, and I must do my share in prying my poor rotten state out of the slough.” Julia’s mind took a leap. “I believe you are really ambitious,” she said, with bright sympathetic eyes. “Politicians don’t work for nothing. Do you know you never have told me a word of your ultimate intentions?” “I’ve been too busy talking about you. I was only too glad to side-track my own affairs for a time. We were all so strung up during the graft prosecution that we jumped at anything that would give us a chance to forget it, and recuperate our energies.” “Well, you have had a change! Do tell me how you have planned out your life. Do you look forward to being President of the United States?” “Not as much as when I was fifteen.” “Oh, you will always joke! Can’t you fancy what your future is to me? You are capable of great things, and I don’t for a moment believe that you care for nothing but money making, varied by an occasional rush at reform. Do be serious.”
  • 72. “My dear, I never felt more serious than I do at this moment. God knows I’m only too grateful for your interest. It struck me as ominous that you never asked me.” “I didn’t dare,” murmured Julia. “A man’s career is a so much more brilliant thing than a woman’s ever can be, for he has two distinct sides. We women are bound by our physical limitations to one side. We must make new traditions—and new bodies to transmit —” “Hold on! Let us avoid that subject as long as possible.” “But tell me.” “Well, here is the way I am fixed: I am for reform, my father is not. I am a full partner in the firm, but I can’t use the firm’s money for an object to which my father is bitterly opposed. But I have been making money on the outside, investing and reinvesting, and, in two years at most, I shall have an independent fortune, irrespective of my father’s large estate. Then I intend to go in for politics, doing all I can meanwhile to educate the people in the precepts of the true democracy and to keep the Reform party on top. I intend to hold conspicuous office in California, then go to Congress. You can call this ambition, if you like; no doubt ambition is mixed up with all deep sense of personal usefulness. It takes a good-sized ego to permit you to fancy yourself able to reform long-existing conditions; and egoism and ambition are good working partners. I shall work for my own state first, and then for the country at large. That is the way for Americans to begin, or, at all events, the way we do begin, our country being what it is. State pride is almost as strong as national. Moreover, a man must prove himself in his own state before he can get a chance to command the attention of the nation. If a man happens to belong to a notoriously corrupt state like California, and manages to shine by contrast, his opportunities are so much the greater! But the nation is the thing. Every Union man during the Civil War fought for his flag, not for his section. But our country is now a republic only in name. We are piling up problems our founders could not anticipate, and if they go on unchecked, they will land us either in an autocracy, or in the worst form of tyranny known to history,—
  • 73. mob rule. It is the business of a few of us to avert a French Revolution. Just at present we are between two camps, Monopoly and Labor-Unionism, and have almost forgotten that we are citizens of a free country. Our skins have been safe so far, owing to the lack of brains and initiative in the masses; also, because they are far from starvation. But let that condition arise—before the Money Power has been made to open its eyes, or has been controlled by legislation—then horrors beside which the French Revolution will be mere picturesque material for novelists. A few thinking men with money enough to give them weight with the solid moneyed class at the top—where the reform must begin—as well as to place them above suspicion, and who have cultivated common-sense and patriotism instead of greed, must do the business. Let’s get out of this.”
  • 74. XIII When they were walking over the crisp snow in the woods—now deserted, for hotel guests and peasants alike were at the long midday meal—he resumed the subject. Her vivid sympathy and interest had brought back the bitter struggle of the past two years with a rush. “How I wish you had been with me when we made our graft fight,” he said, looking at her with fond eager eyes. “What a mate you would have been. When the whole town is howling at a man because he is trying to do the right thing, he needs just such a woman as you to keep the courage in him. The concerted opinion of the majority has an insidious power! Sometimes we wondered if we could be right, if we were not all dreamers, unpractical, doing our city more harm than good. The whole country was aghast at our exposures, business was almost dead, capital refused to come our way; the poor old city that had been wrecked by the most fearful natural calamity of modern times—$500,000,000 went up in smoke —seemed to cry out against us for holding her down, to beg for a chance to limp out of her bog. But we looked ahead, convinced that there could be no permanent prosperity for San Francisco until the sore was scraped to the bone and sterilized; in other words, until the political scoundrels and the get-rich-quick element, that obtained their crushing franchises by corrupting a packed Board of Supervisors, and bought everybody, from the boss and the mayor down to the man in the street with a vote to sell, were either gaoled or so discredited that they would be forced into private life or out of the state. We unseated the boss and the mayor, the supervisors having come through, and we were able to indict several of what we call the higher-ups—the men that had done the buying. I never had much hope of convicting these men, for in California, in its present state of moral development, it is next to impossible to convict a rich man. If you get an honest judge, there are always men in the jury
  • 75. that have got in for no purpose but to be bribed. But we won out in another way. The long trial aired the abominable practices of these corporations, and, together with the many sensational episodes—the shooting of the prosecuting attorney in court, and the suicide of the would-be murderer in prison before he could be put on the stand, the kidnapping of the only editor that fought with us,—woke up the state; it talked of little else, and talking, thought, and was ashamed. The city machine got ahead of us, for the mayor we had managed to seat was too virtuous to build up a machine of his own; but we hope for great things in the state itself when our Reform candidate runs for the office of governor this year. Perhaps it was unreasonable to hope for more at the beginning, and it was a tough fight to get that much. “Oh, God!” he cried bitterly, “the rottenness of young communities with potentialities of wealth. Human nature in the raw, when it is still in the ingenuous stage of greed, is a damnable thing. It has never shown any originality since the world began. Socialism may clip its wings, if it ever gets control, but—here is the cursed anomaly: you can’t hope for Socialism until a miracle eliminates greed from the nature of man; for it is men that must grant Socialism, and Socialism means the balking of greed. Even if some unforeseen set of circumstances forced it upon us, I doubt if it would last. You can no more eliminate greed from men than you could eliminate sex by forcing men and women to dress alike, shave their heads, and say their prayers three times a day. But the world is better in some respects than it was a century ago, and this is primarily due to the untiring efforts of the minority. But, again, the work must be done by a few men—the few that are awake and can see farther than their noses. Well, my dear, I hope and pray that I am one of those men. There you have my program, so far as a mere finite mind can project it.” “Now I know why I have been permitted to love you,” said Julia, softly, and looking at him with glowing eyes. “Hadji Sadrä told me that he should watch over me, and that if I dared love a man who would pull me down, instead of being far greater than I could ever
  • 76. hope to be, he would blast me, transform me into a mere commonplace female, but haunted by the memory of what I had been —” “How much of all that do you believe?” “Ah! I saw marvellous exhibitions of power. They are common enough in the East, but one would hardly dare relate them in this part of the world. If I longed with all the concentrated powers of my mind for Hadji Sadrä, he would come to me in a flash—with that secondary material body they call the astral, and we call the ghost. If I were terribly perplexed, I should send for him —” “I want no go-betweens, particularly Mohammedan ghosts.” But Julia had no intention of letting him down. “I wonder I could remember him, or any one else! It was only because I suddenly realized what all this means—that I may have another and far greater part to play —” “You see that at last! Perhaps I should have appealed to you before. But—it is only to-day that I have felt really close to you— really loved you, perhaps. I fancy I was merely infatuated before.” He took her in his arms, and she looked up at him with the deepest sympathy a woman can express, particularly when gifted with eyes that are the dazzling headlights of a finished and powerful machine behind. “Oh, if you could only know,” he continued in tones of intense feeling, “what it will mean to me to have you, not only to love, but to work with! I really want with all my soul to be of use to my country, to be one of the few that are willing to work for her unselfishly, to leave a decent name behind me. It is thankless work, fighting the majority, battling for an ideal nobody wants, to be the butt of the press, accused of sordid motives, balked at every turn. The only sort of patriotism the average American understands is sounding promises by ambitious politicians and huge donations from repentant millionnaires. To raise the morale of a people, and in the process prevent them from growing too rich, may mean the respect of posterity, but it also means the hatred of your contemporaries. The Big Voice! It confuses the mind and the standards. The constant
  • 77. failures, the recurring sense of hopelessness, of futility, the inevitable contempt for the masses you are striving to emancipate from themselves,—many a man that has started out with the loftiest and most selfless ideals loses courage, shrugs his shoulders, and falls back. I am no better and stronger than many of them. I have dreamed one minute, the next wondered how far I would go, how long my enthusiasm would last. Material success is easy enough, and always rewarded by approbation and respect! What is the use? I am young still, but I asked myself that question more than once, for even my family were all against me. My father was furious. He is honest, but his business has been his god. I left home and went to a hotel—to avoid the everlasting discussions at table. My old friends cut me on the street. I was regarded as an enemy of society, and society cast me out. The rest of our little group shared the same fate. We were obliged to keep one another’s courage up. That we carried our lives in our hands and were liable to assassination at any moment was the least of our trials. The Big Voice! We felt as if we were at the foot of an avalanche, or some other inexorable enemy in Nature herself, trying to push it back with our hands. Inevitably there were black moments when we felt we were fools, especially when we faced certain defeat. And it’s all to do again, not once, but many times. Do you wonder that the light side of my nature has given me many cynical moments, or that I have seethed with disgust, or wondered if I would last? But with you—ah! If I had ever dreamed you lived, I believe I never should have despaired for a moment. But my only memory of you was of a charming and lovely child. And it is only to-day, here, that I have realized what it means for any of us to stand alone. With your faith and your brain, with you always beside me, sympathizing, helping—I never shall lose courage for a moment. I could accomplish anything—everything —” This sudden vehement disclosure of the serious depths of his nature under its surface gayety, with more than one glimpse of heights and powers she had barely divined, had thrilled Julia even more than his passionate love-making. All her own greatness responded, and for a moment or two she had been swept irresistibly
  • 78. on that tide of self-revealing words. She had a vision of the complete passion, the perfect union. But her brain remained cool. She never lost sight of her purpose. She sprang from him suddenly and flung out her arms. Her eyes looked black. Her skin shone with a peculiar radiance like white fire. So she had looked more than once on the platform during her last moments of irresistible appeal; when her bewildered audiences had felt as if dissolving in a crucible from which there was no escape. “Oh,” she cried in low vibrating tones of intense passion, “now I know you—the real You! I’ll never fail you. You are wonderful, and I worship you! I believe we can be happier than any two mortals have ever been. But, Dan, I must go to you free, with a conscience as clean as your own. You must see that. You are too great not to see it. I must be tormented with no regrets, no remorse. If I should leave at this moment—‘rat’ like any scoundrelly selfish politician— desert these women publicly while all the world is watching them, make them ridiculous—oh, I don’t mean that I am indispensable; there are too many great women among them for that— But don’t you see that if I threw them over to follow an American to the other side of the world, now, while their fate hangs in the balance—why, it would amount to nothing less than a cynical declaration that we are all alike when it comes to a man—that we fight for a great impersonal cause only so long as no man comes along to play the old tune on our passions—why—Good God!—they would be the butt of every malicious wit in the kingdom. Their cause would be set back a generation. And I? I should be execrated by women the world over. I, who am now a sort of goddess. My immense following is due as much to the youth and beauty which I have appeared to immolate so indifferently, as to all my talents put together. What use should I be to you if I scuttled the ship and deserted it? What place could I take among the women of your country? Do you think they would listen to me, that I could teach them, help them? They would laugh in my face!” She caught him by the shoulders, her eyes piercing into his, which stared at her full of sombre perplexity. She went on in a rapid
  • 79. monotonous voice, which fell on his brain like a rain of fire: “Why didn’t you come for me, as you promised? I should have gone. Four years ago! I was free. Something was always knocking at my mind. I knew that I had useful energies of some sort. They were always groping to find vent. If you had come, if you had told me then what you have told me to-day, I should not have hesitated a moment. I should have known that my work was to be done with you. But you forgot your promise. The bond was not strong enough. Why did you wait until I had become a public figure, written about daily—until I had hopelessly compromised myself? Oh, can’t you see that you have made me the most tragic figure among women? I love you so that I long with all those other and far greater forces within me— that you have brought to life—to go, to be happy, to give you all you want and deserve, to become truly great—with you! Oh, I am the most unhappy woman on earth—and the happiest!” Tay had tried to interrupt her several times. But he was dazed. She looked like a sibyl. He felt disjointedly that he had less desire to claim her as a woman than to ascend with her to the plane whither she seemed to have borne herself. He had been shaken out of his own reserve and bared his soul for the first time in his life; his defences were down, she seemed to have entered his mind and taken possession. Human passion would appear to have fallen to ashes. His senses felt numb, he was vaguely conscious of a material dissolution that left his soul free to mingle with hers. She gave him no chance to speak. Her words flowed on with the same fiery monotony. “You have taught me what duty means. I believe I never was really capable of the sacrifice of self before. I worked to fill my time, to forget my depths. Then because the greatness of that work really put my womanhood to sleep! But you! I have not a personal ambition left, not a want apart from you, but this terrible duty. I want to live in you, for you. You! You! You!” Tay had a confused idea that he was turning into a demi-god. “But I must go to you free— that I may never look back—that I may know and give complete happiness. I must be all woman, not a mere brain, humiliated,
  • 80. ashamed, tortured by regrets. And you must go at once, at once, at once. If you stay, if you prove too strong for me, if you force me to go with you—and I love you so I might go—then we never shall know the meaning of happiness for a moment. I will follow you before long. If we don’t win the battle early this year, I will train some one to take my place. I shall speak, appear in public less and less, drop out by degrees. I shall soon be forgotten—long before I can marry you. But to leap from the front rank of these women straight into a divorce court in a city whose name is a synonym for vulgarity, that is never mentioned without a laugh or a sneer— Oh, you see! You see! What an anticlimax to all these years on a pedestal! What a wife for you, a public man! Oh, God! I should be the ruin of your own career —” “Julia!” exclaimed Tay, trying to get his breath. She fell back limply against a tree, as if exhausted with her own passion, but neither voice nor eyes lost their power. “Oh, go! Go! Go! If you don’t, I shall be in the dust. I shall be incapable of love in my abasement. I know myself. To love, to be happy, I must be free. I must have my self-respect. I can’t love, tortured by shame and remorse. I want love and you more than anything on earth, but I want them utterly. Oh, go!” For a moment or two Tay had been conscious of an angry struggle in the depths of his mind. He suddenly became master of himself. He shot a glance at Julia as piercing as her own, and she gasped and flung herself face downward on the snow and began to sob. He made no attempt to pick her up for the moment. “You have strange powers, Julia,” he said. “If I were weaker than I am,—and God knows I am weak enough,—I should be slinking through the woods with my tail between my legs, hypnotized out of my manhood, and ready to lick your hand for the rest of my life.” Julia stopped sobbing and listened intently. Tay walked up and down before he spoke again. “But mind you, I don’t question your sincerity, your love, whatever the devilish arts you tried to practise on me. Every leader of a great revolution is a fanatic and a Jesuit.
  • 81. And, methods aside, every word you spoke was sound common- sense. I don’t care to assume the responsibility of injuring those women, and I believe you would be incapable of happiness if you handed their enemies another weapon—a pretty deadly one it would be!” He picked her up and dusted her off. “I am going,” he went on grimly, “and I shall wait exactly six months. Or rather—” He caught her hands in his powerful grip, his eyes blazing into hers. “I shall never see you again, not even with your royal consent, unless you swear to me here that you’ll not try that on again. That you’ll be woman to my man from this time forth—that and nothing more. I’ll be damned if I’ll live with a woman who doesn’t play a square game. Swear it.” “Oh, I do, I do! Oh, Dan!” The tears were running down her face, honest tears, for she was frightened, while rejoicing. “Do believe that I was only doing my best—I knew that you wouldn’t listen—I had only one object —” “Oh, as I told you, I have never questioned your queer complicated honesty. Only, being a perfectly normal person myself, I prefer to postpone occult trickery until I reach the next world. No doubt it will be all in the day’s work there. But I’ve got my job cut out in this, matching my earthly wits against the next man’s. Now, you’ve given me your word! If you ever go back on it —” “Oh, never!” Julia was now really limp, and looked wholly feminine. Tay took her in his arms once more and dried her tears. “It’s my fate to love you,” he said, with a sigh. “And that’s about the size of it. I’m sorry you ever went to your East, but live in the hope I can make you forget it.” “And do you love me as much as ever?” asked Julia, unintellectually. Tay laughed outright, the ancient formula almost routing the memory of those moments when the same woman that uttered them automatically had launched her ruthless will into his relaxing brain. “Oh, yes,” he said, “I love you, all right, and for good and all.
  • 82. Now, we’ll be practical. I shall leave England the day I wind up my affairs in London. That should be in less than a week. I am going to ask you to stay here until I sail. I am resigned to going without you, am willing to admit that a separation of a few months is inevitable— but, all the same, the less temptation, the better. Besides, I shall need all my wits in London— If you were there —” “Oh, I’d rather stay, far, far rather! I don’t think I could stand it, either. Here, at least, I can keep out of doors, exercise until I am past thought —” “Well, don’t change your mind. I insist that you stay here. If you return to London while I am there—well, I’ll not say just what I won’t do. Enough that I should not return to America alone. Come, let’s get back to the hotel.”
  • 83. XIV Julia went at once to Ishbel’s room. She found that conspirator sitting on the little balcony enjoying the view of ice peak and forest. Ishbel sprang to her feet when she saw Julia’s face. “Oh— Ah— So—” “Quite so,” said Julia, dryly. “But never mind. I have won out for a bit. He has promised to go to California at once and wait while I eliminate myself by degrees. I have promised to follow in six months. Of course I shall if I can. If I can’t—well, I must make him listen to reason again. But I hope —” “Of course, you can’t bolt,” said Ishbel, who was burning with sympathy for both. “But surely you can manage to let yourself out in six months. Your vice-president is an efficient woman; and then we are sure to win this session —” “I don’t know! If we did, of course I’d make some excuse and go at once. But—otherwise—I can’t leave them for a divorce court until I have taught them to forget me—disassociated myself from them —” She dropped on the edge of the bed, face and body expressing utter discouragement. Ishbel half opened her lips, then went out upon the balcony lest she break her word and tell Julia that France was dying. But a moment’s reflection convinced her that this information would only complicate matters at present. She thought hard for a few minutes, then ran back into the room. “Julia!” she exclaimed, “I have an idea! Why not go to Nevis? Your mother is very old. You haven’t seen her for many years. You can give out that she is ill—or I will if you won’t. My conscience wouldn’t hurt me a bit, for old people are always ill. No doubt you’ll find her with rheumatism, lumbago, dropsy, Bright’s disease, diabetes, tumors, or a few other ills incident to old age. It would
  • 84. make just the break you need; and it’s just the time to go, for your officers can attend to everything. Also—you could stay on and on.” Julia looked up with some return of animation in her heavy eyes. “It’s not a bad idea, if I could go.” “Of course you could, and the minute I get to London I’ll set the whole shop to work on your tropic wardrobe. You can get many things ready-made, anyhow—people are always going out to India on a moment’s notice.” “I’ll think it over while I’m here. I’m to stay until he sails.” “Ah!—I hate to leave you alone. Shall I stay with you?” “I think I’d rather be alone.” “Yes, I understand.” She sat down on the bed and put her arm about Julia’s relaxed form. “I want you to promise me that you will marry Mr. Tay, whatever happens. You’ve a right to happiness, if ever a woman had, and this is your only chance, my dear. There’s only one real man in every woman’s life, and happiness is the inalienable right of all of us. Even Bridgit was forced to admit that.” “Oh, I intend to marry him. But when? That is the question!” “As soon as possible. You have given four uninterrupted years to this work, and you have done great things for it. That is enough —” “We have all gone in—that inner band—to devote a lifetime to it if necessary.” “Don’t you suspect that those women have an extra something in their make-up that the rest of us lack?” “I have accomplished as much as any of them—” “Quite so. And enough. Don’t you feel that the spring has gone out of you?” “Just now, yes.” “You’ll never work with the same spirit again, for you never can be impersonal again. You would feel a hypocrite, for you would always be resenting the loss of what you really want most in life. You’ve a duty to yourself, to say nothing of Mr. Tay; and you’re not
  • 85. going to a frivolous useless life—not with him! No one is indispensable to any real cause, and in ours there are too many to carry on the work without the supreme sacrifice on your part. Promise me, at least, that you will go at once to Nevis. It would be the beginning of the solution.” “I’d like to go.” “You really must want to see your mother, and your old home,” continued Ishbel, insinuatingly. “One’s mother and one’s birthplace are the great refuges in time of trouble. You were very fond of your mother when you were a child.” “I’m fond of her now, but she seems to have lost all affection for me.” “Never believe it. She is a strange proud old woman, but she has always loved you. Go back to her. There is your refuge.” “You are playing on my deepest feelings, but you are right. Nevis! When you are crushed, your own land calls you. And, as you say, I haven’t much work in me at present.” “Then you’ll go?” “When you get to London, telegraph me how matters stand. If it looks as if the truce would be a long one—yes, I’ll go. I believe I want to go more than anything else in the world—except one! Perhaps I’ll get a grip on myself down there. Perhaps I’ll find that— well, that I love this great cause best, after all.” “Not a bit of it!” cried Ishbel, in alarm. “Don’t try to persuade yourself of anything so unnatural and foolish. Do you realize how few women have complete happiness offered them? I could shake you.” Then she reflected that Nevis was a tropical island; and another scheme was forming in her agile brain. “Well, never mind all that. You are worn out now. It is not a matter to discuss, anyhow. Stay out of doors here, and I will prepare your wardrobe. Then you can start as soon as you return to England. I will tell Collins to pack your other things. Eric will secure your accommodations on the first
  • 86. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com