Unit 03
Unit 03
Design process is a sequence of steps carried through which the user requirements are
translated into a system or software model.
The design is represented at high level of Abstraction.
Design Principles
Principles of Software Design
• Should not suffer from “Tunnel Vision” – should not only focus on
completing or achieving the aim but on other effects also.
• Traceable to analysis model – which means it should satisfy all the
requirements that software requires to develop a high-quality product.
• Should not “Reinvent The Wheel” - means it should not waste time or
effort in creating things that already exist
• Minimize Intellectual distance – It reduce the gap between real-world
problems and software solutions for that problem
• Exhibit uniformity and integration – it should be uniform throughout
the process without any change and Integration means it should mix or
combine all parts of software.
• Accommodate change – software should adjust to the change that is
required to be done as per the user’s need
• Degrade gently – which means it should work properly even if an error
occurs during the execution.
• Assessed or quality – the quality of the design needs to be checked and
focused on.
• Review to discover errors – The design should be reviewed which
means that the overall evaluation should be done to check if there is any
error present or if it can be minimized
• Design is not coding and coding is not design – Design means
describing the logic of the program to solve any problem and coding is a
type of language that is used for the implementation of a design.
Design Quality
• Design Quality shows how good and reliable a product is.
Types of Cohesion:
• 1. Coincidentally Cohesive – Set of Tasks are related
with each other
• 2. Logically Cohesive – Performs the tasks related with
each other
• 3. Temporal Cohesion – Module in which the task needs
to be executed in some specific time span
• 4. Procedural Cohesion – Processing elements of a
Coupling
• It 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.
• Various types of Coupling are:
• 1. Data Coupling
• 2. Control Coupling
• 3. Common Coupling
• 4. Content Coupling
Design Models
• 1. Component level Design
• 2. Interface Design
• 3. Architectural Design
• 4. Data Design
Component Level Design
• Component level design is more detailed design of the
software system along with the specifications
• Data Design Element : It represents the high level of
Abstraction. The data has great impact on the
architecture of software systems.
• Architectural Design element: gives the layout for
overall view of the software.
1. Data flow models
2. Information obtained from Application
Domain
3. Architectural Pattern & styles
Interface Design Elements: detailed design of the
software systems.
1. User interface – Ex: GUI
2. External Interface – Ex: Networking
Software Architecture
• Software Architecture is a structure of systems which
consists of various components, externally visible
properties of these components and the inter –
relationship among these components.
Structural partitioning:
1. Horizontal Partitioning
2. Vertical Partitioning
Horizontal Partitioning : Defines separate branches of
the modular hierarchy for each major program function
It can be done by partitioning systems into input, data
transformation & output.
Vertical Partitioning : Suggests the control & work
should be distributed top-down in program structure.
Horizontal Partitioning
Vertical Partitioning
Architectural Styles & Patterns
• It is a pattern for creating the system architecture
for given problem.
• System categories defines the architectural style:
• 1. Components – Perform a function
Ex: Data bases, client & servers
• 2. Connectors – Enable communication – defines how the
components communicate, co-ordinate and co-operate
• Ex: Pipes, call
• 3. Constraints - Defines how the system can be
integrated
• 4. Semantic models – Specify how to determine a systems
over all properties from the properties of its parts.
Commonly used Architectural
styles are :
• 1. Data Centered Architectures
• 2. Data Flow Architectures
• 3. Call & Return Architecture
• 4. Object Oriented Architecture
• 5. Layered Architecture
Data Centered Architecture
• In this architecture the data store lies at the
centre of the architecture and other components
frequently access it by performing add, delete
& modify operations.
• In data Centered architecture :
• Components are : Database elements such as
Tables & enquires
• Communications are: by relationships
• Constraints are : Client software has to
request central data store for information.
Data Flow Architectures
• In this architecture series of transformations
are applied to produce the output data. The set
of components called filters are connected by
pipes to transform the data from one component
to another.
Call & Return Architecture
• The program structure can be easily modified
or scaled.
• The program structure is organized into modules
within the program.
Object Oriented Architecture
• In this architecture the system is decomposed
into number of interacting objects
Layered Architecture
• Layered Architecture is composed of different
layers. Each layer is intended to perform
specific operations. Various component in each
layer perform specific operations.
Architectural Patterns
• Architectural pattern is basically an approach for
handling behavioural characteristics of software
systems.
• Following are the architectural pattern domains they
are:
• 1. Concurrency : It means handling multiple tasks in
parallel. For example in operating system, multiple
tasks are executed in parallel.
• 2. Persistence: Continuity in the data can be
maintained by the persistence pattern.
• 3. Distribution : It refers to the way in which the
system components communicate with each other in
distributed systems. Two major problems
UML(Unified Modeling Language)
• It is a graphical language, used in object – oriented
development.
• It is a standardized modeling language.
• UML is a visual modeling language. “A picture is worth
a thousand words”
• UML is s standard language for software blueprints
• In the early 1990’s – Grady Booch, James Rumbaugh &
Ivor Jacobson are the primary contributors to UML
• Model
• Unified
• Language
• Model: A model is a simplification of reality
• It’s a representation of a subject or objects
• Unified : It is to bring together the information
systems and technology industry’s best engineering
practices.
• Language: It enables us to communicate about a subject
which includes the requirements and the system.
They are:
1) Things (object-oriented parts of UML)
2) Relationships (relational parts of UML)
3) Diagrams
• 1.Things: Things are the abstractions.
• A diagram can be viewed as a graph containing
vertices and edges.
• In UML, vertices are replaced by things, and
the edges are replaced by relationships.
• There are four types of things in UML.
• They are:
• a) Structural things (nouns of UML – static
parts)
• b) Behavioral things (verbs of UML – dynamic
parts)
• c) Grouping things (organizational parts)
• d) Annotational things (explanatory parts)
Structural things:
• Represents the static aspects of a software
system. There are six structural things in UML.
• They are:
• 1) Class
• 2) Interface
• 3) Use Case
• 4) Collaboration
• 5) Component
• 6) Node
1. Class:
• A class is a collection of similar objects having
similar attributes, behavior, relationships and
semantics.
• Graphically class is represented as a rectangle
with three compartments.
• Graphical representation:
• Interface: An interface is a collection of operation
signatures and/or attribute definitions that ideally
define a cohesive set of behavior.
• Graphically interface is represented as a circle or a
class symbol stereotyped with interface.
• Use Case: A use case is a collection of actions,
defining the interactions between a role (actor) and
the system.
• Graphically use case is represented as a solid ellipse
with its name written inside or below the ellipse.
• Graphical representation:
• Collaboration: A collaboration is the collection of
interactions among objects to achieve a goal.
• Graphically collaboration is represented as a dashed
ellipse.
• A Collaboration can be a collection of classes or
other elements
• Component: A component is a physical and replaceable
part of a system.
• Graphically component is represented as a tabbed
rectangle.
• Examples of components are executable files, dll
files, database tables, files and documents.
• Graphical Representation:
• Node: A node is a physical element that exists at run
time and represents a computational resource.
• Graphically node is represented as a cube.
• Examples of nodes are PCs, laptops, smart phones or
any embedded system.
• Graphical representation:
B) Behavioural Things
• It represents the dynamic aspects of a software system.
• Behavior of a software system can be modeled as
interactions or as a sequence of state changes.
• Interaction or sequence: A behavior made up of a set of
messages exchanged among a set of objects to perform a
particular task.
• A message is represented as a solid arrow.
• Below is an example of interaction representing a phone
conversation:
C) Grouping Things
• Elements which are used for organizing related things
and relationships in models.
• Package: A general-purpose mechanism for organizing
elements into groups. Graphically package is
represented as a tabbed folder.
• Graphical representation:
• d) Annotational Things Note: A symbol to display
comments.
• Graphically note is represented as a rectangle with a
dog ear at the top right corner.
• Graphical representation: