SlideShare una empresa de Scribd logo
1 de 37
Confused me staring at my code
S.O.L.I.D Principles
GOF Patterns
OOP Design Principle
Architectural Patterns
Key Objectives
• Business Requirement to design pattern , How do
we implement ?
• Do I really need to know All
– design patterns ?
– Architectural Patterns ?
• Understand Pattern Relationships and how they
have evolved.
• What is OOP ?
• What is a Design Patterns ?
• What is Software Architecture ?
Still I cannot imagine why I wrote
software like this
Why fail to understand Product
Architecture ?
1. Business Architecture (Goals Objectives)
2. Business Design (Branding / Sales …)
3. Profit Making Business
1. System /Technical Architecture
2. Technical Design
3. Technical Implementation (Code)
1. Usability Architecture
2. Usability Design
3. Useful software Product
Lack of collaboration
between User/
Business/ Engineering
Strategy
Profits
Goals
Marketing & Branding
Customer Acquisition
Requirements
System, Architectural
1. Technical Architecture
2. System Design
3. Code (Implementation)
Focus for this session
Example Business Case
Architecture Vs Design
Architectural
• Is all banks has good telephone & Internet coverage ?
Majority , Yes they have fairly good internet.
• User capacity ?
Average 100 to 2000 customers a bank.
• How branches are located in the country?
Around 10 – 15 branches in each district,
• Each district has a head office
Country head offices are located in Colombo.
• Users Connectivity Modes
Web /Mobile/Desktop client ..
• How Does bank connect with Third Party like SLT/ CEB/ Coop-City
Get the billing Data at periodical intervals (No real time requirement)
Filling the Blank - Design
• BOTTOM UP :
Code > Design > Architecture , Business Use
cases(Architecturally Significant)
• TOP Down :
Architecture/Business Use cases > Design >
Code
• Combination of both (More
convenient and practical)
Architectural
Functional
BridgetheDesignGap
Perceived
Understanding
(Can differ from
person to person)
General design
Guidelines which are
paradigm Specific
Solutions to
recurrent designs
(Very Context
Specific)
1. S.O.L.I.D Design Principles
2. OOP Design Principles
(Abstraction
, Encapsulation
, Inheritance
, Polymorphism …)
1. GOF Design Patterns
2. GRASP Design Patterns
3. SOA Patterns …
4. Security Patterns
Values: How I perceive OOP when I
was a student
Principles: OOP Principles
• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
Inheritance (IS – A)Association
Realize/Implementation Dependency
Aggregation (Has – A)
Composition (Has – A)
Patterns: Solutions to recurrent design
issues(Based on principles)
{Other Principles …}
Assembling Patterns
1. GOF Patterns
2.GRASP Patterns
…
Knowing patterns is good enough ?
• No , You have to have a way to apply ?
• Where do we start ?
• How do I do it ?
Pattern applying process
Minimal Viable First release
• Proof of Concepts for: Architecturally
significant use cases (Scenarios)
• Thin functional Slice : To cover end to end
integration of application layer in a functional
scenario. Functional Significant use case
12345
1. Client
2. Service Layer
3. Back office
Implementation
/Layering
4. Service Integration
Layer
5. Scheduled Third
Party Services
Synchronization
Discuss About What is Architecturally
Significant
User Stories
• As a Banking user
– Register new Customer
– Unregister Customer
– Modify Customer details
– Enable Customer Services (SLT, CEB , Coop-City …)
– Balance Inquiry
Realization of Functionally Significant
User Story
Interaction Diagrams
Responsibilities - CRC
Responsibility
Driven Designing1
2
3
GRASP (General Responsibility
Assignment Software Patterns )
Guide line for assigning responsibilities
Controller
Bundle UI Event
with Use cases
System Use case for CRB
This system use case run on a scheduler
High Cohesion /Low Coupling
• Epics -> Stories
• Refactor -> Complex Objects
• Refactor APIs into Segregated APIS
• Introduce Workflows into Aggregate APIs into
Process , User Stories
• Introduce mediators to minimize coupling
between objects
Layering Application
Common
DB
Framework
Common
Service
Helpers
Unit Tests
Modules
Customer
Customer DAL
Customer Service
Payment
Payment DAL
Payment Service
Admin
Admin DAL
Admin Service
Modules
Customer API
Customer API
Proxy
Payment API
Payment API
Proxy
Admin API
Admin API
Proxy
Desktop Client Web Client Mobile Client
Customer Service
Contracts/Operation Contracts
Customer Service Implementation
Top level View of Customer Module
1
2
3
1 Customer module Data Access
Layer
Commands : Data Access Logic
DTO : Data Transfer Objects
Facades : Data Access Abstractions
to simplify Data access Operations
2 Customer Service Interface and
Implementations
Service Implementation: Service
logic implementation
Service Interface: Service and
Operation Contracts
3 Customer module Unit Tests
Unit tests for Customer module.
Customer Service Low Level Design
User of GOF Patterns in GRASP Process
• Creational Patterns
• Behavioral Patterns
• Structural Patterns
Object Creation
1) Avoid Multiple new Statements
(Singleton Patterns)
2) Hide the creation details from
business logic
3) Create Product families
Object Interaction

