SlideShare a Scribd company logo
2
Most read
8
Most read
12
Most read
“Software Architecture Patterns”
Essential…
1
 Introduction.
 What is Software architecture patterns?
 Why Software architecture patterns?
 When we follows Software architecture patterns?
 Who follows software architecture patterns?
 Discussion about Essentials Software Architectures?
# Agenda! We Are Going To Cover:-
“Software Architecture
Patterns”
Essential…2
# Introduction:- What is Software architecture patterns ?
3
 Reusable predefined solutions.
 Set of instructions, rules, specifications and guidelines.
 Customizable and merged able.
# Introduction:- Why Software architecture patterns?
4
 To give commonly occurring problems solutions, from previous listens and learns.
 To avoid common problems, issues and mistakes, those are already fetched.
 Helps in decision making, creating new design solutions that needs in applications.
# Introduction:- When, Who follows Software architecture patterns?
5
 Before any Software Development need to know about those patterns clearly.
 Before Develop any enterprise application need to know about those pattern.
 When you want to know, how existing enterprise application overcome their critical
salutation and how to solved those.
# Introduction:- Discussion about essentials software architectures
6
 Layered Architectural Pattern and MVC
 Microkernel Architectural Pattern
 CQRS Architectural Pattern
 Event Sourcing Architectural Pattern
 Microservices Architectural Pattern
 I think those patterns are essentials to know
# Layered Architectural Pattern and MVC
7
 Split up code into layers, they have different responsibly for higher layer.
 Layer can be logical separation of code or physical separation of code.
 Physical separation of code is know as tier.
Explanation:
 User click a button from Presentation layer, then it call application
layer
 Now, Application layer call Business layer and process its logical
operations
 And finally store data through Persistence layer, then store it in
Database
 Tiers may seem similar to the model-view-controller (MVC).
 MVC architecture is triangular, the view sends updates to
the controller, the controller updates the model, and the
view gets updated directly from the model.
 MVC components could talk to each other, layered
architecture only allows message passing between layers.
MVC architecture is mostly used for presentation, but
layered architecture is focused on the entire system
Layer aren’t predefined. But most common flow
Presentation
Application
Business
Persistence
Databases
Call between layers flow
downward
MVC
Most Used Pattern
# Layered Architectural Pattern and MVC (Pros & Cons )
8
Pros:
 Most developers are familiar with this pattern.
 It provides an easy way of writing a well-organized and testable application.
Cons:
 It tends to lead to monolithic applications that are hard to split up afterward.
 If you are writing a simple CRUD application, without adding any value in these layers. Need to
writing lot of code in different layers.
When Choose:
 For small business. and small organizations
 Individual Development
# Microkernel Architectural Pattern
9
Most of the application developed on this pattern
 Limiting the features, so that application makes more light weight, functional and extensive.
 Plug-in pattern, is useful when application has a core set of responsibilities and a collection of
interchangeable parts on the side.
We are familiar with plugins or extensions Explanation:
 Like Chrome, Eclipse, Photoshop or other
application we’re adding plugins for extended
functionality.
 Microkernel could contain all the logic for
scheduling and triggering tasks, of plugins. Or they
can share task and logic through APIs.
 But application should run limited functionall,
without depends on plugins
# Microkernel Architectural Pattern (Pros & Cons )
10
Pros:
 Provides great flexibility and extensibility.
 Some implementations allow for adding plugins while the application is running.
 Microkernel and plugins can be developed by separate teams.
Cons:
 Difficult to decide what belongs in the microkernel and what doesn’t.
 Predefined API might not be a good fit for future plugins development for separate teams.
When Choose:
 For Workflow Applications.
 Applications take data from different sources, transform that data and writes it to different destinations
# CQRS Architectural Pattern
11
CQRS is an acronym for Command and Query Responsibility Segregation.
 The central concept of this pattern is that an application has read operations and write operations that must
be totally separated.
Implementations can be like below:
 If use a relational database, this means there will be tables for the command model and tables for the read
model.
 Some implementations even store the different models in totally different databases, e.g. SQL Server for the
