Chapter 9
Design Engineering
CHAPTER OVERVIEW AND COMMENTS
The intent of this chapter is to provide an introduction to the design process and to describe fundamental design concepts that are essential to an understanding of any software design method. Basic concepts are introduced and a fundamental design model is discussed. The design model consists of the data design, architectural design, interface design, and component-level design.
The goal of design engineering is to produce a model or representation that exhibits firmness, commodity, and delight.
To accomplish this, a designer must practice diversification and then convergence.
Belady states that “diversification is the acquisition of a repertoire of alternatives, the raw material of design: components, component solutions, and knowledge, all contained in catalogs, textbooks, and the mind.”
Once this diverse set of information is assembled, the designer must pick and choose elements from the repertoire that meet the requirements designed by requirement engineering and the analysis models.
As this occurs, alternatives are considered and rejected, and the design engineer converges on “one particular configuration of components, and thus the creation of the final product.”
9.1 Design within the Context of Software Engineering
Software design is the last software engineering action within the modeling activity and sets the stage for construction (code generation and testing).
The flow of information during software design is illustrated in Figure below. The analysis model, manifested by scenario-based, class-based, flow-oriented and behavioral elements, feed the design task.
The architectural design defines the relationship between more structural elements of the software, the architectural styles and design patterns that can be used to achieve the requirements defined for the system, and the constraints that affect the way in which the architectural design can be implemented.
The architectural design can be derived from the System Specs, the analysis model, and interaction of subsystems defined within the analysis model.
The interface design describes how the software communicates with systems that interpolate with it, and with humans who use it. An interface implies a flow of information (data, and or control) and a specific type of behavior.
The component-level design transforms structural elements of the software architecture into a procedural description of software components.
The importance of software design can be stated with a single word – quality. Design is the place where quality is fostered in software engineering. Design provides us with representations of software that can be assessed for quality. Design is the only way that we can accurately translate a customer’s requirements into a finished software product or system.
9.2 Design Process and Design Quality
Software design is an iterative process through which requirements are translated into a “blueprint” for constructing the software.
Initially, the blueprint depicts a holistic view of software, i.e. the design is represented at a high-level of abstraction.
Throughout the design process, the quality of the evolving design is assessed with a series of formal technique reviews or design walkthroughs.
Three characteristics serve as a guide for the evaluation of a good design:
Quality Guidelines
In order to evaluate the quality of a design representation, we must establish technical criteria for good design.
(1) Has been created using recognizable architectural styles or patterns,
(2) Is composed of components that exhibit good design characteristics, and
(3) Can be implemented in an evolutionary fashion
Quality Attributes
Hewlett-Packard developed a set of software quality attributes that has been given the acronym FURPS. The FURPS quality attributes represent a target for all software design:
9.3 Design Concepts
This section discusses many significant design concepts (abstraction, refinement, modularity, architecture, patterns, refactoring, functional independence, information hiding, and OO design concepts).
9.3.1 Abstraction
At the highest level of abstraction, a solution is stated in broad terms using the language of the problem environment. At lower levels of abstraction, a more detailed description of the solution is provided.
As we move through different levels of abstraction, we work to create procedural and data abstractions. A procedural abstraction refers to a sequence of instructions that have a specific and limited function. An example of a procedural abstraction would be the word open for a door.
A data abstraction is a named collection of data that describes a data object. In the context of the procedural abstraction open, we can define a data abstraction called door. Like any data object, the data abstraction for door would encompass a set of attributes that describe the door (e.g. door type, swing direction, weight).
9.3.2 Architecture
Software architecture alludes to the “overall structure of the software and the ways in which the structure provides conceptual integrity for a system.”
In its simplest from, architecture is the structure of organization of program components (modules), the manner in which these components interact, and the structure of data that are used by the components.
Te goal of software design is to derive an architectural rendering of a system. This rendering serves as a framework from which detailed design activities are constructed.
A set of architectural patterns enable a software engineer to reuse design-level concepts.
The architectural design can be represented using one or more of a number of different models.
Structural models represent architecture as an organized collection of program components.
Framework models increase the level of design abstraction by attempting to identify repeatable architectural design frameworks that are encountered in similar types of applications.
Dynamic models address the behavioral aspects of the program architecture, indicating how the structure or system configuration may change as a function of external events.
Process models focus on the design of business or technical process that the system must accommodate.
Functional models can be used to represent the functional hierarchy of a system.
Architectural design will be discussed in Chapter 10.
9.3.3 Patterns
A design pattern “conveys the essence of a proven design solution to a recurring problem within a certain context amidst computing concerns.”
A design pattern describes a design structure that solves a particular design problem within a specific context and amid “forces” that may have an impact on the manner in which the pattern is applied and used.
The intent of each design pattern is to provide a description that enables a designer to determine:
9.3.4 Modularity
Software architecture and design patterns embody modularity; that is, software is divided into separately named and addressable components, sometimes called modules that are integrated to satisfy problem requirements.
Monolithic software (large program composed of a single module) cannot be easily grasped by a software engineer. The number of control paths, span of reference, number of variables, and overall complexity would make understanding close to impossible.
It is the compartmentalization of data and function. It is easier to solve a complex problem when you break it into manageable pieces. “Divide-and-conquer”
Don’t over-modularize. The simplicity of each small module will be overshadowed by the complexity of integration “Cost”.
9.3.5 Information Hiding
It is about controlled interfaces. Modules should be specified and design so that information (algorithm and data) contained within a module is inaccessible to other modules that have no need for such information.
Hiding implies that effective modularity can be achieved by defining by a set of independent modules that communicate with one another only that information necessary to achieve software function.
The use of Information Hiding as a design criterion for modular systems provides the greatest benefits when modifications are required during testing and later, during software maintenance. Because most data and procedures are hidden from other parts of the software, inadvertent errors introduced during modifications are less likely to propagate to other location within the software.
9.3.6 Functional Independence
The concept of functional Independence is a direct outgrowth of modularity and the concepts of abstraction and information hiding.
Design software so that each module addresses a specific sub-function of requirements and has a simple interface when viewed from other parts of the program structure.
Functional independence is a key to good design, and design is the key to software quality.
Independence is assessed using two qualitative criteria: cohesion and coupling.
Cohesion is an indication of the relative functional strength of a module.
Coupling is an indication of the relative interdependence among modules.
A cohesive module should do just one thing.
Coupling is a qualitative indication of the degree to which a module is connected to other modules and to the outside world “lowest possible”.
9.3.7 Refinement
It is the elaboration of detail for all abstractions. It is a top down strategy.
A program is developed by successfully refining levels of procedural detail.
A hierarchy is developed by decomposing a macroscopic statement of function (a procedural abstraction) in a stepwise fashion until programming language statements are reached.
We begin with a statement of function or data that is defined at a high level of abstraction.
The statement describes function or information conceptually but provides no information about the internal workings of the function or the internal structure of the data.
Refinement causes the designer to elaborate on the original statement, providing more and more detail as each successive refinement (elaboration) occurs.
Abstraction enables a designer to specify procedure and data and yet suppress low-level details.
Refinement helps the designer to reveal low-level details as design progresses.
Refinement causes the designer to elaborate on the original statement, providing more and more detail as each successive refinement “elaboration” occurs.
9.3.8 Refactoring
It is a reorganization technique that simplifies the design of a component without changing its function or behavior. When software is re-factored, the existing design is examined for redundancy, unused design elements, inefficient or unnecessary algorithms, poorly constructed data structures, or any other design failures that can be corrected to yield a better design.
Data Abstraction
Procedural Abstraction
“The overall structure of the software and the ways in which that structure provides conceptual integrity for a system.” [SHA95a]
Patterns
Design Pattern Template
Pattern name—describes the essence of the pattern in a short but expressive name
Intent—describes the pattern and what it does
Also-known-as—lists any synonyms for the pattern
Motivation—provides an example of the problem
Applicability—notes specific design situations in which the pattern is applicable
Structure—describes the classes that are required to implement the pattern
Participants—describes the responsibilities of the classes that are required to implement the pattern
Collaborations—describes how the participants collaborate to carry out their responsibilities
Consequences—describes the “design forces” that affect the pattern and the potential trade-offs that must be considered when the pattern is implemented
Related patterns—cross-references related design patterns
Modular Design
Modularity: Trade-offs
What is the "right" number of modules for a specific software design?
Information Hiding
Why Information Hiding?
Stepwise Refinement
Functional Independence
Sizing Modules: Two Views
Refactoring
OO Design Concepts
9.3.9 Design classes
As the design model evolves, the software team must define a set of design classes that refines the analysis classes and creates a new set of design classes.
Five different classes’ types are shown below:
Inheritance (Example)
Messages
Polymorphism
Conventional approach …
case of graphtype:
if graphtype = linegraph then DrawLineGraph (data);
if graphtype = piechart then DrawPieChart (data);
if graphtype = histogram then DrawHisto (data);
if graphtype = kiviat then DrawKiviat (data);
end case;
All of the graphs become subclasses of a general class called graph. Using a concept called overloading [TAY90], each subclass defines an operation called draw. An object can send a draw message to any one of the objects instantiated from any one of the subclasses. The object receiving the message will invoke its own draw operation to create the appropriate graph.
graphtype draw
9.4 The Design Model
It is equivalent to a set of detailed drawings and specs for each room in a house.
The component-level design for software fully describes the internal detail of each software component.
Indicates how software functionally and subsystem terms will be allocated within the physical computing environment that will support the software.
9.5 Pattern-Based Software Design
9.5.1 Describing a Design Pattern
9.5.2 Using Patterns in Design
Design patterns can be used throughout software design.
Once the analysis model has been developed, the designer can examine a detailed representation of the problem to be solved and the constraints that are imposed by the problem.
The problem description is examined at various levels of abstraction to determine if it is amenable to one or more of the following design patterns:
Architectural patterns: These patterns define the overall structure of the software, indicate the relationships among subsystems and software components, and define the rules for specifying relationships among the elements (classes, packages, components, subsystems) of the architecture.
Design patterns: These patterns address a specific element of the design such as an aggregation of components to solve some design problems, relationships among components, or the mechanisms for effecting component-to-component communication.
Idioms: Sometimes called coding patterns, these language-specific patterns generally implement an algorithmic element of a component, a specific interface protocol, or a mechanism for communication among components.
Frameworks
Source: http://www2.southeastern.edu/Academics/Faculty/galkadi/285/notes/Chapter9.doc
Web site to visit: http://www2.southeastern.edu
Author of the text: not indicated on the source document of the above text
If you are the author of the text above and you not agree to share your knowledge for teaching, research, scholarship (for fair use as indicated in the United States copyrigh low) please send us an e-mail and we will remove your text quickly. Fair use is a limitation and exception to the exclusive right granted by copyright law to the author of a creative work. In United States copyright law, fair use is a doctrine that permits limited use of copyrighted material without acquiring permission from the rights holders. Examples of fair use include commentary, search engines, criticism, news reporting, research, teaching, library archiving and scholarship. It provides for the legal, unlicensed citation or incorporation of copyrighted material in another author's work under a four-factor balancing test. (source: http://en.wikipedia.org/wiki/Fair_use)
The information of medicine and health contained in the site are of a general nature and purpose which is purely informative and for this reason may not replace in any case, the council of a doctor or a qualified entity legally to the profession.
The following texts are the property of their respective authors and we thank them for giving us the opportunity to share for free to students, teachers and users of the Web their texts will used only for illustrative educational and scientific purposes only.
All the information in our site are given for nonprofit educational purposes
The information of medicine and health contained in the site are of a general nature and purpose which is purely informative and for this reason may not replace in any case, the council of a doctor or a qualified entity legally to the profession.
www.riassuntini.com