Más contenido relacionado

La actualidad más candente

Architecture Entropy
Architecture EntropyArchitecture Entropy
Architecture EntropySimon Greig
 
20081202 Dell Conference
20081202 Dell Conference20081202 Dell Conference
20081202 Dell ConferenceIvan Kristo
 
Public Sector Cloud
Public Sector CloudPublic Sector Cloud
Public Sector CloudSimon Greig
 
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...Anderson Bassani
 
CIS Infrastructure Group Don Mori Profile 2016
CIS Infrastructure Group Don Mori Profile 2016CIS Infrastructure Group Don Mori Profile 2016
CIS Infrastructure Group Don Mori Profile 2016Don Mori
 
Enterprise integration primer
Enterprise integration primerEnterprise integration primer
Enterprise integration primerCharles Wade
 
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutions
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutionsFujitsu industry ready Intel Xeon Phi Coprocessor based solutions
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutionsIntel IT Center
 
Memos Case Study Leaseplan Call Center
Memos Case Study Leaseplan Call CenterMemos Case Study Leaseplan Call Center
Memos Case Study Leaseplan Call CenterApro Software
 
End-to-End Architectural Considerations for Supporting Telematics Solutions -...
End-to-End Architectural Considerations for Supporting Telematics Solutions -...End-to-End Architectural Considerations for Supporting Telematics Solutions -...
End-to-End Architectural Considerations for Supporting Telematics Solutions -...mfrancis
 
Moving from Applications to Business Processes - M Herterich
Moving from Applications to Business Processes - M HerterichMoving from Applications to Business Processes - M Herterich
Moving from Applications to Business Processes - M Herterichmfrancis
 
BPM for SOA+ESB+API and cloud
BPM for SOA+ESB+API and cloud BPM for SOA+ESB+API and cloud
BPM for SOA+ESB+API and cloud Alexander SAMARIN
 
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACE
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACEChargeback in a Cloud and Non-Cloud Environment, IAITAM ACE
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACEOpen iT Inc.
 
System Architecture_BPM TIBCO_Network Inventory
System Architecture_BPM TIBCO_Network InventorySystem Architecture_BPM TIBCO_Network Inventory
System Architecture_BPM TIBCO_Network InventoryEla Pamieta
 
The IT Chargeback Journey
The IT Chargeback JourneyThe IT Chargeback Journey
The IT Chargeback JourneyPete Hidalgo
 
Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationDimitris Kolovos
 
Chapter 8: ERP and Electronic Commerce
Chapter 8: ERP and Electronic CommerceChapter 8: ERP and Electronic Commerce
Chapter 8: ERP and Electronic CommerceQuang Ngoc
 
End-to-End and e-Business Value from the Telematics Reference Implementation ...
End-to-End and e-Business Value from the Telematics Reference Implementation ...End-to-End and e-Business Value from the Telematics Reference Implementation ...
End-to-End and e-Business Value from the Telematics Reference Implementation ...mfrancis
 

La actualidad más candente (18)

Architecture Entropy
Architecture EntropyArchitecture Entropy
Architecture Entropy
 
20081202 Dell Conference
20081202 Dell Conference20081202 Dell Conference
20081202 Dell Conference
 
IBM COMPLIMENTARY MIGRATION ASSESSMENT
IBM COMPLIMENTARY MIGRATION ASSESSMENTIBM COMPLIMENTARY MIGRATION ASSESSMENT
IBM COMPLIMENTARY MIGRATION ASSESSMENT
 
Public Sector Cloud
Public Sector CloudPublic Sector Cloud
Public Sector Cloud
 
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...
IBM RACEv - Ferramenta para análise técnico e financeira para Plataforma Main...
 