command model and MongoDB for the read model. (Cause RDBMS faster for write and NOSQL faster for
read)
# CQRS Architectural Pattern Flow
12
How to read or fetch data from Databases How to write data in Databases
After send command store data in write database then update changes in read database.
# CQRS Architectural Pattern (Pros & Cons )
13
Pros:
 Command models can focus on business logic, other side read models can ensure validity of
tailored.
 You can avoid complex queries (e.g. joins in SQL). which makes the reads more performant.
Cons:
 Keeping the command and the read models in sync can become complex.
When Choose:
 Applications with complex domains like enterprise applications.
 Need when High amount of reads.
# Event Sourcing Architectural Pattern
14
CQRS is closely related to Event Sourcing.
 In this pattern we don’t just store current state of model in the database, but also the events that
happened to the model. (e.g. if want to change the name of user then need to store
‘NameChanged’ event with new and possibly the old one too.
 When need to retrieve a model, then retrieve all its stored events and reapply them on a new
object. It’s knows as rehydrating an object.
 A real-life analogy of event sourcing is accounting. When you add an expense, you don’t change
the value of the total. In accounting, a new line or record is added with the operation to be
performed.
 If an error was made. Then just simply add a new line. To make your life easier, you could
calculate the total every time and add a line. This total can be regarded as the read model.
# Event Sourcing Architectural Pattern: Example
15
Jobs Amount Event
… … …
Invoice 19_03_22 500 generate_invoice
Buy Pen - 10 expense_add
Buy Pencil - 5 expense_add
Invoice 19_04_22 485 generate_invoice
Buy Bangla Book -200 expense_add
Cancellation invoice 19_04_22 - 485 make_invoice_correction
Invoice 19_04_22 215 generate_invoice
Total 715 <== Auto-updated read model
Total Expenses: 10+5+200 = 215
Total Expenses: 500 +215 = 715
# Event Sourcing Architectural Pattern (Pros & Cons )
16
Pros:
 It can provide an audit log out of the box.
 Each event represents a manipulation of the data at a certain point in time.
Cons:
 Requires some discipline because you can’t just fix wrong data with a simple edit in the database.
 Not trivial task to change the structure of an event. E.g. suppose need to add property, then still
contains previous events without that property. Now manually need to handle this missing data in
code.
When Choose:
 Will be built with CQRS.
 Need publish events to external systems.
 Have complex domains.
 Need an audit log of changes to the data.
“Microservices”
17
 Microservices is basically a Software Development Architecture.
 Design application or services that can Independently deployable.
 Need to know about Monolithic.
 Monolithic Vs Microservices.
 Why Monolithic to Microservices?
# What is microservices?
18
User Registration
Service
Inventory
Service
Order
Service
Payment
Service
APIApplication
E-Shop Microservices
Base Application
E-Shop Monolithic Base Application
User Registration
InventoryOrder
Payment
All the functionality and responsibility
into single application
All the functionality and responsibility are separated.
# Monolithic Vs microservices
19
 To Scale Or replicate a Monolithic application need
multiple servers. Legacy operations are complex.
 Allocate more resources, so it’s increase costs.
 Continuous features development, integrations and
development are harder and slow.
 To Scale Or replicate by distribute across servers as needed.
 It’s easier to rewrite pieces of the application because they’re smaller
and less coupled to other parts.
 Need to handle communication, coordination, backward
compatibility, logging, etc.
 Hard to writing a good set of microservices.
 Applications where certain parts will be used intensively and need to be
scaled.
 Services that provide functionality to several other applications.
 Applications that would become very complex if combined into one
monolith.
 Where application need data and is responsible for its integrity and
mutability.
# When Choose microservices?
20
MD. SADHAN SARKER
Software Engineer
Leads Corporation Limited.
sadhansarker3@gmail.com
github.com/mesadhan
mesadhan.jimdo.comwww.fb.com/cse.sadhan
www.twitter.com/eng_sadhan
inktechs.com
Thanks! From

More Related Content

PPT
Software Quality Metrics
PDF
Introduction to SOFTWARE ARCHITECTURE
PPT
Software Architecture
PPTX
Software Architecture Patterns
PPTX
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
PDF
Orchestrating the microservices - Camunda 2023
PDF
Event Storming and Saga
PDF
jQuery for beginners
Software Quality Metrics
Introduction to SOFTWARE ARCHITECTURE
Software Architecture
Software Architecture Patterns
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
Orchestrating the microservices - Camunda 2023
Event Storming and Saga
jQuery for beginners

What's hot (20)

PDF
software-architecture-patterns
PDF
Clean Architecture
PPTX
Design Patterns - General Introduction
PDF
Documenting Software Architectures
PPT
SOLID Design Principles
PPTX
DevOps 101 - an Introduction to DevOps
PDF
intro to DevOps
PDF
Introduction to Design Pattern
PDF
Microservices with Java, Spring Boot and Spring Cloud
PPTX
Event-driven microservices
PDF
Gof design pattern
PPT
Domain Driven Design (DDD)
PDF
Domain Driven Design
PDF
Introduction to SOLID Principles
PPTX
Oracle Forms to APEX conversion tool
PDF
Clean architecture with asp.net core
PPSX
SOLID Principles and The Clean Architecture
PPTX
MuleSoft Architecture Presentation
PPTX
Domain driven design
PDF
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
software-architecture-patterns
Clean Architecture
Design Patterns - General Introduction
Documenting Software Architectures
SOLID Design Principles
DevOps 101 - an Introduction to DevOps
intro to DevOps
Introduction to Design Pattern
Microservices with Java, Spring Boot and Spring Cloud
Event-driven microservices
Gof design pattern
Domain Driven Design (DDD)
Domain Driven Design
Introduction to SOLID Principles
Oracle Forms to APEX conversion tool
Clean architecture with asp.net core
SOLID Principles and The Clean Architecture
MuleSoft Architecture Presentation
Domain driven design
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
Ad

Similar to Software architecture patterns (20)

PPTX
Over view of software artitecture
DOCX
IT 8003 Cloud ComputingFor this activi.docx
PPT
Designingapplswithnet
PPT
Why MVC?
PPT
Architecting for Change: An Agile Approach
PDF
whitepaper_workday_technology_platform_devt_process
PPT
J2 ee archi
PDF
A Brief Note On Asp.Net And Cloud Computing Essay
PDF
2014_report
PDF
Modern webtechnologies
PDF
DAS Slides: Data Architect vs. Data Engineer vs. Data Modeler
PPTX
The Clean Architecture
PDF
Task 2 - Educational Article – Model View Controller (MVC)
PPTX
Design Patterns for Micro Service Architecture
PPTX
Reengineering including reverse & forward Engineering
PPTX
Pattern oriented architecture for web based architecture
PDF
Salesforce Enterprise Patterns Overview.pdf
PDF
Managing Large Flask Applications On Google App Engine (GAE)
PDF
Microservice final final
Over view of software artitecture
IT 8003 Cloud ComputingFor this activi.docx
Designingapplswithnet
Why MVC?
Architecting for Change: An Agile Approach
whitepaper_workday_technology_platform_devt_process
J2 ee archi
A Brief Note On Asp.Net And Cloud Computing Essay
2014_report
Modern webtechnologies
DAS Slides: Data Architect vs. Data Engineer vs. Data Modeler
The Clean Architecture
Task 2 - Educational Article – Model View Controller (MVC)
Design Patterns for Micro Service Architecture
Reengineering including reverse & forward Engineering
Pattern oriented architecture for web based architecture
Salesforce Enterprise Patterns Overview.pdf
Managing Large Flask Applications On Google App Engine (GAE)
Microservice final final
Ad

More from Md. Sadhan Sarker (6)

PDF
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
PDF
Android Hands On Training
PDF
Google container engine (GKE)
PDF
DDD knowledge sharing
PDF
Journey to cloud engineering
PDF
Up and Running with firebase
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Android Hands On Training
Google container engine (GKE)
DDD knowledge sharing
Journey to cloud engineering
Up and Running with firebase

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Nekopoi APK 2025 free lastest update
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
ai tools demonstartion for schools and inter college
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PTS Company Brochure 2025 (1).pdf.......
Nekopoi APK 2025 free lastest update
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
ai tools demonstartion for schools and inter college
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
How to Migrate SBCGlobal Email to Yahoo Easily
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
Softaken Excel to vCard Converter Software.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
CHAPTER 2 - PM Management and IT Context
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Understanding Forklifts - TECH EHS Solution
ISO 45001 Occupational Health and Safety Management System
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms II-SECS-1021-03
Odoo Companies in India – Driving Business Transformation.pdf

Software architecture patterns

  • 2.  Introduction.  What is Software architecture patterns?  Why Software architecture patterns?  When we follows Software architecture patterns?  Who follows software architecture patterns?  Discussion about Essentials Software Architectures? # Agenda! We Are Going To Cover:- “Software Architecture Patterns” Essential…2
  • 3. # Introduction:- What is Software architecture patterns ? 3  Reusable predefined solutions.  Set of instructions, rules, specifications and guidelines.  Customizable and merged able.
  • 4. # Introduction:- Why Software architecture patterns? 4  To give commonly occurring problems solutions, from previous listens and learns.  To avoid common problems, issues and mistakes, those are already fetched.  Helps in decision making, creating new design solutions that needs in applications.
  • 5. # Introduction:- When, Who follows Software architecture patterns? 5  Before any Software Development need to know about those patterns clearly.  Before Develop any enterprise application need to know about those pattern.  When you want to know, how existing enterprise application overcome their critical salutation and how to solved those.
  • 6. # Introduction:- Discussion about essentials software architectures 6  Layered Architectural Pattern and MVC  Microkernel Architectural Pattern  CQRS Architectural Pattern  Event Sourcing Architectural Pattern  Microservices Architectural Pattern  I think those patterns are essentials to know
  • 7. # Layered Architectural Pattern and MVC 7  Split up code into layers, they have different responsibly for higher layer.  Layer can be logical separation of code or physical separation of code.  Physical separation of code is know as tier. Explanation:  User click a button from Presentation layer, then it call application layer  Now, Application layer call Business layer and process its logical operations  And finally store data through Persistence layer, then store it in Database  Tiers may seem similar to the model-view-controller (MVC).  MVC architecture is triangular, the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model.  MVC components could talk to each other, layered architecture only allows message passing between layers. MVC architecture is mostly used for presentation, but layered architecture is focused on the entire system Layer aren’t predefined. But most common flow Presentation Application Business Persistence Databases Call between layers flow downward MVC Most Used Pattern
  • 8. # Layered Architectural Pattern and MVC (Pros & Cons ) 8 Pros:  Most developers are familiar with this pattern.  It provides an easy way of writing a well-organized and testable application. Cons:  It tends to lead to monolithic applications that are hard to split up afterward.  If you are writing a simple CRUD application, without adding any value in these layers. Need to writing lot of code in different layers. When Choose:  For small business. and small organizations  Individual Development
  • 9. # Microkernel Architectural Pattern 9 Most of the application developed on this pattern  Limiting the features, so that application makes more light weight, functional and extensive.  Plug-in pattern, is useful when application has a core set of responsibilities and a collection of interchangeable parts on the side. We are familiar with plugins or extensions Explanation:  Like Chrome, Eclipse, Photoshop or other application we’re adding plugins for extended functionality.  Microkernel could contain all the logic for scheduling and triggering tasks, of plugins. Or they can share task and logic through APIs.  But application should run limited functionall, without depends on plugins
  • 10. # Microkernel Architectural Pattern (Pros & Cons ) 10 Pros:  Provides great flexibility and extensibility.  Some implementations allow for adding plugins while the application is running.  Microkernel and plugins can be developed by separate teams. Cons:  Difficult to decide what belongs in the microkernel and what doesn’t.  Predefined API might not be a good fit for future plugins development for separate teams. When Choose:  For Workflow Applications.  Applications take data from different sources, transform that data and writes it to different destinations
  • 11. # CQRS Architectural Pattern 11 CQRS is an acronym for Command and Query Responsibility Segregation.  The central concept of this pattern is that an application has read operations and write operations that must be totally separated. Implementations can be like below:  If use a relational database, this means there will be tables for the command model and tables for the read model.  Some implementations even store the different models in totally different databases, e.g. SQL Server for the command model and MongoDB for the read model. (Cause RDBMS faster for write and NOSQL faster for read)
  • 12. # CQRS Architectural Pattern Flow 12 How to read or fetch data from Databases How to write data in Databases After send command store data in write database then update changes in read database.
  • 13. # CQRS Architectural Pattern (Pros & Cons ) 13 Pros:  Command models can focus on business logic, other side read models can ensure validity of tailored.  You can avoid complex queries (e.g. joins in SQL). which makes the reads more performant. Cons:  Keeping the command and the read models in sync can become complex. When Choose:  Applications with complex domains like enterprise applications.  Need when High amount of reads.
  • 14. # Event Sourcing Architectural Pattern 14 CQRS is closely related to Event Sourcing.  In this pattern we don’t just store current state of model in the database, but also the events that happened to the model. (e.g. if want to change the name of user then need to store ‘NameChanged’ event with new and possibly the old one too.  When need to retrieve a model, then retrieve all its stored events and reapply them on a new object. It’s knows as rehydrating an object.  A real-life analogy of event sourcing is accounting. When you add an expense, you don’t change the value of the total. In accounting, a new line or record is added with the operation to be performed.  If an error was made. Then just simply add a new line. To make your life easier, you could calculate the total every time and add a line. This total can be regarded as the read model.
  • 15. # Event Sourcing Architectural Pattern: Example 15 Jobs Amount Event … … … Invoice 19_03_22 500 generate_invoice Buy Pen - 10 expense_add Buy Pencil - 5 expense_add Invoice 19_04_22 485 generate_invoice Buy Bangla Book -200 expense_add Cancellation invoice 19_04_22 - 485 make_invoice_correction Invoice 19_04_22 215 generate_invoice Total 715 <== Auto-updated read model Total Expenses: 10+5+200 = 215 Total Expenses: 500 +215 = 715
  • 16. # Event Sourcing Architectural Pattern (Pros & Cons ) 16 Pros:  It can provide an audit log out of the box.  Each event represents a manipulation of the data at a certain point in time. Cons:  Requires some discipline because you can’t just fix wrong data with a simple edit in the database.  Not trivial task to change the structure of an event. E.g. suppose need to add property, then still contains previous events without that property. Now manually need to handle this missing data in code. When Choose:  Will be built with CQRS.  Need publish events to external systems.  Have complex domains.  Need an audit log of changes to the data.
  • 17. “Microservices” 17  Microservices is basically a Software Development Architecture.  Design application or services that can Independently deployable.
  • 18.  Need to know about Monolithic.  Monolithic Vs Microservices.  Why Monolithic to Microservices? # What is microservices? 18 User Registration Service Inventory Service Order Service Payment Service APIApplication E-Shop Microservices Base Application E-Shop Monolithic Base Application User Registration InventoryOrder Payment All the functionality and responsibility into single application All the functionality and responsibility are separated.
  • 19. # Monolithic Vs microservices 19  To Scale Or replicate a Monolithic application need multiple servers. Legacy operations are complex.  Allocate more resources, so it’s increase costs.  Continuous features development, integrations and development are harder and slow.  To Scale Or replicate by distribute across servers as needed.  It’s easier to rewrite pieces of the application because they’re smaller and less coupled to other parts.  Need to handle communication, coordination, backward compatibility, logging, etc.  Hard to writing a good set of microservices.
  • 20.  Applications where certain parts will be used intensively and need to be scaled.  Services that provide functionality to several other applications.  Applications that would become very complex if combined into one monolith.  Where application need data and is responsible for its integrity and mutability. # When Choose microservices? 20
  • 21. MD. SADHAN SARKER Software Engineer Leads Corporation Limited. sadhansarker3@gmail.com github.com/mesadhan mesadhan.jimdo.comwww.fb.com/cse.sadhan www.twitter.com/eng_sadhan inktechs.com Thanks! From