You are on page 1of 37

Faculty of computer

science
Software Engineering II
Lecturer: Asadullah Jalali
Software Architecture and Design

Chapter # 02
Software Design Principles
Software Architecture and Design

Lecture Outline
 What is Software Design?
 Objectives of Software Design.
 Software Design Principles
 Architecture Design.
 Data design
 User interface Design
 Types of user interfaces
Software Architecture and Design

Software Design
Software design is a mechanism to transform user requirements into some
suitable form, which helps the programmer in software coding and
implementation. It deals with representing the client's requirement, as
described in SRS (Software Requirement Specification) document, into a
form, i.e., easily implementable using programming language.

The software design phase is the first step in SDLC (Software Design
Life Cycle), which moves the concentration from the problem domain to
the solution domain. In software design, we consider the system to be a
set of components or modules with clearly defined behaviors &
boundaries.
Software Architecture and Design

Software Design
Software Architecture and Design

Software Design
The purpose of an external design document is to
communicate how the system will appear to its users, how it
will interface with existing work processes, how it will
interface with other pieces of software, and what kinds of
work products are required /produced by the system.
Software Architecture and Design

Software Design
Definition
 As we know that Software design is a phase in software engineering, in which
a blueprint is developed to serve as a base for constructing the software
system. 
 IEEE defines software design as 'both a process of defining, the architecture,
components, interfaces, and other characteristics of a system or component
and the result of that process.’
Software Architecture and Design

Objectives of Software Design


Following are the purposes of Software design:
Software Architecture and Design

Objectives of Software Design


Following are the purposes of Software design:

1.Correctness: Software design should be correct as per requirement.


2.Completeness: The design should have all components like data structures,
modules, and external interfaces, etc.
3.Efficiency: Resources should be used efficiently by the program.
4.Flexibility: Able to modify on changing needs.
5.Consistency: There should not be any inconsistency in the design.
6.Maintainability: The design should be so simple so that it can be easily maintainable
by other designers.
Software Architecture and Design

Software Design Principles


Software design principles are concerned with providing means to
handle the complexity of the design process effectively.
Effectively managing the complexity will not only reduce the effort
needed for design but can also reduce the scope of introducing errors
during design.
Software Architecture and Design

Software Design Principles


Following are the principles of Software Design
Software Architecture and Design

Software Design Principles


1) Problem Partitioning
For small problem, we can handle the entire problem at once but for the significant
problem, divide the problems and conquer the problem it means to divide the
problem into smaller pieces so that each piece can be captured separately.
For software design, the goal is to divide the problem into manageable pieces.
Benefits of Problem Partitioning
1.Software is easy to understand
2.Software becomes simple
3.Software is easy to test
4.Software is easy to modify and expand
5.Software is easy to maintain
Software Architecture and Design

Software Design Principles


2) Abstraction
An abstraction is a process whereby we can identify the important
aspects of any event of fact and ignore its details.
Abstraction can be used for existing element as well as the component
being designed.
There can be many level of abstraction.

 Here, there are some common abstraction mechanisms


1.Procedural Abstraction
2.Data Abstraction
3.Control Abstraction
Software Architecture and Design

Software Design Principles


1) Procedural Abstraction
Procedural abstraction is a named sequence of instructions that has a
specific and limited functions.

For Example in ticket reservation, the word “book” would imply a series of
steps such as get the train number, source station, destination station,
block seat and so on.
Software Architecture and Design

Software Design Principles


2) Data Abstraction
Is a named collection of data that describes a data object.
Data abstraction includes a set of attributes that describe the data object.
Details of the data elements are not visible to the users of data.

For Example, in ticket reservation system the data abstraction “Train” will
include the set of attributes such as train number, originating station,
destination station, and so on.
Software Architecture and Design

Software Design Principles


3) Control Abstraction
Control abstraction defines the control flow without providing the internal
details.

For Example, in ticket reservation system, the Control abstraction are


check if the train is operating on data of journey, check if seats are
available, and book seat if payment is clear.
Software Architecture and Design

Software Design Principles


3) Modularity
Modularity specifies to the division of software into separate modules which are
differently named and addressed and are integrated later on in to obtain the
completely functional software.
It is the only property that allows a program to be intellectually manageable.
Single large programs are difficult to understand and read due to a large
number of reference variables, control paths, global variables, etc.
Software Architecture and Design

Software Design Principles


Advantages and Disadvantages of Modularity
Advantages of Modularity
There are several advantages of Modularity
 It allows large programs to be written by several or
different people
 It encourages the creation of commonly used routines to
be placed in the library and used by other programs.
 It provides more checkpoints to measure progress.
 It provides a framework for complete testing, more
accessible to test
Software Architecture and Design

Software Design Principles