CIS Infrastructure Group Don Mori Profile 2016
CIS Infrastructure Group Don Mori Profile 2016CIS Infrastructure Group Don Mori Profile 2016
CIS Infrastructure Group Don Mori Profile 2016
 
Enterprise integration primer
Enterprise integration primerEnterprise integration primer
Enterprise integration primer
 
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutions
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutionsFujitsu industry ready Intel Xeon Phi Coprocessor based solutions
Fujitsu industry ready Intel Xeon Phi Coprocessor based solutions
 
Memos Case Study Leaseplan Call Center
Memos Case Study Leaseplan Call CenterMemos Case Study Leaseplan Call Center
Memos Case Study Leaseplan Call Center
 
End-to-End Architectural Considerations for Supporting Telematics Solutions -...
End-to-End Architectural Considerations for Supporting Telematics Solutions -...End-to-End Architectural Considerations for Supporting Telematics Solutions -...
End-to-End Architectural Considerations for Supporting Telematics Solutions -...
 
Moving from Applications to Business Processes - M Herterich
Moving from Applications to Business Processes - M HerterichMoving from Applications to Business Processes - M Herterich
Moving from Applications to Business Processes - M Herterich
 
BPM for SOA+ESB+API and cloud
BPM for SOA+ESB+API and cloud BPM for SOA+ESB+API and cloud
BPM for SOA+ESB+API and cloud
 
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACE
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACEChargeback in a Cloud and Non-Cloud Environment, IAITAM ACE
Chargeback in a Cloud and Non-Cloud Environment, IAITAM ACE
 
System Architecture_BPM TIBCO_Network Inventory
System Architecture_BPM TIBCO_Network InventorySystem Architecture_BPM TIBCO_Network Inventory
System Architecture_BPM TIBCO_Network Inventory
 
The IT Chargeback Journey
The IT Chargeback JourneyThe IT Chargeback Journey
The IT Chargeback Journey
 
Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T Transformation
 
Chapter 8: ERP and Electronic Commerce
Chapter 8: ERP and Electronic CommerceChapter 8: ERP and Electronic Commerce
Chapter 8: ERP and Electronic Commerce
 
End-to-End and e-Business Value from the Telematics Reference Implementation ...
End-to-End and e-Business Value from the Telematics Reference Implementation ...End-to-End and e-Business Value from the Telematics Reference Implementation ...
End-to-End and e-Business Value from the Telematics Reference Implementation ...
 

Destacado

Parnassus fine
Parnassus fineParnassus fine
Parnassus fineMolo dis
 
HueMore
HueMoreHueMore
HueMoreekux44
 
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...Raffaella Bisson
 
Giáo trình excel
Giáo trình excelGiáo trình excel
Giáo trình excelintrananh
 
Gibbon presentation final one
Gibbon presentation final oneGibbon presentation final one
Gibbon presentation final onejacklloyd13
 

Destacado (6)

Parnassus fine
Parnassus fineParnassus fine
Parnassus fine
 
HueMore
HueMoreHueMore
HueMore
 
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...
Proposta di creazione di un nuovo centro per la prevenzione ed il trattamento...
 
Giáo trình excel
Giáo trình excelGiáo trình excel
Giáo trình excel
 
Designing for Cloud
Designing for Cloud Designing for Cloud
Designing for Cloud
 
Gibbon presentation final one
Gibbon presentation final oneGibbon presentation final one
Gibbon presentation final one
 

Similar a Confused Code to Clean Architecture

Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-0399X Technology
 
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...confluent
 
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...Designing and Implementing Information Systems with Event Modeling, Bobby Cal...
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...confluent
 
India GRUC Agility Presentation 2015-6-30
India GRUC Agility Presentation 2015-6-30India GRUC Agility Presentation 2015-6-30
India GRUC Agility Presentation 2015-6-30Roger Snook
 
What Is PLM and Why Is It Important
What Is PLM and Why Is It ImportantWhat Is PLM and Why Is It Important
What Is PLM and Why Is It ImportantElizabeth Steiner
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...HostedbyConfluent
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachBen Stopford
 
Analyzing Business Requirements in a Visible Enterprise
Analyzing Business Requirements in a Visible EnterpriseAnalyzing Business Requirements in a Visible Enterprise
Analyzing Business Requirements in a Visible EnterpriseDafna Levy
 
Process-Oriented Business Requirements
Process-Oriented Business RequirementsProcess-Oriented Business Requirements
Process-Oriented Business RequirementsDafna Levy
 
