SEN 211
Introduction to Software
Engineering
INSTRUCTOR
Prof. Dr Rashidah Funke Olanrewaju
Email: [email protected]
TEL NO: +601133097094
FACEBOOK: rashidah lanre
Software Design Principles
and Architecture
4
• Software architecture ensures all parts fit and
work well together.
• It focuses on performance, security, and
manageability to keep everything running
smoothly.
• SW architecture is the blueprint that ensures your
software is strong, secure, and adaptable.
SOFTWARE
ARCHITECTURE
Creating Architecture:
• Understand needs, make key decisions, identify main
components, plan interactions, use proven patterns, test
ideas, and keep improving.
Software Architecture is a high-level structure of the software system that includes the set
of rules, patterns, and guidelines that dictate the organization, interactions, and the
component relationships. It serves as blueprint ensuring that the system meets its
requirements and it is maintainable and scalable
5
What are the characteristics of
software architecture?
SOFTWARE ARCHITECTURE
• MODULARITY: SOFTWARE ARCHITECTURE DIVIDES SYSTEM INTO INTERCHANGEABLE COMPONENTS
THAT CAN BE DEVELOPED, TESTED, AND MAINTAINED INDEPENDENTLY.
• ENCAPSULATION: IT HELPS TO HIDE THE DETAILS OF THE COMPONENTS, EXPOSING ONLY THE
NECESSARY INFORMATION, THUS REDUCING THE COMPLEXITY OF THE SYSTEM.
• SECURITY: IT HELPS TO INCORPORATE MEASURES TO PROTECT THE SYSTEM AGAINST THE
UNAUTHORIZED ACCESS.
• DOCUMENTATION: PROVIDES CLEAR DOCUMENTATION OF THE SYSTEM ARCHITECTURE, THUS
FACILITATING COMMUNICATION AND BETTER UNDERSTANDING OF THE SYSTEM.
• PERFORMANCE: SOFTWARE ARCHITECTURE HELPS TO MAKE SURE THAT THE SYSTEM MEETS THE
REQUIRED PERFORMANCE METRICS SUCH AS RESOURCE UTILIZATION, THROUGHPUT, ETC.
7
Types of architectural design
Style
8
Architectural Design establish entire system layout.
It focuses on system stability, structural organization.
It involves architectural diagrams and high-level design
documents.
e.g. Layered Architecture, Microservices, Client-Server.
Architectural Design Style
LAYERED ARCHITECTURE PATTERN
Layered Architecture pattern are separated into layers of subtasks and they are arranged one
above another. Each layer has unique tasks to do and all the layers are independent of one
another. 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. This
layer is also known as ‘n-tier architecture’. Basically, this pattern has 4 layers.
Examples
1. Enterprise applications like customer relationship management (CRM).
2. Web applications like e-commerce platforms.
3. Desktop applications such as financial software.
4. Mobile applications like banking applications.
5. Content management systems like wordpress.
CLIENT-SERVER ARCHITECTURE PATTERN
The client-server pattern has two major entities. They are a server and multiple
clients. Here the server has resources(data, files or services) and a client requests
the server for a particular resource. Then the server processes the request and
responds back accordingly.
1. Web applications like amazon.
2. Email services like gmail, outlook.
3. File sharing services like dropbox, google drive.
4. Media streaming services like netflix.
5. Education platforms like moodle.
3. EVENT-DRIVEN ARCHITECTURE PATTERN
EVENT-DRIVEN ARCHITECTURE IS AN AGILE APPROACH IN WHICH SERVICES (OPERATIONS) OF THE SOFTWARE ARE
TRIGGERED BY EVENTS. WHEN A USER TAKES ACTION IN THE APPLICATION BUILT USING THE EDA APPROACH, A STATE
CHANGE HAPPENS AND A REACTION IS GENERATED THAT IS CALLED AN EVENT.
EXAMPLE:
A NEW USER FILLS THE SIGNUP FORM AND CLICKS THE SIGNUP BUTTON ON FACEBOOK AND THEN A FB ACCOUNT IS
CREATED FOR HIM, WHICH IS AN EVENT.
USE CASES:
1. REAL-TIME ANALYTICS LIKE STOCK MARKET ANALYSIS SYSTEMS.
2. IOT APPLICATIONS LIKE SMART HOME SYSTEMS.
3. FINANCIAL SYSTEMS LIKE FRAUD DETECTION SYSTEMS MONITOR TRANSACTIONS IN REAL-TIME.
4. ONLINE MULTIPLAYER GAMES.
5. CUSTOMER SUPPORT SYSTEMS LIKE CHATBOTS.
3. EVENT-DRIVEN ARCHITECTURE PATTERN
EVENT-DRIVEN ARCHITECTURE IS AN AGILE APPROACH IN WHICH SERVICES (OPERATIONS) OF THE SOFTWARE ARE
TRIGGERED BY EVENTS. WHEN A USER TAKES ACTION IN THE APPLICATION BUILT USING THE EDA APPROACH, A STATE
CHANGE HAPPENS AND A REACTION IS GENERATED THAT IS CALLED AN EVENT.
EXAMPLE:
A NEW USER FILLS THE SIGNUP FORM AND CLICKS THE SIGNUP BUTTON ON FACEBOOK AND THEN A FB ACCOUNT IS
CREATED FOR HIM, WHICH IS AN EVENT.
USE CASES:
1. REAL-TIME ANALYTICS LIKE STOCK MARKET ANALYSIS SYSTEMS.
2. IOT APPLICATIONS LIKE SMART HOME SYSTEMS.
3. FINANCIAL SYSTEMS LIKE FRAUD DETECTION SYSTEMS MONITOR TRANSACTIONS IN REAL-TIME.
4. ONLINE MULTIPLAYER GAMES.
5. CUSTOMER SUPPORT SYSTEMS LIKE CHATBOTS.
4. MICROKERNEL ARCHITECTURE PATTERN
Microkernel pattern has two major components. They are a core system and plug-in modules.
• The core system handles the fundamental and minimal operations of the application.
• The plug-in modules handle the extended functionalities (like extra features) and customized processing.
Let’s imagine, you have successfully built a chat application. And the basic functionality of the app is that you can
text with people across the world without an internet connection. After some time, you would like to add a voice
messaging feature to the application, then you are adding the feature successfully. You can add that feature to
the already developed application because the microkernel pattern facilitates you to add features as plug-ins.
Use cases:
2. Operating systems like windows NT and macos.
3. Embedded systems like automotive software systems.
4. Plugin-based applications like eclipse ide.
5. Microservices architecture pattern
The collection of small services that are combined to form the actual application is the concept of
microservices pattern. Instead of building a bigger application, small programs are built for
every service (function) of an application independently. And those small programs are bundled
together to be a full-fledged application. So adding new features and modifying existing
microservices without affecting other microservices are no longer a challenge when an
application is built in a microservices pattern. Modules in the application of microservices
patterns are loosely coupled. So they are easily understandable, modifiable and scalable.
Use cases:
2. E-commerce platforms like amazon and ebay.
3. Streaming services like netflix and spotify.
4. Online banking platforms.
5. Electronic health record (ehr) systems.
6. Social media platforms like twitter and facebook.
6. Space-based architecture pattern
Space-based architecture pattern is also known as cloud-based or grid-based
architecture pattern. It is designed to address the scalability issues associated
with large-scale and high-traffic applications. This pattern is built around the
concept of shared memory space that is accessed by multiple nodes.
Use cases:
1. E-commerce platforms like amazon.
2. Telecom service providers.
3. Multiplayer online games.
7. Master-slave architecture pattern
The master-slave architecture pattern is also known as primary-secondary architecture. It
involves a single master component and that controls multiple slave components. The master
components assign tasks to slave components and the slave components report the results of
task execution back to the master. This is often used for parallel processing and load
distribution.
Use cases:
1. Database replication.
2. Load balancing.
3. Sensor networks.
4. Backup and recovery systems.
8. Pipe-filter architecture pattern
Pipe-filter architecture pattern structures a system around a series of processing
elements called filters that are connected by pipes. Each filter processes data and
passes it to the next filter via pipe.
Use cases:
1. Data processing pipelines like extract, transform, load (ETL) processes in data
warehousing.
2. Compilers.
3. Stream-processing like apache flink.
4. Image and signal processing.
9. Broker architecture pattern
The broker architecture pattern is designed to manage and facilitate
communication between decoupled components in a distributed system. It involves
a broker that acts as a intermediary to route the requests to the appropriate
server.
Use cases:
1. Integration of various enterprise applications like CRM, ERP, and HR systems.
2. Systems using message brokers like rabbitmq or apache kafka.
3. Sensor networks in iot applications.
10. Peer-to-peer architecture pattern
The peer-to-peer (P2P) architecture pattern is a decentralized network model
where each node, known as a peer, acts as both a client and a server. There is no
central authority or single point of control in P2P architecture pattern. Peers can
share resources, data, and services directly with each other.
Use cases:
1. File sharing like bittorrent protocol.
2. Blockchain and cryptocurrencies such as bitcoin and ethereum.
3. Voip and communication like skype