Applying The Application-Based Domain Modeling Approach To UML Structural Views
Applying The Application-Based Domain Modeling Approach To UML Structural Views
1
Department of Information System Engineering,
Ben-Gurion University of the Negev, Beer Sheva 84105, Israel
[email protected]
2 Department of Management Information Systems,
1 Introduction
In the single level domain analysis approaches, the domain engineer defines domain
components, libraries, or architectures. The application designer reuses these domain
artifacts and can change them in the application model. Meekel et al. [16], for
example, propose a domain analysis process that is based on multiple views. They
used Object Modeling Technique (OMT) [25] to produce a domain-specific
framework and components. Gomaa and Kerschberg [13] suggest that a system
specification will be derived by tailoring the domain model according to the features
desired in the specific system.
Feature-Oriented Domain Analysis (FODA) [14] defines several activities to
support domain analysis, including context definition, domain characterization, data
analysis and modeling, and reusable architecture definition. A specific system makes
use of the reusable architecture but not of the domain model.
Clauss [7] suggests two stereotypes for maintaining variability within a domain
model: <<variation point>>, which indicates the variability of an element, and
<<variant>>, which indicates the extension part. These stereotypes seems to be weak
when defining a domain model and validating a specific application model of that
domain.
Catalysis [11] is an approach to systematic business-driven development of
component-based systems. It defines a process to help business users and software
developers share a clear and precise vocabulary, design and specify component
interfaces so they plug together readily, and reuse domain models, architectures,
interfaces, code, etc. Catalysis introduced two types of mechanisms for separating
different subject areas: package extension and package template. Package extension
allows definitions of fragments of language to be developed separately and then
merged to form complete languages. Package templates, on the other hand, allow
patterns of language definition to be distilled and then applied consistently across the
definition of languages and their components. Both package extension and package
template mechanisms deal basically with classes and packages and enable renaming
of the structural elements when reusing them in particular systems. In addition, that
work does not address the application model validation against its domain model(s).
In the two-level domain analysis approaches, connection is made between the domain
model and its usage in the application model. Contrary to the single-level domain
analysis approaches, the domain and application models in the two-level domain
analysis approaches remain separate, while validation rules between them are defined.
These validation rules enable avoiding syntactic and semantic mistakes during the
initial stages of the application modeling, reducing development time and improving
system quality. Petro et al. [21], for example, present a concept of building reusable
repositories and architectures, which consist of correlated component classes,
connections, constraints, and rationales. When modeling a specific system, the system
model is validated with respect to the domain model in order to check that no
constraint has been violated.
Schleicher and Westfechtel [26] discuss static metamodeling techniques in order to
define domain specific extensions. They divide these extensions into descriptive
stereotypes for expressing the elements of the underlying domain metamodel,
restrictive stereotypes for attaching constraints to stereotyped model elements, regular
metamodel extensions, and restrictive metamodel extensions. They mostly deal with
packages and classes, but not with behavioral elements. Furthermore, the semantics
and constraints of the stereotypes used in this work are expressed in a natural
language, weakening the formality of this approach.
Gomma and Eonsuk-Shin [12] suggest a multiple view metamodeling method for
software product lines. They solve model commonalty and variability problems
within the product line domain by defining special stereotypes which are used in the
use case, class, collaboration, statechart, and feature model views. These stereotypes
are modeled in the metamodel level by class diagrams, while the relations among
them are specified in Object Constraint Language (OCL) [030]. The main
shortcoming of this method is in using a new dialect of UML for modeling the
domain elements and constraints (e.g., adding alternating paths).
Morisio et al. [17] propose an extension to UML that includes a special stereotype
indicating that a class may be altered within a specific system. The extension is
demonstrated by applying it to UML class diagrams. The validation of an application
model with respect to its domain model entails checking whether a class appears in
the application model along with its associate classes, but not if the class is correctly
connected.
The Institute for Software Integrated Systems (ISIS) at Vanderbilt University
suggested a metamodeling technique for building a domain-specific model using
UML and OCL [18]. The application models are created from the domain metamodel,
enabling validation of their consistency and integrity in terms of the domain analysis
[9]. However, the domain models are specified using UML class diagrams and OCL,
while the application models use other notations, conceding the benefits of applying a
standard modeling language to the application models as well.
Application models and domain models are similar in many aspects. An application
model consists of classes and associations among them and it specifies a set of
possible behaviors. Similarly, a domain model consists of core elements, static
constraints, and dynamic relations. The main difference between these models is in
their abstraction levels, i.e., domain models are more abstract than application
models. Furthermore, domain models should be flexible in order to handle
commonalities and differences of the applications within the domain.
The classical framework for metamodeling is based on an architecture with four
abstraction layers [19]. The first layer is the information layer, which is comprised of
the desired data. The model layer, which is the second layer, is comprised of the
metadata that describes data in the information layer. The third metamodel layer is
comprised of the descriptions that define the structure and semantics of metadata.
Finally, the meta-metamodel layer consists of a description of the structure and
semantics of meta-metadata (for example, metaclasses, metaattributes, etc.).
Following this general architecture, we divide our Application-based DOmain
Modeling (ADOM) approach into three layers: the application layer, the domain
layer, and the (modeling) language layer. The application layer, which is equivalent to
the model layer (M1), consists of models of particular systems, including their
structure (scheme) and behavior. The domain layer, i.e., the metamodel layer (M2),
consists of specifications of various domains. The language layer, which is equivalent
to the meta-metamodel layer (M3), includes metamodels of modeling languages. The
modeling languages may be graphical, textual, mathematical, etc. In addition, the
ADOM approach explicitly enforces constraints among the different layers: the
domain layer enforces constraints on the application layer, while the language layer
enforces constraints on both the application and domain layers.
Figure 1 depicts the architecture of the ADOM approach. The application layer in this
figure includes three examples of applications: Amazon, which is a Web-based book
store, eBay, which is an auction site supported by agents, and Kasbah, which is a
multi-agent electronic marketplace. Each one of these systems may have several
models in different modeling languages. The domain layer in
Figure 1 includes two domains: Web applications and multi agent systems, while the
language layer in this example includes only one modeling language, UML. Since
UML is the current standard (object-oriented) modeling language, we apply the
ADOM approach to UML.
Figure 1 shows also the relations between the layers. The black arrows indicate
constraint enforcement of the domain models on the application models, while the
grey arrows indicate constraint enforcement of the language metamodels on the
application and domain models.
M3:
Language
Layer
UML
The rest of this section elaborates on the domain and application layers, while the
language layer is restricted to the UML metamodel [3] except of two minor changes:
1. A model element (e.g., attribute, operation, message, etc.) has an additional
feature, called "multiplicity", which represents how many times the model
element can appear in a particular system. This feature appears as
<<min..max>> before a relevant domain element in a domain model, while
<<1..1>> is the default (and, hence, does not appear).
2. A model element can have several stereotypes, which are separated by
commas.
3.1 Applying UML Structural Views to the Domain Layer of the ADOM
Approach
When referring to the static views of a domain, the domain engineer can use UML
class, component, and deployment diagrams for specifying the domain elements and
the (structural) constraints among them. In what follows, we demonstrate the ADOM
approach on a part of the Web application domain as defined by Conallen [8]. Figure
2 cites a definition of a server page given by Conallen.
1. A server page represents a web page that has scripts which are executed by the server.
2. These scripts interact with resources on the server (databases, business logic, external
systems, etc).
3. The object’s operations represent the functions in the script, and its attributes represent
the variables that are visible in the page’s scope (accessible by all functions in the page).
4. Server pages can only have relationships with objects on the server.
Figure 2. A part of Conallen' s specification for the Web application domain –
A Server Page definition
As can be seen, the definition in Figure 2 includes logical and physical elements
(classes, components, and nodes). Hence, modeling this particular domain element, a
server page, requires UML class, component, and deployment diagrams.
Figure 3 is a partial class diagram that models the logical aspects of a server page:
A server page is specified as a class the attributes of which are classified as
variables. A server page may have any number (including 0) of variables which can
be of any type recognized in UML. These constraints are modeled in the domain
model as the attribute "<<0..m>> variable: anyType" of the server page class. Since
these variables are visible only within the server page' s scope (including its scripts),
their scope is defined to be "package" in the domain model. The order of scopes (from
the least restricted to the most restricted) is public, package, protected, and private. A
scope of a model element defined in a domain model is the least restricted scope that
this element can get in any application model of that domain1. In particular, a variable
scope within an application model can be package, protected, or private.
Figure 3 also specifies that a server page may have any number of operations
regardless of their signatures as indicated by "<<0..m>> anyMethod (<<0..m>>
anyParameter :anyType): anyType" declaration. All the operations of a server page
(as all the operations in this domain model) are defined as public in the domain model
and, hence, their scopes are not limited in the application models, i.e., they can be
public, package, protected, or private. A server page may have relations with any
class (on the server, as will be constrained next), as indicated by the association
between server page and anyClass. In addition, a server page may aggregate any
number of scripts. A script has any number of operations regardless of their
signatures, may have any relations with other scripts, as indicated by the self
association labeled anyRelation, and interacts with any number of resources (on the
server), as indicate by the dependency relation labeled "interacts with".
Similarly to scopes, the ADOM approach defines a precedence order between
relations. The most general relation is an association, followed by a navigational
association, an aggregation, a navigational aggregation, a composition, and a
navigational composition. A relation specified in a domain model is the most general
relation possible between the two model elements in any application model of that
domain. Enforcing a specific relation type (e.g., aggregation) requires definition of a
new type of an OCL constraint.
1 Enforcing a specific scope on a model element (e.g., public) can be done by defining an OCL
constraint.
server page
<<0..m>> variable : anyType
*
script anyRelation
*
resource
<<0..m>> anyAttribute : anyType
Figure 3. A partial class diagram of a Server Page in the Web application domain
Figure 3 does not limit the structure of a resource element, i.e., it may have any
attributes, any operations, and any relations with other resources. However, this
figure defines the hierarchy of resources: a resource is specialized into database,
business logic, and external system, each of which is a special type of resources.
<<1..m>> server
<<1..m>>resource component
<<1..m>> resource
<<0..m>> business logic
<<0..m>> database
<<0..m>> external system
>
m>
1..
<<
<<0..m>>
Figure 4. A partial merged component and deployment diagram describing the physical
constraints on a Server Page in the Web application domain
Figure 4 presents a component diagram merged into a deployment diagram. The
merged diagram expresses the physical constraints of the domain on server pages. The
main domain node is a server from which at least one physical node exists as
indicated by the multiplicity feature (<<1..m>>). The server hosts at least one
resource component and at least one server page component. It may also host
components of any type each of which implements at least one class (of any type). A
resource component implements at least one resource class and may implement
any number of other resource classes, i.e., business logic, database, and/or
external system. A server page component implements at least one server page
class and any number (including 0) of script classes. Figure 4 also defines dependency
constraints among components: a server page component depends on at least one
resource component and may depend on other components of any type, including
other server page components.
3.2 Applying UML Structural Views to the Application Layer of the ADOM
Approach
<<database>>
glossary entry
<<database>>
glossary DB word : String
description : String
*
id : long
Figure 5. A partial class diagram of the GLAP system – A description of process search and
edit entry server pages
Table 1. The Web application domain constraints and their fulfillment in the GLAP system
model – comparing the class diagrams
Class Feature Feature Allowed Actual Features
Name Constraint Feature
Multiplicity
variable Max scope: 0.. 4 package variables for process
package search
3 package variables for edit entry
general Max scope: 0.. 1 public operation for each server
operation public page (process search & edit entry)
Server
page relation to Type: 0.. 2 navigational aggregations for
script navigational process search (writeEntry&getEntries)
aggregation 1 navigational aggregation for edit
entry (getEntry)
relation to Type: 0.. 0 relation to other classes for both
any class association process search & edit entry
general None 0 0 attributes for both process search
attribute & edit entry
general Max scope: 0.. 0 public operations for each script
operation public
script relation to Type: 0.. 1 navigational aggregation for
script association getEntries
0 relations for the other scripts
dependency None 0.. 1 dependency relation for each
to resource script
general Max scope: 0.. 0 attributes for glossary DB
attribute private 3 private attributes for glossary
entry
resource general Max scope: 0.. 0 public operations for each
operation public resource
relation to Type: 0.. 1 aggregation for glossary DB
resource association 0 relations for the other resources
The ADOM approach validates the structure of each application class and the
relations among them using the domain model. Table 1 summarizes the domain
constraints of the Web application elements, and how these are correctly fulfilled in
the class diagram of the GLAP system. For each domain class, the table lists its
features (in the "Feature Name" column), scope or relation type constraints (in the
"Feature Constraint" column), and multiplicity constraints (in the "Allowed Feature
Multiplicity" column). In addition, the table summaries the actual features of each
class in the application model (in the "Actual Features" column). As can be seen,
none of the constraints expressed in the domain model, shown in Figure 3, are
violated by the application model, specified in Figure 5.
Figure 6 depicts the implementation view of the GLAP system. This diagram
follows the guidelines of the Web application domain for components and their
deployment as expressed in Figure 4. The ADOM approach validates the existence of
the defined classes and their associations to components and nodes. It also validates
the relationships among the various model elements and their multiplicities.
< < s e rve r> >
G L A P s e rve r
<<database>> glossary DB
<<database>>glossary entry
Figure 6. A partial merged component and deployment diagram of the GLAP system –
Allocating the process search and edit entry server pages into components and nodes
Two major techniques are usually used when applying UML to the domain
analysis area: stereotypes and metamodeling. The main limitation of the stereotypes
technique is the need to define the basic elements of a domain outside the model via a
natural language, as was done, for example, by Conallen for the Web application
domain [8]. While using natural languages is more comprehensible to humans, it
lacks the needed formality for defining domain elements, constraints, and usage
contexts. The ADOM approach enables modeling the domain world in a (semi-)
formal UML model. This model is used to validate domain-specific application
models.
While applying a metamodeling technique, the basic elements of the domain and
the relations among them are modeled. Usually, the domain and application models
are specified using different notions (and even different notations). In the case of
UML, the domain models are expressed using class diagrams, while the application
models are expressed using various UML diagram types. This unreasonably limits the
expressiveness of domain models. In the ADOM approach, the domain and
application models are specified using the same notation and ontology. In other
words, the ADOM approach enables specification of physical and behavioral
constraints in the domain level (layer). Furthermore, keeping the same notation and
ontology for the entire development team (which includes domain engineers and
system engineers) improves collaboration during the development process.
In this paper, we applied the ADOM approach to UML static views. In [23], we
have also applied the ADOM approach to UML interaction diagrams. In the future,
we plan to develop a domain validation tool that will check a system model against its
domain model and will even guide system developers according to given domain
models. An experiment is planned to classify domain-specific modeling errors when
using the ADOM approach and other domain analysis methods. This experiment will
also check the adoption of several different domains within the same application
utilizing the ADOM approach.
References
1. Arango, G. “Domain analysis: from art form to engineering discipline”, Proceedings of the
Fifth International Workshop on Software Specification and Design, p.152-159, 1989.
2. Becker, M. and Diaz-Herrera, J. L. “Creating domain specific libraries: a methodology,
design guidelines and an implementation”, Proceedings of the Third International
Conference on Software Reuse, pp. 158-168, 1994.
3. Booch, G., Rumbaugh, J., and Jacobson, I. The Unified Modeling Language User Guide,
Addison-Wesley, 1998.
4. Carnegie, M. “Domain Engineering: A Model-Based Approach”, Software Engineering
Institute, http://www.sei.cmu.edu/domain-engineering/, 2002.
5. Champeaux, D. de, Lea, D., and Faure, P. Object-Oriented System Development, Addison
Wesley, 1993.
6. Cleaveland, C. “Domain Engineering”, http://craigc.com/cs/de.html, 2002.
7. Clauss, M. "Generic Modeling using UML extensions for variability", Workshop on
Domain Specific Visual Languages, Object-Oriented Programming, Systems, Languages,
and Applications (OOPSLA' 01), 2001.
8. Conallen, J., Building Web Applications with UML, First Edition, Addison-Wesley,
Reading, MA, 1999.
9. Davis, J. “Model Integrated Computing: A Framework for Creating Domain Specific
Design Environments”, The Sixth World Multiconference on Systems, Cybernetics, and
Informatics (SCI), 2002.
10. Drake, R. and Ett, W. “Reuse: the two concurrent life cycles paradigm”, Proceedings of the
conference on TRI-ADA ' 90, p.208-221, 1990.
11. D’Souza, D. F., Wills, A.C. Objects, Components, and Frameworks with UML – The
CatalysisSM Approach. Addison-Wesley, 1999.
12. Gomma, H. and Eonsuk-Shin, M. "Multiple-View Meta-Modeling of Software Product
Lines", Proceedings of the Eighth IEEE International Confrerence on Engineering of
Complex Computer Systems, 2002.
13. Gomaa, E. and Kerschberg, L. "Domain Modeling for Software Reuse and Evolution",
Proceedings of Computer Assisted Software Engineering Workshop (CASE 95), 1995.
14. Kang, K., Cohen, S., Hess, J., Novak, W., and Peterson, A.,”Feature-Oriented Domain
Analysis (FODA) Feasibility Study”, CMU/SEI-90-TR-021 ADA235785, 1990.
15. Massonet, P., Deville, Y., and Neve, C. “From AOSE Methodology to Agent
Implementation”, Proceedings of the First Joint Conference on Autonomous Agents and
Multi-Agents Systems, pp. 27-34, 2002.
16. Meekel, J., Horton, T. B., France, R. B., Mellone, C., and Dalvi, S. “From domain models
to architecture frameworks”, Proceedings of the 1997 symposium on Software reusability,
pp. 75-80, 1997.
17. Morisio, M., Travassos, G. H., and Stark, M. “Extending UML to Support Domain
Analysis”, Proceedings of the Fifth IEEE International Conference on Automated Software
Engineering, pp. 321-324, 2000.
18. Nordstrom, G., Sztipanovits, J., Karsai, G., and Ledeczi, A. “Metamodeling - Rapid Design
and Evolution of Domain-Specific Modeling Environments”, Proceedings of the IEEE Sixth
Symposium on Engineering Computer-Based Systems (ECBS), pp. 68-74, 1999.
19. OMG, “Meta-Object Facility (MOF™)”, version 1.4, 2003,
http://www.omg.org/docs/formal/02-04-03.pdf
20. OMG, "Model Driven Architecture (MDA™)", version 1.0.1, 2003,
http://www.omg.org/docs/omg/03-06-01.pdf
21. Petro, J. J., Peterson, A. S., and Ruby, W. F. “In-Transit Visibility Modernization Domain
Modeling Report Comprehensive Approach to Reusable Defense Software” (STARS-VC-
H002a/001/00). Fairmont, WV: Comprehensive Approach to Reusable Defense Software,
1995.
22. Pressman, R.S. "Software Engineering: A Practitioner' s Approach", 5th Edition, New York:
McGraw-Hill, 2000.
23. Reinhartz-Berger, I. and Sturm, A. Behavioral Domain Analysis – The Application-based
Domain Modeling Approach, accepted to UML' 2004, 2004.
24. Rix, M. “Case study of a Successful Firmware Reuse Program”, HP Software Productivity
Conference, 1992.
25. Rumbaugh, J., Blaha, M., Premerlani, W., Eddy, F., and Lorensen, W. Object-Oriented
Modeling and Design, Prentice-Hall International, Inc., Englewood Cliffs, New Jersey,
1991
26. Schleicher, A. and Westfechtel, B. “Beyond Stereotyping: Metamodeling Approaches for
the UML”, Proceedings of the Thirty Fourth Annual Hawaii International Conference on
System Sciences, pp. 1243-1252, 2001.
27. Troy R. “Software Re-Use”, Presentation at ObjectWorld conference, 1993.
28. Valerio, A., Giancarlo, S., and Massimo, F. “Domain analysis and framework-based
software development”, ACM SIGAPP Applied Computing Review, 5 (2), 1997.
29. Van Gigch, J. P. System Design Modeling and Metamodeling. Kluwer Academic
Publishers, 1991.
30. Warmer, J. and Kleppe, A. The Object Constraint Language: Precise Modeling with UML.
Addison-Wesley, 1998.