SharePoint as a Business Platform Why, What and How? – No Code
SharePoint as a Business Platform Why, What and How? – No CodeSharePoint as a Business Platform Why, What and How? – No Code
SharePoint as a Business Platform Why, What and How? – No Codedox42
 
Agile Architecture (MAE slides)
Agile Architecture (MAE slides)Agile Architecture (MAE slides)
Agile Architecture (MAE slides)Richard Green
 
Are You an Accidental or Intentional Architect?
Are You an Accidental or Intentional Architect?Are You an Accidental or Intentional Architect?
Are You an Accidental or Intentional Architect?iasaglobal
 
Impact 2013 2963 - IBM Business Process Manager Top Practices
Impact 2013 2963 - IBM Business Process Manager Top PracticesImpact 2013 2963 - IBM Business Process Manager Top Practices
Impact 2013 2963 - IBM Business Process Manager Top PracticesBrian Petrini
 
System Architect and Rhapsody
System Architect and RhapsodySystem Architect and Rhapsody
System Architect and RhapsodyMartin Owen
 
Technical stories v1.2
Technical stories v1.2Technical stories v1.2
Technical stories v1.2Jim Brisson
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In DesignSandro Mancuso
 

Similar a Confused Code to Clean Architecture (20)

Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
Same Patterns Different Architectures - Colombo Architecture Meetup - Session-03
 
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
 
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...Designing and Implementing Information Systems with Event Modeling, Bobby Cal...
Designing and Implementing Information Systems with Event Modeling, Bobby Cal...
 
Business analyst with project training
Business analyst with project trainingBusiness analyst with project training
Business analyst with project training
 
India GRUC Agility Presentation 2015-6-30
India GRUC Agility Presentation 2015-6-30India GRUC Agility Presentation 2015-6-30
India GRUC Agility Presentation 2015-6-30
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
 
What Is PLM and Why Is It Important
What Is PLM and Why Is It ImportantWhat Is PLM and Why Is It Important
What Is PLM and Why Is It Important
 
Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...Model-driven and low-code development for event-based systems | Bobby Calderw...
Model-driven and low-code development for event-based systems | Bobby Calderw...
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile Approach
 
Analyzing Business Requirements in a Visible Enterprise
Analyzing Business Requirements in a Visible EnterpriseAnalyzing Business Requirements in a Visible Enterprise
Analyzing Business Requirements in a Visible Enterprise
 
Process-Oriented Business Requirements
Process-Oriented Business RequirementsProcess-Oriented Business Requirements
Process-Oriented Business Requirements
 
Discover Your IT Career Path
Discover Your IT Career PathDiscover Your IT Career Path
Discover Your IT Career Path
 
SharePoint as a Business Platform Why, What and How? – No Code
SharePoint as a Business Platform Why, What and How? – No CodeSharePoint as a Business Platform Why, What and How? – No Code
SharePoint as a Business Platform Why, What and How? – No Code
 
Agile Architecture (MAE slides)
Agile Architecture (MAE slides)Agile Architecture (MAE slides)
Agile Architecture (MAE slides)
 
Are You an Accidental or Intentional Architect?
Are You an Accidental or Intentional Architect?Are You an Accidental or Intentional Architect?
Are You an Accidental or Intentional Architect?
 
Impact 2013 2963 - IBM Business Process Manager Top Practices
Impact 2013 2963 - IBM Business Process Manager Top PracticesImpact 2013 2963 - IBM Business Process Manager Top Practices
Impact 2013 2963 - IBM Business Process Manager Top Practices
 
System Architect and Rhapsody
System Architect and RhapsodySystem Architect and Rhapsody
System Architect and Rhapsody
 
Eric Weathers 14
Eric Weathers   14Eric Weathers   14
Eric Weathers 14
 
Technical stories v1.2
Technical stories v1.2Technical stories v1.2
Technical stories v1.2
 
A Case for Outside-In Design
A Case for Outside-In DesignA Case for Outside-In Design
A Case for Outside-In Design
 

