Module 4.0 Sofware Design
Module 4.0 Sofware Design
1
:- Santosh V. Kadam ,W.I.E.T
2
4. Software Design
Design Principles & Concepts
Effective Modular Design
Cohesion
Coupling
Architectural design
Disadvantages of Modularity
1. Execution time maybe, but not certainly, longer
2. Storage size perhaps, but is not certainly, increased
3. Compilation and loading time may be longer
4. Inter-module communication problems may be increased
5. More linkage required, run-time may be longer, more source lines must
be written, and more documentation has to be done
30
Bottom-up Approach
• A bottom-up approach begins with the lower details and moves towards
up the hierarchy, as shown in fig. below
• This approach is suitable in case of an existing system.
• Bottom-Up Model is a system design approach where the parts of a
system are defined in details. Once these parts are designed and
developed, then these parts or components are linked together to
prepare a bigger component. This approach is repeated until the
complete system is built.
• The advantage of Bottom-Up Model is in making decisions at very low
level and to decide the re-usability of components.
31
Key Bottom-Up Model Top-Down Model
In Bottom-Up Model, the focus is
In Top-down Model, the focus is on
on identifying and resolving
breaking the bigger problem into
Focus smallest problems and then
smaller one and then repeat the
integrating them together to
process with each problem.
solve the bigger problem.
Bottom-Up Model is mainly used Top-Down Model is followed by
Language by object oriented programming structural programming languages
languages like Java, C++, etc. like C, Fortran, etc.
Bottom-Up model is better suited
Top-down model has high ratio of
as it ensures minimum data
Redundancy redundancy as the size of project
redundancy and focus is on re-
increases.
usability.
Bottom-Up model have high Top-down model has tight coupling
Interaction interactivity between various issues and low interactivity between
modules. various modules.
Bottom-up model is based on Top-down model is based on
Approach
composition approach. decomposition approach.
In Bottom-Up, sometimes it is
In Top-Down, it may not be possible 32
to
difficult to identify overall
Santosh V. Kadam ,W.I.E.T.
Issues break the problem into set of smaller
functionality of system in initial
Concurrency
• Back in time, all software are meant to be executed
sequentially. By sequential execution, we mean that the coded
instruction will be executed one after another implying only
one portion of program being activated at any given time.
• Say, a software has multiple modules, then only one of all the
modules can be found active at any time of execution
• In software design, concurrency is implemented by splitting
the software into multiple independent units of execution, like
modules and executing them in parallel.
• In other words, concurrency provides capability to the
software to execute more than one part of code in parallel to
each other. It is necessary for the programmers and designers
to recognize those modules, which can be made parallel
execution.
• Example The spell check feature in word processor is a module
of software, which runs along side the word processor itself.
Santosh V. Kadam ,W.I.E.T. 33
Coupling
• Coupling effectively represents how the modules can
be “connected” with other module or with the
outside world.
• Coupling is a measure of interconnection among
modules in a program structure.
• Coupling depends on the interface complexity
between modules.
• The goal is to strive for lowest possible coupling
among modules in software design.
• The property of good coupling is that it should reduce
or avoid change impact and ripple effects. It should
also reduce the cost in program changes, testing and
maintenance. Santosh V. Kadam ,W.I.E.T. 34
Coupling
Module Coupling
• In software engineering, the coupling is the degree of interdependence
between software modules.
• Two modules that are tightly coupled are strongly dependent on each other.
• However, two modules that are loosely coupled are not dependent on each
other.
• Uncoupled modules have no interdependence at all within them.
The various types of coupling techniques :
• A good design is the one that has low coupling. Coupling is measured by the
number of relations between the modules. That is, the coupling increases as
the number of calls between modules increase or the amount of shared data
is large. Thus, it can be said that a design with high coupling will have more
errors.
High Level Design is the general Low Level Design is like detailing HLD
01. system design means it refers to means it refers to component-level
the overall system design. design process.
High Level Design expresses the Low Level Design expresses details
05.
brief functionality of each module. functional logic of the module.
Here in High Level Design the Here in Low Level Design participants are
07. participants are design team, review design team, Operation Teams, and
team, and client team. Implementers.
It is created first means before Low It is created second means after High Level
08.
Level Design. Design.
In HLD the input criteria is Software In LLD the input criteria is reviewed High
09.
Requirement Specification (SRS). Level Design (HLD).
Each layer provides a set of services to the layer above it and acts as a client to the layer
below it. The interaction between layers is provided through protocols (connectors) that
define a set of rules to be followed during interaction. One common example of this
architectural style is OSI-ISO (Open Systems Interconnection-International Organization for
Standardization) communication system.
Santosh V. Kadam ,W.I.E.T. 94
Component Level Design
• Component is nothing but a model for computer software.
• The OMG (Object Management Group is a computer industry standards
consortium) Unified Modeling Language Specification defines the concept of
component more formally and it is - " Component is a modular, deployable and
replaceable part of system that encapsulates the implementation and exposes
the set of interfaces".
• Components are the part of software architecture and hence they are important
factors in achieving the objectives and requirements of system to be built.
• Components can communicate and collaborate with other components.
• Design models can be prepared using object oriented views and conventional
views.
• The component-level design can be represented by using different approaches.
One approach is to use a programming language while other is to use some
intermediate design notation such as graphical (DFD, flowchart, or structure
chart), tabular (decision table), or text-based (program design language)
whichever is easier to be translated into source code.
• The component-level design provides a way to determine whether the defined
algorithms, data structures, and interfaces will work properly. Note that a
component (also known as module) can be defined as a modular building block
for the software. However, the meaning of component differs according to how
software engineers use it.
Santosh V. Kadam ,W.I.E.T. 95
The components has different views as follows:
1. An object-oriented view
• An object-oriented view is a set of collaborating classes.
• The class inside a component is completely elaborated and it consists of all the
attributes and operations which are applicable to its implementation.
• To achieve object-oriented design it elaborates analysis classes and the
infrastructure classes.
2. The traditional view
• A traditional component is known as module.
• It resides in the software and serves three important roles which are control
component, a problem domain component and an infrastructure component.
• A control component coordinate is an invocation of all other problem domain
components.
• A problem domain component implements a complete function which is needed
by the customer.
• An infrastructure component is responsible for function which support the
processing needed in the problem domain.
3. The Process related view
• This view highlights the building system out of existing components.
• The design patterns are selected from a catalog and used to populate the
architecture.
Disadvantages:
• Uses large amounts of memory – although this is less of
a concern as computers get more powerful
• Typically decreased options.
• Usually less customizable. Not easy to use one button
for tons of different variations.
Graphics Graphics elements can be mixed with text or the same display.
For Example
Microsoft Office family has several application products such as MS
WORD, MS Power Point, MS Access and so on.
The interface of each of these product is consistent (of course with
necessary changes according to its working!).
That means there is a title bar, menu bar having menus such as File, Edit,
View. Insert, Format, Tools, Table, Window, Help on every interface.
Then tool bars and then design layouts are placed on the interface. 118
4. If certain standards are maintained in previous
model of application do not change it until and
unless it is necessary
• Certain sequence of operation becomes a
standard for the user, then do not change these
standards because user becomes habitual with
such practices.
• For instance, control + s is for saving the file
then it has become a standard rule now, if you
assign different short cut keys for saving then it
becomes annoying to the user.
The analysis and design process of a user interface is iterative and can be
represented by a spiral model.
The analysis and design process of user interface consists of four framework
activities. Santosh V. Kadam ,W.I.E.T. 124
1. User, task, environmental analysis, and modeling
• Initially, the focus is based on the profile of users who will interact with
the system, i.e. understanding, skill and knowledge, type of user, etc,
based on the user’s profile users are made into categories.
• From each category requirements are gathered. Based on the
requirements developer understand how to develop the interface.
• Once all the requirements are gathered a detailed analysis is conducted.
In the analysis part, the tasks that the user performs to establish the goals
of the system are identified, described and elaborated.
• The analysis of the user environment focuses on the physical work
environment.
• Among the questions to be asked are:
– Where will the interface be located physically?
– Will the user be sitting, standing, or performing other tasks unrelated
to the interface?
– Does the interface hardware accommodate space, light, or noise
constraints?
– Are there special human factors considerations driven by
environmental factors? Santosh V. Kadam ,W.I.E.T. 125
2. Interface Design
• This phase serves as the foundation for the implementation phase.
• The goal of this phase is to define the set of interface objects and
actions i.e. Control mechanisms that enable the user to perform desired
tasks. Indicate how these control mechanisms affect the system.
• Specify the action sequence of tasks and subtasks, also called a user
scenario.
• Indicate the state of the system when the user performs a particular
task.
• Always follow the three golden rules stated by Theo Mandel.
• Design issues such as response time, command and action structure,
error handling, and help facilities are considered as the design model is
refined.
3. Interface construction and implementation
• The implementation activity begins with the creation of prototype
(model) that enables usage scenarios to be evaluated.
• As iterative design process continues a User Interface toolkit that allows
the creation of windows, menus, device interaction, error messages,
commands, and many other elements of an interactive environment can
be used for completing the construction of an interface.
Santosh V. Kadam ,W.I.E.T. 126
4. Interface Validation
• This phase focuses on testing the interface.
• The interface should be in such a way that it should be able to
perform tasks correctly and it should be able to handle a variety
of tasks.
• It should achieve all the user’s requirements.
• It should be easy to use and easy to learn.
• Users should accept the interface as a useful one in their work.
User Interface Analysis and Design
User interface analysis and design can be done with the help of
following steps.
1. Create different models for system functions.
2. The order to perform these functions identify the human-
computer interface tasks.
3. Prepare all interface designs by solving various design issues.
4. Apply modern tools and techniques to prototype the design.
5. Implement design model.
6. Evaluate the design from end
Santosh user
V. Kadam to bring quality in it.
,W.I.E.T. 127
Designing within the Context of Software Engineering
• Software design is a vital activity during the process of software
development. It is carried put irrespective of any process model used.
• During software engineering process, the first task is to identify and
analyze the requirements. Based on this analysis the software design is
developed. This design serves as a basis for code generation and testing.
Hence software design is an intermediate process which translates the
analysis model into design model.
• The four types of elements of analysis model are scenario based
elements, class based elements, behavioral elements, and flow oriented
elements.
• During the scenario based analysis various models such as use case
diagrams, activity diagrams or swimlane diagrams are created. During the
class based analysis the class diagrams are created. During flow oriented
analysis the Data flow diagrams are created. Behavioral analysis can be
done using state diagrams and sequence diagrams.
• The class based elements of analysis model are used to create class
diagrams.
• The flow oriented elements and class based elements are used to
create architectural design.
Santosh V. Kadam ,W.I.E.T. 128
Santosh V. Kadam ,W.I.E.T. 129
• The scenario based elements, flow oriented elements and behavioral
elements are used to create Interface design. The interface design
describes how software communicates with systems.
• The class based elements, flow oriented elements and behavioral
elements are used to create component level design. This design
transforms the structural elements of software architecture into
procedural description of software module.
• Software design is very important for assessing the quality of software.
Because design is the only way that we can accurately translate the user
requirements into the finished software product.
• Without software design, it is difficult to test the software product. Not
only this, but for making a small change in the software - it is the
software design which helps us to make the necessary changes without
disturbing other part of the software.