Disadvantages of Modularity
There are several disadvantages of Modularity
 Execution time maybe, but not certainly, longer
 Storage size perhaps, but is not certainly, increased
 Compilation and loading time may be longer
 Inter-module communication problems may be increased
 More linkage required, run-time may be longer, more
source lines must be written, and more documentation
has to be done
Software Architecture and Design

Software Design Principles


Strategy of Design
A good system design strategy is to organize the program modules in such a
method that are easy to develop and easy to, change.
Structured design methods help developers to deal with the size and complexity of
programs. Analysts generate instructions for the developers about how code
should be composed and how pieces of code should fit together to form a
program.
To design a system,
There are two possible approaches:
1.Top-down Approach
2.Bottom-up Approach
Software Architecture and Design

Software Design Principles


1. Top-down Approach: This approach starts with the identification
of the main components and then decomposing them into their
more detailed sub-components.

It is more suitable when the software solution needs to be designed


from scratch and specific details are unknown
Software Architecture and Design

Software Design Principles


2. Bottom-up Approach: A bottom-up approach begins with the
lower details and moves towards up the hierarchy, as shown in fig.
This approach is suitable in case of an existing system.
Software Architecture and Design

Architectural Design
Software architectural design represents the structure of data and program
components that are required to build a computer based systems.
Why required this architecture design?
As we know that the architectural design is not the operational software it
mean’s we are not going to write code here
it is the representation or blueprint of the system that they want to develop
Software Architecture and Design

Architectural Design
Software architectural design representing the system in context:
 System engineer must model the context.
 Context diagram: model in which the system interacts with external
entities mean users inputs, outputs, interfaces, software
components will be develop.
Software Architecture and Design

Data Design
Data design: is the first design activity,  The information domain model
developed during analysis phase is transformed data objects into data
structures needed for implementing the software.
Data structures are abstract structures organized in particular way that
are used to organize data and provide various operations upon it.
Most known data structures: array, structure, class, set, hash table,
graph.
Software Architecture and Design

Data Design
The data objects, attributes, and relationships shown in entity
relationship diagrams and the information stored in data dictionary
provide a base for data design activity.
During the data design process, data types are specified along with the
integrity rules required for the data. For specifying and designing
efficient data structures.
Software Architecture and Design

User Interface Design


User interface is the front-end application view to which user interacts
in order to use the software. The software becomes more popular if its
user interface is:
• Attractive
• Simple to use
• Responsive in short time
• Clear to understand
• Consistent on all interface screens
Software Architecture and Design

User Interface Design


 System users often Judge a system by its interface rather then its
functionalities.
 A poorly designed interface can cause a user to make catastrophic
errors.
 Poor user interface design is the reason why so many software system
are never used.
 Most users of business systems interact with these systems through
graphical interfaces although, in some cases, legacy text-based
interfaces are still used
Software Architecture and Design

There are two types of user interfaces


• Command Line Interface: Command Line Interface provides a
command prompt, where the user types the command and feeds to
the system. The user needs to remember the syntax of the command
and its use.
• Graphical User Interface: Graphical User Interface provides the simple
interactive interface to interact with the system. GUI can be a
combination of both hardware and software. Using GUI, user
interprets the software.
Software Architecture and Design

GUI Advantages
 They are easy to learn and use.
• Users without experience can learn to use the system quickly.
 The user may switch quickly from one task to another and can
interact with several different applications.
•Information remains visible in its own window when
attention is switched.
 Fast, full-screen interaction is possible with immediate access to
anywhere on the screen
Software Architecture and Design

User Interface Design Process


The analysis and design process of user interface consists of four
framework activities.
4 1

3
2
The figure implies that each of these tasks will occur more than once, with each pass around
the spiral representing additional elaboration of requirements and the resultant design. The
construction involves prototyping which is the only practical way to validate what has been
designed.
 
Software Architecture and Design

User Interface Design Process


1) User, task, environmental analysis, and modeling:
Initially the focus is on the profile of user, users are categorized and for each
category requirements are gathered and once all requirements are collected then
developer will understand how to develop the interface. In the analysis model, the
task user performs to establish goals of system are identified, described and
elaborated.
These following questions are asked:
1. Where will the interface be located physically?
2. Will the user be sitting, standing, or performing other tasks unrelated to the
interface?
3. Does the interface hardware accommodate space, light, or noise constraints?
Software Architecture and Design

User Interface Design Process


2) Interface Design:
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. Design issues such as response time, command and
action structure, error handling, and help facilities are considered as
the design model is refined. This phase serves as the foundation for the
implementation phase.
Software Architecture and Design

User Interface Design Process


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.
Software Architecture and Design

User Interface Design Process


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.
Software Architecture and Design

User Interface Design Evaluation


Thank you

You might also like