Último

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Último (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Confused Code to Clean Architecture

  • 1. Confused me staring at my code S.O.L.I.D Principles GOF Patterns OOP Design Principle Architectural Patterns
  • 2. Key Objectives • Business Requirement to design pattern , How do we implement ? • Do I really need to know All – design patterns ? – Architectural Patterns ? • Understand Pattern Relationships and how they have evolved.
  • 3. • What is OOP ? • What is a Design Patterns ? • What is Software Architecture ?
  • 4. Still I cannot imagine why I wrote software like this
  • 5. Why fail to understand Product Architecture ? 1. Business Architecture (Goals Objectives) 2. Business Design (Branding / Sales …) 3. Profit Making Business 1. System /Technical Architecture 2. Technical Design 3. Technical Implementation (Code) 1. Usability Architecture 2. Usability Design 3. Useful software Product Lack of collaboration between User/ Business/ Engineering
  • 6. Strategy Profits Goals Marketing & Branding Customer Acquisition Requirements System, Architectural
  • 7. 1. Technical Architecture 2. System Design 3. Code (Implementation) Focus for this session
  • 10. Architectural • Is all banks has good telephone & Internet coverage ? Majority , Yes they have fairly good internet. • User capacity ? Average 100 to 2000 customers a bank. • How branches are located in the country? Around 10 – 15 branches in each district, • Each district has a head office Country head offices are located in Colombo. • Users Connectivity Modes Web /Mobile/Desktop client .. • How Does bank connect with Third Party like SLT/ CEB/ Coop-City Get the billing Data at periodical intervals (No real time requirement)
  • 11. Filling the Blank - Design • BOTTOM UP : Code > Design > Architecture , Business Use cases(Architecturally Significant) • TOP Down : Architecture/Business Use cases > Design > Code • Combination of both (More convenient and practical) Architectural Functional BridgetheDesignGap
  • 12. Perceived Understanding (Can differ from person to person) General design Guidelines which are paradigm Specific Solutions to recurrent designs (Very Context Specific) 1. S.O.L.I.D Design Principles 2. OOP Design Principles (Abstraction , Encapsulation , Inheritance , Polymorphism …) 1. GOF Design Patterns 2. GRASP Design Patterns 3. SOA Patterns … 4. Security Patterns
  • 13. Values: How I perceive OOP when I was a student
  • 14. Principles: OOP Principles • Abstraction • Encapsulation • Inheritance • Polymorphism
  • 15. Inheritance (IS – A)Association Realize/Implementation Dependency Aggregation (Has – A) Composition (Has – A)
  • 16. Patterns: Solutions to recurrent design issues(Based on principles) {Other Principles …} Assembling Patterns 1. GOF Patterns 2.GRASP Patterns …
  • 17. Knowing patterns is good enough ? • No , You have to have a way to apply ? • Where do we start ? • How do I do it ?
  • 19. Minimal Viable First release • Proof of Concepts for: Architecturally significant use cases (Scenarios) • Thin functional Slice : To cover end to end integration of application layer in a functional scenario. Functional Significant use case
  • 20. 12345 1. Client 2. Service Layer 3. Back office Implementation /Layering 4. Service Integration Layer 5. Scheduled Third Party Services Synchronization Discuss About What is Architecturally Significant
  • 21.
  • 22. User Stories • As a Banking user – Register new Customer – Unregister Customer – Modify Customer details – Enable Customer Services (SLT, CEB , Coop-City …) – Balance Inquiry
  • 23. Realization of Functionally Significant User Story
  • 24. Interaction Diagrams Responsibilities - CRC Responsibility Driven Designing1 2 3
  • 25. GRASP (General Responsibility Assignment Software Patterns ) Guide line for assigning responsibilities
  • 27. System Use case for CRB This system use case run on a scheduler
  • 28. High Cohesion /Low Coupling • Epics -> Stories • Refactor -> Complex Objects • Refactor APIs into Segregated APIS • Introduce Workflows into Aggregate APIs into Process , User Stories • Introduce mediators to minimize coupling between objects
  • 29.
  • 30. Layering Application Common DB Framework Common Service Helpers Unit Tests Modules Customer Customer DAL Customer Service Payment Payment DAL Payment Service Admin Admin DAL Admin Service Modules Customer API Customer API Proxy Payment API Payment API Proxy Admin API Admin API Proxy Desktop Client Web Client Mobile Client
  • 33. Top level View of Customer Module 1 2 3 1 Customer module Data Access Layer Commands : Data Access Logic DTO : Data Transfer Objects Facades : Data Access Abstractions to simplify Data access Operations 2 Customer Service Interface and Implementations Service Implementation: Service logic implementation Service Interface: Service and Operation Contracts 3 Customer module Unit Tests Unit tests for Customer module.
  • 34. Customer Service Low Level Design
  • 35. User of GOF Patterns in GRASP Process • Creational Patterns • Behavioral Patterns • Structural Patterns
  • 36. Object Creation 1) Avoid Multiple new Statements (Singleton Patterns) 2) Hide the creation details from business logic 3) Create Product families