Chapter 12-Domain Analysis
Chapter 12-Domain Analysis
D OMAIN A NALYSIS
Domain Analysis, the next stage of development, is concerned
with devising a precise, concise, understandable, and correct
model of the real world.
Before building anything complex, the builder must
understand the requirements. Requirements can be stated in
words, but these are often imprecise and ambiguous.
During analysis, we build models and begin to understand the
requirements deeply.
To build a domain model, we must interview business experts,
examine requirements statements, and scrutinize related
artifacts.
We must analyze the implications of the requirements and
restate them rigorously. It is important to abstract important
features first and defer small details later.
The successful analysis model states what must be done,
without restricting how it is done, and avoids
implementation decisions.
The model serves several purposes:
It clarifies the requirements.
it provides a basis for agreement between the stakeholders
and the developers.
and it becomes the starting point for design and
implementation.
OVERVIEW OF ANALYSIS
Analysis begins with a problem statement generated during
system conception.
The statement may be incomplete or informal; analysis makes
it more precise and exposes ambiguities and inconsistencies.
The problem statement should not be taken as immutable but
should serve as a basis for refining the real requirements.
Next, we must understand the real-world system described by
the problem statement, and abstract its essential features into a
model.
Statements in natural language are often ambiguous,
incomplete and inconsistent. The analysis model is a precise,
concise representation of the problem that permits answering
and building a solution.
Subsequent design steps refer to the analysis model, rather than
the original vague problem statement.
The process of constructing a rigorous model of the problem
domain forces the developer to confront misunderstanding
early in the development process while they are still easy to
correct.
The analysis model addresses the three aspects of objects:
static structure of objects(class model),
interactions among objects (interaction model) ,
and life cycle histories of objects (state model)
Almost all problems have useful class models derived from
real-world entities. Problems concerning reactive control and
timing, such as user interfaces and process control, have
important state models.
Problems containing significant computation as well as
systems that interact with other systems and different kinds of
users have important interaction models.
Analysis is not a mechanical process. The exact
representations involve judgment and in many regards are a
matter of art.
Most problem statements lack essential information, which
must be obtained from the requestor or from the analyst’s
knowledge of the real-world problem domain.
Also there is a choice in the level of abstraction for the model.
The analyst must communicate with the requestor to clarify
ambiguities and misconceptions.
The analysis models enable precise communication.
Analysis is divided into two sub stages:
The first domain analysis, focuses on understanding the
real-world essence of a problem
The second, application analysis, builds on the domain
model-incorporating major application artifacts that are seen
by users and must be approved by them.
DOMAIN CLASS MODEL
The first step in analyzing the requirements is to construct a
domain model. The domain model shows the static structure of
the real-world system and organizes it into workable pieces.
The domain model describes real-world classes and their
relationships to each other.
During analysis, the class model precedes the state and
interaction models.
Information for the domain model comes from the problem
statement, artifacts from related systems, expert knowledge of
the application domain, and general knowledge of the real
world.
Make sure you consider all information that is available and do
not rely on single source.
Find classes and associations first, as they provide the overall
structure and approach to the problem. Next add attributes to
describe the basic network of classes and associations.
Then combine and organize classes using inheritance. Attempts
to specify inheritance directly without first understanding
classes and their attributes can distort the class structure to
match preconceived notions.
Operations are usually unimportant in a domain model. The
main purpose of a domain model is to capture the information
content of a domain.
It is best to get ideas down on paper before trying to organize
them too much, even though they may be redundant and
inconsistent, so as not to lose important details.
An initial analysis model is likely to contain flaws that must
be corrected by later iterations. The entire model need not be
constructed uniformly.
Some aspects of the problem can be analyzed in depth
through several iterations while other aspects are still
sketchy.
We must perform the following steps to construct a domain
class model:
❑ Find classes.
❑ Prepare a data dictionary.
❑ Find associations.
❑ Find attributes of objects and links.
❑ Organize and simplify classes using inheritance.
Verify that access paths exist for likely queries.
Iterate and refine the model.
Reconsider the level of abstraction.
Group classes into packages.
Finding Classes
The first step in constructing a class model is to find relevant
classes for objects from application domain.
Objects include physical entities, such as houses, persons, and
machines, as well as concepts, such as trajectories, seating
arrangements, and payment schedules.
All classes must make sense in the application domain, avoid
computer implementation constructs, such as linked lists and
subroutines.
Not all classes are explicit in the problem statement; some are
implicit in the application domain or general knowledge.