SlideShare uma empresa Scribd logo
1 de 60
Design Patterns for 70% of genious programmers Aamir Khan Solution Architect
Design Patterns for 70% of programmers in the world Saurabh Verma Solution Architect  I blog at http://www.domaindrivendesign.info
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Normal Classes vs Abstract Classes vs Interfaces Normal Class:  This is a normal class   Abstract Class:  These cannot be instantiated directly.  They may provide partial implementations and exists solely for the purpose of inheritance.  Interfaces:  Defines a contract. Concrete implementations needs to implement each property and method as per contract. Shut up ! We know all this
Million Dollar Question? What is Why?
Normal Class vs Abstract Class? If a particular class is a entity which is not required to be instantiated by the application directly, go for  Abstract Class Employee can be abstract class
Abstract Class vs Interfaces? If a particular class contains any default behavior, go for  Abstract Class If every concrete class has its own implementation, go for Interfaces Work – Management, Programming
MOVIES & ACTORS Shahrukh Khan Salman Khan riding bike Actors in a Movie
IS-A vs HAS-A vs CAN-DO IS-A Inheritance Shahrukh Khan is an ACTOR HAS-A Composition Movie has ACTORS CAN-DO Interfaces Salman Khan can DRIVE BIKE IS-A  Inheritance Shahrukh Khan is an ACTOR HAS-A  Composition Movie has ACTORS CAN-DO  Interfaces Salman Khan can DRIVE BIKE
What is a Pattern ,[object Object],[object Object],[object Object],[object Object]
History of Software Patterns
What Wikipedia says, ,[object Object],[object Object],[object Object]
Let’s understand design patterns by purpose
Let’s understand the purpose + Creational Patterns Structural Patterns Final Product Behavioral Patterns
Let’s understand the purpose
Design Patterns as per their  PURPOSE
Creational Patterns
Factory Method
Factory Method ,[object Object],[object Object],[object Object]
Factory Method System.Data.SqlClient.SqlClientFactory
Abstract Factory Pattern
Abstract Factory Pattern ,[object Object],[object Object]
Abstract Factory Method System.Data.Common.DbProviderFactories
Singleton Pattern
Singleton Pattern ,[object Object],[object Object],[object Object]
Singleton Pattern System.Data.SqlClient.SqlClientFactory
Structural Patterns
Façade Pattern
Façade Pattern ,[object Object],[object Object],[object Object]
Façade Pattern Its all about the service
Decorator Pattern
Decorator Pattern ,[object Object],[object Object],[object Object],simple actress ( act ) in role of modern girl (go out and  act ) in role of homely girl (be in home and  act )
Decorator Pattern System.IO.BufferedStream:Stream
Composite Pattern
Composite Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Composite Pattern System.Web.UI.Control   (Render Mechanism)
Composite Pattern
Adapter Pattern
Adapter Pattern ,[object Object],[object Object],[object Object],Application Framework Adapter Legacy Component
Adapter Pattern GearsTypelib.HtmlDialogHostClass (Interop.GearsTypelib)
Decorator vs Adapter Decorator looks like Adapter which “decorates” an existing class to make it compatible. Though, Decorator doesn’t wants you to decorate every method in the Adapted class. But who has stopped from doing it. “ Never underestimate the power of a developer”
Decorator vs Façade Façade is a way of hiding a complex system inside a simpler interface, whereas Decorator adds function by wrapping a class.
Behavioural Patterns
Command Pattern
Command Pattern ,[object Object],[object Object],[object Object],[object Object],One Receiver and Multiple actions
Command Pattern System.ComponentModel.Design.MenuCommand
Command Pattern Saurabh.Learning.DesignPatterns.Patterns.CommandPattern
Strategy Pattern
Strategy Pattern ,[object Object],[object Object],[object Object]
Strategy Pattern System.Collections.ArrayList
Template Method
Template Method ,[object Object],[object Object],[object Object],[object Object]
Template Method
Strategy Pattern vs Template Method ,[object Object],[object Object]
I hate my job
Top 5 ADVICES NOT TO FOLLOW
Reflect when you want  
Answers, anybody?
CONTENT STOLEN FROM   BOOKS: Head First Design Patterns Design Patterns in C# Design Patterns WEBSITES: Wikipedia, MSDN, doFactory and GOOGLE
Learn it all,   at my blog http://www.domaindrivendesign.info Don’t contact  me at, saurabh.net [at] gmail.com Saurabh Verma Solution Architect

Mais conteúdo relacionado

Mais procurados

Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
Confiz
 

Mais procurados (20)

