Software
Design and
Architecture
**Robustness** means that the
software is strong enough to deal Lecture 1
with things it didn't expect. It can
handle unexpected stuff like
strange or wrong information
without breaking or becoming
unsafe. So, even if something
Rana Taimur Khan
unusual happens, the software Lecturer GCUF
keeps working well without crashing
or causing security problems.
**Correctness** means that
the software does what it's
supposed to do, just like it
Design What and Why was planned. It works the
way it's supposed to,
without making mistakes or
messing up the information
What is Design: it handles. It delivers the
right results without any
Cambridge Dictionary Definition: errors or problems with the
data.
Verb
To make or draw plans for something, for example clothes or
buildings.
Design What and Why
What is Design:
Cambridge Dictionary Definition:
Noun
A drawing or set of drawings showing how a building or
product is to be made and how it will work and look.
Introduction to the Discipline of Design:
●We live in a designed world.
●Design is economically important and effects our quality of
life
●Any product that is an aggregate of more primitive
elements, can benefit from the activity of design.
Introduction to the Discipline of Design:
Why we do design
“You can use an eraser on the drafting table or a
sledgehammer on the construction side.”
Frank Lloyd Wright
Design Objectives
System Specification The Software Design Process
A “blueprint” for implementation
Design Objectives
During the design phase the software engineers apply their
knowledge of:
• The problem Domain
• Implementation technologies
Design Objectives
• Translate system specifications into plans for the technical
implementation of the software.
• Serve as a technical plan for implementation.
• Specifies the overall structure and organization of the
eventual code.
• The system or program should meet customer's need.
What should be the design
• Should be easy to implement.
• Should be efficient
• Should be easily extendible to meet new needs.
Software Design
Complexity
• Poorly design programs are difficult to understand and
modify.
Software Design
Complexity and Size
• The size does matter
• The larger the program the more pronounced are
the consequences of poor design.
Software Design
Types of Complexities
Mainly there are two types of Complexities
1. Essential Complexities
Complexities that are inherent in the problem
2. Accidental/Incidental Complexities
Complexities that are artifacts of the solution.
Software Design
Types of Complexities
The total amount of complexity in a software solution is:
Essential Complexities
+
Accidental Complexities
Role of Design in Complexity
• Design is an antidote to Complexity
• Design is a primary tool for managing essential and accidental
complexities in software.
Software Design
Why is Software Design Hard
• Design is difficult because design is an abstraction of the
solution which has yet to be created
Software Design
A science or an Art
• Science is a repeatable process
• Art is not a repeatable process it can be unique
Difficulty with Design
Design is an art as well as Science
Software Design
A Wicked Problem
Wicked Problem:
• A problem that can only be clearly defined by completely
solving it
-Even those proficient at software design might not be able
to fully explain how they arrived at the result.
Design Process
More Systematic and Predictable
The design process can be made more systematic and
predictable through the applications of methods, techniques
and patterns all applied according to principles and
heuristics.
Dealing with Software Complexity Different
rules and principles
1. Essential Complexities 2. Accidental/Incidental Complexities
Complexities that are Complexities that are artifacts
inherent in the problem of the solution.
• Good design does not reduce the total amount of essential complexity in a
solution, but it will reduce the amount of complexity that a programmer has to
deal with at any one time.
• A good design will manage essential complexities inherent in the problem
without adding to accidental complexities consequential to the solution.
Dealing with Software Complexity Different
rules and principles
1. Modularity:
• We subdivide the solution into smaller and easier to
manage components. After that we apply Divide and
Conquer rule.
2. Hierarchical Organization:
• Larger components maybe composed of smaller
components.
Dealing with Software Complexity Different
rules and principles
3. Information Hiding:
• Hide details and complexity behind simple interface.
4. Abstraction:
• Use abstraction to suppress details in place where they are
unnecessary.