Chapter Three of SE
Chapter Three of SE
Software Design
Levels in design
Strategy of design
Phases of design
Principles Leading to Good Design
1
Software Design
• Design is the highly significant phase in the software
development where the designer plans “how” a software system
should be produced in order to make it
• Functional
• Reliable
• reasonably easy to understand, modify and maintain.
• It is about solution of the problems mentioned in requirement
document.
• Design is a creative activity
• it determines the major characteristics of a system
• Design has great impact on testing and maintenance
• The output of this phase is a design document to be used for
implementing the system
2
Software Design…
• Definition: Design is a problem-solving process whose objective
is to find and describe a way:
• to implement the system’s functional requirements...
• while respecting the constraints imposed by the quality,
platform and process requirements including the budget
• and while adhering to general principles of good design
quality
• A designer is faced with a series of design issues
• These are sub-problems of the overall design problem.
• Each issue normally has several alternative solutions: design
options.
• The designer makes a design decision to resolve each issue.
• This process involves choosing the best option from among
the alternatives.
3
Software Design…
• To make each design decision, the software engineer uses
knowledge of the requirements , the design as created so far, the
technology available , software design principles and ‘best
practices’ and what has worked well in the past
• The space of possible designs that could be achieved by choosing
different sets of alternatives is often called the design space
• The diagram below show example of design space.
4
Levels in Design Process
• The design process for software systems often has two levels.
• Top-level design (System design or conceptual design ):
• Identifies the components needed for the system, their
behavior, and relationships (architectural design)
• Decides which modules are needed for the system, the
specifications of these modules, and how the modules should
be interconnected.
• Detailed design (Logic design):
• The internal design of the modules, or how the specifications
of the module can be satisfied, is decided.
• For each module data structures and algorithms are designed.
• Outcome of detailed design is module specification.
5
Strategy of design
• Top-down design
• First design the very high level structure of the system.
• Then gradually work down to detailed decisions about low-level
constructs.
• Finally arrive at detailed decisions such as:
• the format of particular data items;
• the individual algorithms that will be used.
• Bottom-up design
• Make decisions about reusable low-level utilities.
• Then decide how these will be put together to create high-level
constructs.
6
Strategy of design…
bottom-up top-down
Requirements
specification
Design acti
vities
Architectur
al Abstract Interface Component Data Algorithm
design specificatio design design structur
e design
n design
Software Data
System Interface Component Algorithm
specification structure
architectur
e specifica
tion specification specifica
tion
specification
Design pr
oducts
8
Principles Leading to Good Design
9
In order to achieve the design goals (especially for object oriented
systems) we need to follow the following design principles
11
Background
What is Architecture ?
It is the manner in which the various components of the building
are integrated to form a cohesive whole.
It is the way in which the building fits into its environment and
meshes with other buildings in it.
It is the degree to which the building meets its stated purpose and
satisfies the needs of its owner.
It is the aesthetic feel of the structure the visual impact of the
building and the way textures, colors, and materials are combined to
create the external face and the internal living environment.
It is small details the design of lighting fixtures, the type of
flooring, the placement of wall hangings, the list is almost endless
Finally, it is art.
12
Cont..
The software architecture of a program or computing system is the
structure or structures of the system
Which comprise software components, the externally visible
properties of those components, and the relationships among them.
13
The Importance of Architecture
Representations of software architecture are an enabler for
communication between all parties interested in the development of
a computer-based system.
The architecture highlights early design decisions that will have a
profound
Impact on all software engineering work that follows and, as
important, on the ultimate success of the system as an operational
entity.
It constitutes a relatively small, intellectually graspable model of
how the system is structured and how its components work
together.
14
Data Design
Data design sometimes it is called data architecting.
It creates a model of data or information that is represented at a high
level of abstraction.
Data model is then refined into progressively more implementation-
specific representations that can be processed by the computer-based
system.
In many software applications, the architecture of the data will have a
profound influence on the architecture of the software that must
process it.
The structure of data has always been an important part of software
design.
15
Cont..
At the program component level, the design of data structures and
the associated algorithms required to manipulate them is essential to
the creation of high-quality applications.
At the application level, the translation of a data model (derived as
part of requirements engineering) into a database is pivotal to
achieving the business objectives of a system.
The data design activity translates these elements of the
requirements model into data structures at the software component
level and, when necessary, a database architecture at the application
level.
16
Architectural Styles
Data-centered architectures
A data store (file/database) resides at the center of this architecture
and is accessed frequently by other components that update, add,
delete, or otherwise modify data within the store.
Client software accesses a central repository. In some cases the data
repository is passive.
That is, client software accesses the data independent of any
changes to the data or the actions of other client software.
A variation on this approach transforms the repository into a
“blackboard” that sends notifications to client software when data of
interest to the client change.
17
Data-centered architectures
18
Data-flow architectures
This architecture is applied when input data are to be transformed
through a series of computational or manipulative components into
output data.
A pipe and filter pattern has a set of components, called filters,
connected by pipes that transmit data from one component to the
next.
Each filter works independently
Those components upstream and downstream, is designed to
expect data input of a certain form, and produces data output of a
specified form.
However, the filter does not require knowledge of the working of
its neighboring filters.
19
Evaluating Architectures
Architecture impacts non-functional attributes like modifiability,
performance, reliability, portability, security, reusability and
availability
That is Architecture plays a much bigger impact on these properties
than the design & coding choices
• Attributes like usability are not impacted
20
Documenting Architectural Design
Regardless of the development process that you use, a description
of the software architecture can be essential for any project, big or
small.
While designing and brainstorming diagrams are a good means
diagrams are not sufficient for documenting architectural design
An architectural design document will need to precisely specify the
different models, and the relationship between them
software architecture document
• facilitates communication between stakeholders,
• contains early decisions about high-level design,
• allows reuse of design components and patterns between
projects
21