SignalR Overview
SignalR OverviewSignalR Overview
SignalR Overview
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Parsing XML & JSON in Apex
Parsing XML & JSON in ApexParsing XML & JSON in Apex
Parsing XML & JSON in Apex
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise Control
 
AOT and Native with Spring Boot 3.0
AOT and Native with Spring Boot 3.0AOT and Native with Spring Boot 3.0
AOT and Native with Spring Boot 3.0
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
 
React vs Angular
React vs Angular React vs Angular
React vs Angular
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Microservices
MicroservicesMicroservices
Microservices
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
UC4 SCHEDULING
UC4 SCHEDULINGUC4 SCHEDULING
UC4 SCHEDULING
 
Integrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your EnvironmentIntegrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your Environment
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Java 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeJava 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgrade
 

Destaque

Oil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling OptimizationOil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling Optimization
Alkis Vazacopoulos
 
Architectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction DocumentsArchitectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction Documents
Galala University
 
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Brenno Menezes
 
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
Brenno Menezes
 

Destaque (20)

Enercept Power Point[1]
Enercept Power Point[1]Enercept Power Point[1]
Enercept Power Point[1]
 
Energy resource management
Energy resource managementEnergy resource management
Energy resource management
 
Crude-Oil Scheduling Technology: moving from simulation to optimization
Crude-Oil Scheduling Technology: moving from simulation to optimizationCrude-Oil Scheduling Technology: moving from simulation to optimization
Crude-Oil Scheduling Technology: moving from simulation to optimization
 
Steel building Graded Unit Civil Engineering Project HND Project Glasgow Kel...
Steel building Graded Unit  Civil Engineering Project HND Project Glasgow Kel...Steel building Graded Unit  Civil Engineering Project HND Project Glasgow Kel...
Steel building Graded Unit Civil Engineering Project HND Project Glasgow Kel...
 
Crude-Oil Blend Scheduling Optimization: An Application with Multi-Million D...
Crude-Oil Blend Scheduling Optimization:  An Application with Multi-Million D...Crude-Oil Blend Scheduling Optimization:  An Application with Multi-Million D...
Crude-Oil Blend Scheduling Optimization: An Application with Multi-Million D...
 
Oil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling OptimizationOil-Refinery Planning & Scheduling Optimization
Oil-Refinery Planning & Scheduling Optimization
 
Fnbe0115 Integrated - awesome
Fnbe0115 Integrated - awesomeFnbe0115 Integrated - awesome
Fnbe0115 Integrated - awesome
 
Architectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction DocumentsArchitectural Professional Practice - Construction Documents
Architectural Professional Practice - Construction Documents
 
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
Distillation Blending and Cutpoint Temperature Optimization in Scheduling Ope...
 
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
Distillation Blending and Cutpoint Temperature Optimization (DBCTO) in Schedu...
 
Schedule Development
Schedule DevelopmentSchedule Development
Schedule Development
 
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
CRUDE-OIL BLEND SCHEDULING OPTIMIZATION OF AN INDUSTRIAL-SIZED REFINERY: A DI...
 
Schedule Design PMI
Schedule Design PMISchedule Design PMI
Schedule Design PMI
 
5case
5case5case
5case
 
Strategic brand management
Strategic brand managementStrategic brand management
Strategic brand management
 
Design and analasys of a g+2 residential building
Design and analasys of a g+2 residential building Design and analasys of a g+2 residential building
Design and analasys of a g+2 residential building
 
Design and analasys of a g+3 residential building using staad
Design and analasys of a g+3 residential building using staadDesign and analasys of a g+3 residential building using staad
Design and analasys of a g+3 residential building using staad
 
Profit Impact of Market Strategies (PIMS)
Profit Impact of Market Strategies (PIMS)Profit Impact of Market Strategies (PIMS)
Profit Impact of Market Strategies (PIMS)
 
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRODESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
 
Multistorey building
Multistorey buildingMultistorey building
Multistorey building
 

Semelhante a Design Patterns For 70% Of Programmers In The World

P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
Gaurav Tyagi
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design Patterns
Dang Tuan
 

Semelhante a Design Patterns For 70% Of Programmers In The World (20)

P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
 
Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Ooad
OoadOoad
Ooad
 
Design Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator PatternDesign Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator Pattern
 
Creational Design Patterns
Creational Design PatternsCreational Design Patterns
Creational Design Patterns
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
M04 Design Patterns
M04 Design PatternsM04 Design Patterns
M04 Design Patterns
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Design Patterns For 70% Of Programmers In The World