Software Engineering Module 3
Software Engineering Module 3
ENGINEERING
Module 3
Module-III Syllabus
guidelines;
4
software architecture diagram elements
• Components: Building blocks of the software system representing the various modules,
classes, services, or layers.
• Relationships: Lines or arrows that indicate how the components interact or communicate
with each other.
• External systems: Entities outside the software that interact with the system, such as
APIs, databases, or third-party services.
• Interfaces: how one component will provide or consume information from another.
• Boundaries: Sort related components into groups and distinguish between the subsystems
within the architecture (for example, presentation layer, application layer, communication
layer, etc.)
Architectural abstraction
essential details.
It's a fundamental concept in architecture that helps designers focus on the most important aspects
of a design.
At this level, we are concerned with the way that an individual program is decomposed into
components.
Architecture in the large is concerned with the architecture of complex enterprise systems
These enterprise systems are distributed over different computers, which may be owned and
6
7
Box-and-Line Diagram Heuristics
8
8
Box and line diagrams
Icons (boxes) connected with lines
Very abstract - they do not show the nature of component relationships nor the
externally visible properties of the sub-systems.
However, useful for communication with stakeholders and for project planning.
Box and line diagrams Example
10
Architectural design decisions
11
Architecture characteristics
Configurability: How easy it is for the end user to change the application's configuration
Reliability: How reliable the system is, especially if it's critical to human safety
Robustness: How well the system can handle errors and boundary conditions, like power
outages or hardware failures
Scalability: How well the system can handle increasing workloads and expanding
functionality
12
4 + 1 view model of software architecture
It describe the system from the viewpoint of different stakeholders such as end-users,
The 4+1 View Model was designed by Philippe Kruchten to describe the architecture of a
• The logical view or conceptual view − It describes the object model of the
design.
• The process view − It describes the activities of the system, captures the
concurrency and synchronization aspects of the design.
• The physical view − It describes the mapping of software onto hardware and
reflects its distributed aspect.
The use case view has a special significance as it details the high level
requirement of a system while other views details
Architectural patterns
18
Types of Architectural Pattern
1. Layered Architecture Pattern
4. Repository Architecture
5. Application Architecture
Layered Architecture Pattern
The pattern is separated into layers of subtasks
Since each layer is independent, one can modify the code inside a layer without affecting others.
It is the most commonly used pattern for designing the majority of software.
Presentation layer: The user interface layer where we see and enter data into an
application.)
Business layer: This layer is responsible for executing business logic as per the request.)
Application layer: This layer acts as a medium for communication between the
Flexibility: Different technologies can be used within each layer without affecting
others.
Maintainability: Changes in one layer do not necessarily impact other layers, thus
simplifying the maintenance.
Layered Architecture Pattern Disadvantages:
1.Complexity: Adding more layers to the architecture can make the system more complex
and difficult to manage.
3.Strict Layer Separation: Strict layer separation can sometimes lead to inefficiencies and
increased development effort.
Layered Architecture
Pattern
1.Enterprise Applications like Customer Relationship Management (CRM).
25
Layered information system architecture : generic architecture that can
be organised as a layered architecture.
26
The architecture of the MHC-PMS
27
The architecture of the LIBSYS system
28
Client-Server Architecture Pattern
◦ The client-server pattern has two major entities.
◦ Then the server processes the request and responds back accordingly.
Client-Server Architecture Pattern Advantages:
1.Centralized Management: Servers can centrally manage resources, data, and security
policies, thus simplifying the maintenance.
3.Security: Security measures such as access controls, data encryption can be implemented
in a better way due to centralized controls.
Client-Server Architecture Pattern Disadvantages
1.Single Point of Failure: Due to centralized server, if server fails clients lose access to
services, leading loss of productivity.
◦ It is a process into a series of distinct steps, called filters, linked by channels known as pipes.
◦ Each filter processes data and passes it to the next filter via pipe.
Advantages:
2.Scalability: Additional filters can be added to extend the functionality to the pipeline.
3.Parallelism: Filters can be executed in parallel if they are stateless, thus improving
performance.
Pipe-Filter Architecture Pattern
Disadvantages:
2.Data Format constraints: Filters must agree on the data format, requiring
careful design and standardization.
3.Latency: Data must be passed through multiple filters, which can introduce
latency.
An example of the pipe and filter architecture
37
A pipe and filter compiler architecture
large volumes of information are generated that has to be stored for a long time.
repository is a single point of failure so problems in the repository affect the whole system 39
Repository architecture
Repository architecture
41
A repository architecture for a language
processing system
It is the process of defining a structure that meets all the technical and operational
requirements of an application.
requirements
They are configured and adapted to create a system that meets specific
requirements
Chapter 6 Architectural design 43
Examples of application types
44
Examples of application types
Data processing applications are tools that help businesses analyze and process data to make informed
decisions.
45
Examples of application types
◦ Event processing systems analyze events in real-time and perform actions based on the
analysis. Event processing systems can be used to detect patterns, identify trends, and trigger actions
◦ It is a subfield of computer science and artificial intelligence (AI) that uses machine learning to enable
46
The structure of transaction processing applications
47
The software architecture of an ATM system transaction processing
applications
48
Language processing systems
49
The architecture of a language processing
system
50
Model/View/Controller
It separates an application into three main components: Model, View, and
Controller
initiator
Controller
* 1 repository
Model
1 notifier
subscriber
View
*
Web application architecture using the MVC
pattern
In software engineering, both top-down and bottom-up approaches are used for designing
Each approach has its own advantages and is suitable for different scenarios
Top-down Approach: In the top-down approach, the system is designed by starting with a
high-level overview and breaking it down into smaller, more detailed components.
57
Top-down Approach
Example Scenario: Consider the development of a website for an e-commerce platform.
2.Break down each feature into sub-features, such as user registration, login, product listing, adding items
to the cart, and payment processing.
3.Further break down each sub-feature into smaller components, such as user interface design, database
interactions, and business logic.
4.Develop each component iteratively, starting from the high-level components and gradually
implementing the lower-level details.
58
Top-down Approach Advantages
59
Bottom-up Approach
◦ Bottom-up Approach: In the bottom-up approach, the system is designed by starting
with the smallest, most basic components and gradually combining them to form larger,
◦ Example Scenario: Continuing with the e-commerce website example, in the bottom-up
approach:
60
Bottom-up Approach
61
Bottom-up Approach
Advantages:
62
Differences between Cohesion and Coupling
Cohesion
cohesion refers to the degree to which elements within a module work together to fulfill a
High cohesion means that elements are closely related and focused on a single purpose,
while low cohesion means that elements are loosely related and serve multiple purposes.
Levels of cohesion!
Functional!
Layer!
Communicational!
64
Cohesion
1.Functional Cohesion:
1.Functional cohesion occurs when elements of a module (such as functions or methods) are grouped together
2.Example: A module that calculates the area of a circle, computes its circumference, and checks if a point lies
2.Sequential Cohesion:
1.Sequential cohesion occurs when elements of a module are grouped together because they are executed in a
specific sequence, with the output of one element serving as the input to the next.
2.Example: A module that reads data from a file, processes it, and then writes the results to another file exhibits
sequential cohesion.
65
Cohesion:
Cohesion
3. Communicational Cohesion:
1.Communicational cohesion occurs when elements of a module are grouped together because
they operate on the same data or share the same input/output parameters.
2.Example: A module that performs various operations (such as validation, formatting, and
4. Procedural Cohesion:
3.Procedural cohesion occurs when elements of a module are grouped together because they
4.Example: A module that implements a sorting algorithm, including steps for comparing
elements, swapping positions, and iterating through the array, exhibits procedural cohesion. 66
Cohesion
5. Temporal Cohesion:
1.Temporal cohesion occurs when elements of a module are grouped together because they are all
2.Example: A module that initializes system resources, performs setup operations, and starts
6. Coincidental Cohesion:
3.Coincidental cohesion occurs when elements of a module are grouped together arbitrarily,
4.Example: A utility module that contains unrelated functions for performing various unrelated
tasks, such as file I/O, string manipulation, and mathematical calculations, exhibits coincidental
67
cohesion.
Coupling
Coupling is a qualitative measure of the degree to which classes are connected to one
another.
As classes (and components) become more interdependent, coupling increases.
An important objective in component-level design is to keep coupling as low as is
possible.
Content Coupling:
1.Definition: Occurs when one component directly modifies data that belongs to another
component
Example: A function within Module A directly modifies a variable that is supposed to
be private to Module B.
2.Example: Several functions in different modules all use a global configuration variable to
determine behavior.
69
Data Coupling:
70
Routine Call Coupling:
2.Example: Function A calls Function B to perform a specific task, relying on its functionality to
71
Inclusion or Import Coupling:
1.Definition: A component imports content from another component, potentially leading to dependencies
between them.
2.Example: Module A includes the header file of Module B, creating a dependency on its contents.
External Coupling:
4.Example: An application interacts with the operating system's file system functions to read and write files.
72
PERFORMING USER INTERFACE
DESIGN
Introduction
◦ software components
Analyse scenarios
Analyse scenarios
◦User Scenario Help To Design User Interface And Its Corresponding Action
◦Interaction Mode Means The Current State In Which User Is Working And
Being In Such Mode User Is Suppposed To Do the Related Task Only If User
Has To Perform Unnecessary Actions At Such Time Gui Becomes
Frustating
The Interaction Should Be Flexible
◦Example: in Software Like Paint One Can Draw Some Objects And
Perform Redo /Undo Actions For Performing His Desired Drawing
Golden Rules
◦ It Is Observed That In While Handling User Interface Certain Actions Need To Be Done
◦ User Should Not Be Aware Of System Commands, operating System Functions, file
For Printing. Instead Of That If We Have Symbol Print Then It Is Very Useful For Casual
User
Golden Rules
Position To Adjust The Object Appearing On Screen.Example:in Paint One Should Be Able
◦ Design Should Be In Such That System Remembers More For User And Ultimately
Assist The User To Handle Computer Based System.
Reduce The Users Memory Load:
◦ Do Not Force The User To Have long Term Memory:
◦ When User Is Involved In Complex Tasks Then He Has To Remember More. The User
Interface Should Be Such That He Need Not Remember Past Actions And Result. And
This Is Achieved By Providing Proper Visual Interface
Reduce The Users Memory Load:
Actor
It represents the role, which involves human
users and external hardware or subjects.
Activation
It is represented by a thin rectangle on the lifeline. It describes that
time period in which an operation is performed by an element
Messages
The messages depict the interaction between the objects and are
represented by arrows.
Sequence Diagram
•Call Message: represents that the
target lifeline has invoked an
operation.
Note
A note is the capability of attaching several
remarks to the element.
SEQUENCE DIAGRAM
SEQUENCE DIAGRAM
Collaboration Diagram
The collaboration diagram is used to show the relationship between the objects
in a system.
sequence and the collaboration diagrams represent the same information but
differently.
State Diagrams show the sequences of states an object goes through during its life cycle
in response to stimuli, together with its responses and actions; an abstraction of all
possible behaviors.
Start End
Unpaid Paid
Invoice created payin Invoice destroying
g
COMPONENT DIAGRAM
It models the view of a system such as executables, files, libraries,
etc. that resides withi
A component is a single unit of the system, which is replaceable
and executable.
The implementation details of a component are hidden
components are libraries, files, executables etc.
COMPONENT DIAGRAM
To model the components of the system.
To model the schemas of a database.
To model the applications of an application.
To model the system's source code.
It depicts the relationships and organization of components.
They represent a set of components and their relationships.
They represent the implementation view of a system.
Structural Things – Component Notation
Scalability
Maintainability
Portability
A node in UML is
represented by a square
box as shown below with a
name. A node represents a
physical component of the
system
Node is used to represent
physical part of a system
like server, network etc.
DEPLOYMENT DIAGRAM
ACTIVITY DIAGRAM