Introduction to software engineering
Course Code: SE104
Target Group: Software Engineering
Instructor: Biniam Behailu
July, 2024
Chapter 5 Outline
Software Design
01 Software design principles
02 Business modeling
03 Process modeling
04 Building an object model using UML
05 Architectural design
06 User experience design
What is Software Design
Once the requirements of a project are understood, the
transformation of requirements into a design begins.
The requirements addressed the “What?”
o what the system is supposed to do?
o what are the constrains?
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 3
What is Software Design
Design addresses the “How?”
o How the system is decomposed into components
o How these components interface and interact
o How each individual component works, etc.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 4
What is Software Design
Design is ……..
o A form of problem solving
o Developing Satisficing Artifacts
o Fitting Form to Context
o Tailoring Artifacts to Users’ Needs
o Problem Setting & Problem Solving
o Understanding & Developing
o Making choices in search of quality
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 5
What is Software Design
Software design is the process of defining the architecture,
components, interfaces, and other characteristics of a software
system or application.
It involves making decisions about the high-level structure of the
software, as well as the detailed design of individual components
and their interactions.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 6
What is Software Design
Software design is a process to transform user requirements into
some suitable form, which helps the programmer in software coding
and implementation.
It is a bridge between requirements and coding.
The process of conceptualizing how a software system will work
before it is implemented.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 7
What is Software Design
During the software design phase, the design document is produced,
based on the customer requirements as documented in the SRS
document.
Hence, this phase aims to transform the SRS document into a design
document.
Software design is the first step in SDLC, which moves the
concentration from problem domain to solution domain.
It tries to specify how to fulfill the requirements mentioned in SRS.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 8
What is Software Design
Software design processes
o Understanding Requirements: gathering information about what the
software needs to accomplish, who will use it, and its functionalities.
o High-Level Design: here, the overall architecture of the software is defined.
Break down the functionalities into smaller, manageable modules.
o Detailed Design: Go deeper into each module, defining its internal
structure, data flow, and algorithms. This is like fleshing out the blueprint
with specific details.
o Documentation: We document the design decisions, making it easier for
programmers and future maintainers to understand the software.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 9
What is Software Design
Therefore,
Software design is the blueprint for building software. It translates
the broad ideas and functionalities (requirements) of a software
project into a clear roadmap for programmers to follow.
Process of breaking down the system into components, defining
interfaces and defining components to a level of detail that enables
their construction.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 10
Activities of System design
In particular, system design includes:
The decomposition of the system into subsystems
The selection of off-the-shelf and legacy components
The mapping of subsystem to hardware
The selection of a persistent data management infrastructure
The selection of an access control policy
The selection of a global control flow mechanism
The handling of boundary conditions
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 11
Software Design Principles
Software design principles are a set of guidelines and best practices
that software developers follow to create …
well-structured, maintainable, efficient, and scalable software
systems.
These principles help developers write code that is …
easy to understand, modify, and extend
ultimately leading to improved software quality.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 12
Software Design Principles
Suggestions for good design:
o Design must enable all requirements of the analysis model and
implicit needs of the customer to be met.
o Design must be readable and an understandable guide for coders,
testers and maintainers.
o The design should address the data, functional and behavioral
domains of implementation
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 13
Software Design Principles
Suggestions for good design:
o The process should consider various approaches based on
requirements.
o The design should be traceable to the requirements analysis model
o The design should not reinvent the wheel -- Reuse!
o Design should imitate the structure in the problem domain
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 14
Software Design Principles (Problem Partitioning)
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
Software is easy to understand
Software becomes simple
Software is easy to test
Software is easy to modify
Software is easy to maintain
Software is easy to expand
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 15
Software Design Principles (Abstraction)
Hide the implementation details of components and expose only the
necessary interfaces, allowing for flexibility and easier maintenance
o Data Abstraction: Hiding the internal details of data structures
and focusing on their functionality.
o Procedural Abstraction: Encapsulating a sequence of steps into
reusable functions.
o Control Abstraction: A program control mechanism without
specifying internal details.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 16
Software Design Principles (Refinement)
Refinement is a process where one or several instructions of the
program are decomposed into more detailed instructions.
Stepwise refinement is a top down strategy
o Basic architecture is developed iteratively
o Step wise hierarchy is developed
Forces a designer to develop low level details as the design progresses
o Design decisions at each stage
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 17
Software Design Principles (Modularity)
Software is divided into separately named and addressable
components called modules /components /subsystems
Follows “divide and conquer” concept, a complex problem is broken
down into several manageable pieces
A need to divide software into optimal sized modules.
Reduces the design complexity and results in easier and faster
implementation by allowing parallel development of various parts of
a system.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 18
Software Design Principles (Modularity)
Advantages
Reduce system complexity.
Enable division of work for a team and individuals.
Allow subsystem to be replaced/modified with out affecting the other
subsystem
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 19
Software Design Principles (Encapsulation/Information Hiding )
Grouping and packaging the elements and internal details of an
abstraction and making those details inaccessible
Modules are characterized by design decisions that are hidden from
others
Modules communicate only through well defined interfaces
Enforce access constraints to local entities and those visible through
interfaces
Very important for accommodating change and reducing coupling
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 20
Software Design Principles (Cohesion)
Cohesion is a measure that defines the degree of intra-dependability
within elements of a module.
It refers to the degree to which elements within a module work
together to fulfill a single, well-defined purpose.
Thus, cohesion measures the strength of relationships between
pieces of functionality within a given module.
For example, in highly cohesive systems, functionality is strongly
related.
Cohesion is an ordinal type of measurement and is generally
described as "high cohesion" or "low cohesion"
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 21
Software Design Principles (Cohesion)
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 22
Software Design Principles (Cohesion)
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 23
Software Design Principles (Coupling)
Coupling refers to the degree of interdependence between software
modules.
High coupling means that modules are closely connected and
changes in one module may affect other modules.
Low coupling means that modules are independent, and changes in
one module have little impact on other modules.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 24
Software Design Principles (Coupling)
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 25
Software Design Principles (Coupling)
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 26
Software Design Principles (Coupling vs Cohesion)
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 27
Software Design Principles (Coupling vs Cohesion)
Coupling Cohesion
• Coupling is also called Inter-Module • Cohesion is also called Intra-Module Binding.
Binding.
• Coupling shows the relationships between • Cohesion shows the relationship within the module.
modules.
• Coupling shows the relative independence • Cohesion shows the module’s
between the modules. relative functional strength.
• While creating, you should aim for low • While creating you should aim for high cohesion, i.e.,
coupling, i.e., dependency among modules a cohesive component/ module focuses on a single
should be less. function (i.e., single-mindedness) with little
interaction with other modules of the system.
• In coupling, modules are linked to the other • In cohesion, the module focuses on a single thing.
modules.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 28
Design Strategies
Top-down Approach: This approach
starts with the identification of the
main components and then
decomposing them into their more
detailed sub-components.
Top-down design is more suitable
when the software solution needs
to be designed from scratch and
specific details are unknown.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 29
Design Strategies
Bottom-up Approach: A bottom-up
approach begins with the lower
details and moves towards up the
hierarchy.
This approach is suitable in case of
an existing system.
The bottom up design model starts
with most specific and basic
components.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 30
Design Strategies
bottom-up top-down
Hybrid Design: Normally a mix of top-down and bottom-up approaches
are used
o Top-down design is almost always needed to give the system a good
structure.
o Bottom-up design is normally useful so that reusable components can
be created.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 31
Design strategies
Modular Design: Breaks down a system Service-Oriented Architecture (SOA):
into independent modules, enhancing Structures applications as a collection of
maintainability and scalability. services, allowing for integration and
interoperability across different systems.
Object-Oriented Design: Uses objects
that encapsulate data and behavior, Microservices: Splits applications into
promoting reuse and flexibility. small, independent services that can be
developed and deployed separately,
Layered Architecture: Organizes software enhancing flexibility and scalability.
into layers (e.g., presentation, business Model-View-Controller (MVC): Separates
logic, data), separating concerns and the application into three interconnected
improving manageability. components, improving separation of
concerns and testability.
Component-Based Design: Focuses on
building software from interchangeable Event-Driven Architecture: Uses events to
components, increasing reusability. trigger communication between
components, enhancing responsiveness
and decoupling.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 32
Business Modeling
Focuses on how a business creates, delivers, and captures value.
It defines the core functionalities, stakeholders (customers,
employees), and revenue streams.
Understanding the business model is essential for designing software
that aligns with the company's goals.
This involves showing the steps involved in a business process, like
order fulfillment or customer service.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 33
Business Modeling
It visualizes the flow of information, decisions, and tasks within the
process.
Process models help identify inefficiencies and areas for
improvement, informing software design to automate or streamline
these processes.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 34
Building an Object Model Using UML
Building an object model using UML involves creating diagrams that represent the
structure and relationships of objects in a system class diagram, the steps:-
Identify Classes: Determine the key objects in your system (e.g., Student, Course,
Instructor).
Define Attributes and Methods: For each class, list the attributes (e.g., name, ID) and
methods (e.g., enrollInCourse()).
Establish Relationships: Define associations between classes (e.g., Student enrolls in
Course). Use UML notation to show relationships like inheritance, association, and
aggregation.
Use UML Diagrams: Class Diagram: Shows classes, attributes, methods, and relationships.
Object Diagram: Represents instances of classes and their relationships at a specific time.
Add Multiplicity: Indicate how many instances of one class can relate to instances of
another class (e.g., one-to-many).
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 35
Building an Object Model Using UML
Classes are composed of three things
• A name
• Attribute
• Operations
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 36
Architectural Design
The high-level structure and organization of a software system.
It deals with core components, their interactions, and the overall
system's qualities.
This high-level view defines the overall structure of the software
system.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 37
Architectural Design
It focuses on:
o Decisions: Key choices about technologies, data management
strategies, and communication protocols.
o System Organization: How the system is broken down into major
subsystems like user interface, data storage, and business logic.
o Modular Decomposition: Decomposing subsystems into smaller,
well-defined modules with clear interfaces.
o Flow and Control: Defining how data flows through the system
and how control is transferred between modules.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 38
Architectural Design
There are many architectural styles. Here are some common ones
that can be used as a basis for the architecture of some systems
Model/View/Controller (MVC)
Client/Server (2-tier, 3-tier)
Microservices architecture
Serverless Architecture (Cloud environments)
Service-Oriented Architecture (SOA) etc…
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 39
Architectural Design
Model/View/Controller(MVC) - subsystems are classified into three
different types:
o model subsystems - responsible for maintaining domain knowledge,
o view subsystems - responsible for displaying it to user, and
o controller subsystems - responsible for managing sequence of
interactions with user, notifying views of changes in the model.
MVC architectures are well suited for interactive systems, especially when
multiple views of the same model are needed.
MVC can be used for maintaining consistency across distributed data.
Most of the frameworks like Laravel, Django, Ruby on Rails, Spring, ASP.net
are based on MVC architectire
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 40
Architectural Design
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 41
Architectural Design
Client/server architecture – One or more servers provide services to
instances of other subsystems called clients, which are responsible for
interacting with user.
The clients are responsible for receiving inputs from the user,
performing range checks, and initiating database transactions once all
necessary data are collected.
The server is then responsible for performing the transaction and
guaranteeing the integrity of the data.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 42
Architectural Design
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 43
Architectural Design
3- Tier Architecture: Is an architecture style, where an application consists
of 3 hierarchically ordered subsystems.
A UI, Middleware and Database system
The middleware subsystem services data requests b/n the UI and Database
system
Example:- a 3- Tier architectural style are often used for the development
of web application:
o The web browser- implements the UI
o The web server- serves requests from the web browser
o The DB Server- manages and provides access to the persistent data
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 44
Architectural Design
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 45
Architectural & System Characteristics (Design Goals)
Performance Backward-compatibility
Security Cost-effectiveness
Safety Robustness
Availability High-performance
Maintainability Reuse of components
The design goals are derived from the nonfunctional requirements
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 46
User Interface (UI) Design
UI design focuses on the visual and interactive elements of a
product's interface.
This includes layout, typography, color schemes, buttons, menus,
and other on-screen controls.
The goal of UI design is to make the interface aesthetically pleasing
and easy for users to navigate.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 47
User Experience (UX) Design
UX design focuses on the overall experience a user has when
interacting with a product.
This includes aspects like information architecture, user research,
interaction design, and usability testing.
The goal of UX design is to ensure the product meets the user's
needs and expectations.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 48
Principles of Good UI/UX Design
Clarity: Ensure the interface is easy to understand and use.
Consistency: Maintain a coherent and predictable design language
throughout.
Responsiveness: Optimize the design for various screen sizes and
device types.
Accessibility: Ensure the interface is usable by people with
disabilities.
Emotional Appeal: Create a visually pleasing and enjoyable user
experience.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 49
Creating a Data Model
Data Model is the overall structure and organization of data within a
system, defining entities, relationships, and rules.
An Entity-Relationship Diagram (ERD) is a visual representation of a
data model, illustrating entities, attributes, and relationships between
them
This involves defining the structure of data used by the software.
Focuses on how data is stored and related in the database.
Represents tables, columns, and relationships between tables.
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 50
Creating a Data Model
It specifies:
Data Entities: The types of data the system needs to manage (e.g.,
customers, products, orders). rectangle
Attributes: The specific properties associated with each entity (e.g.,
customer name, product price). eclipse
Relationships: How these entities are related to each other (e.g., a
customer can place many orders). diamond-shaped box
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 51
ER Diagram Example
Compiled by : Biniam Behailu & Yimer Amedie Introduction to Software Engineering 52
THANK YOU
?
""Elegant software design harmonizes
function, efficiency, and aesthetics for
a delightful user experience."
Emily Chung, Software Architect
Compiled by : Biniam Behailu Introduction to Software Engineering 53