SlideShare a Scribd company logo
Design Patterns for software
engineering
Presented by:
Rohan Jain
Tanisha Bhayani
Akshay Bhanderi
Abhay Desale
What is design pattern?
● Design patterns are typical solutions to commonly occurring problems in software design.
● They are like pre-made blueprints that you can customize to solve a recurring design problem in your
code.
● Types of design pattern
○ Creational Design Patterns
○ Structural Design Patterns
○ Behavioral Design Patterns
Creational Design Pattern: Factory Method
we create object without exposing the creation logic to client and the client use the same common interface to
create new type of object
Creational Design Pattern:Abstract Factory
Lets you produce families of related objects without specifying their concrete classes.
Creational Design Pattern: Builder
● That lets you construct complex objects step by step.
● The pattern allows you to produce different types and representations of an object using the same
construction code.
Creational Design Pattern: Singleton
class Database is
private static field instance: Database
private constructor Database() is
public static method getInstance() is
if (Database.instance == null) then
acquireThreadLock() and then
if (Database.instance == null) then
Database.instance = new Database()
return Database.instance
public method query(sql) is
class Application is
method main() is
Database foo =
Database.getInstance()
foo.query("SELECT ...")
// ...
Database bar =
Database.getInstance()
bar.query("SELECT ...")
// The variable `bar`
will contain the same object as
// the variable `foo`.
That lets you ensure that a class has only one instance, while providing a global access point to this instance.
Creational Design Pattern: Prototype
lets you copy existing objects without making your code dependent on their classes.
Structure Design Pattern: Adapter Pattern
Scenario:
Two incompatible interfaces but the core functionality is same.
Class Adapter - Inheritance Object Adapter - Delegation through Composition
Structure Design Pattern: Bridge Pattern
Scenario:
Vary the implementation and the abstraction by placing the two into separate class hierarchies.
Structure Design Pattern: Composite Pattern
Scenario:
When clients ignore the difference between compositions of objects and individual objects.
Structure Design Pattern: Decorator Pattern
Scenario:
Allows behavior to be added to an individual object, dynamically, without affecting the behavior of other
objects from the same class.
Structure Design Pattern: Facade Pattern
Scenario:
The client facing interface needs simplification.
Structure Design Pattern: Flyweight Pattern
Scenario:
Minimize memory usage or computational expenses by sharing as much as possible with similar objects.
Structure Design Pattern: Proxy Pattern
Scenario:
When client needs to protect, hide complexity, or delay expensive actions.
Anti Pattern
● Applying a particular design pattern in the improper context.
Behaviour Pattern
● Behavioral design patterns are concerned with the interaction and responsibility of objects.
Behaviour Design Pattern: Chain of Responsibility
What it suggests?
Pass the request along the chain
of handlers instead of one.
Control order of request handling
Behaviour Design Pattern: Command
What is suggets?
Turns a request into a stand-alone object
that contains all information about the request.
Behaviour Design Pattern: Iterator
What is suggets?
lets you traverse elements of a collection
without exposing its underlying representation
Behaviour Design Pattern: Meditor
What is suggets?
This pattern restricts direct
communications between the objects and forces
them to collaborate only via a mediator object.
Increases reusability
Behaviour Design Pattern: Template Method
What it says?
Just define the skeleton of a function in
an operation, deferring some steps to its
subclasses.
Remove duplication
Behaviour Design Pattern: Visitor
What is says?
Visitor lets you define a new operation
without changing the classes of the elements on
which it operates.
Behaviour Design Pattern: Memento
Lets you save and restore the previous state of an object without revealing the details of its
implementation.
Behaviour Design Pattern: Observer
Lets you define a subscription mechanism to notify multiple objects about any events that happen to the
object they’re observing.
Behaviour Design Pattern: State
Lets an object alter its behavior when its internal state changes. It appears as if the object changed its
class.
Behaviour Design Pattern: Strategy
Lets you define a family of algorithms, put each of them into a separate class, and make their objects
interchangeable.
Problem Solution
References
● https://refactoring.guru/design-patterns
● https://www.javatpoint.com/design-patterns-in-java
● https://sourcemaking.com/design_patterns
● https://www.youtube.com/watch?v=TeZqKnC2gvA (for visiter)
● https://www.youtube.com/watch?v=7Pj5kAhVBlg
● https://medium.com/educative/the-7-most-important-software-design-patterns-d60e546afb0e
● https://medium.com/federicohaag/coding-better-using-design-patterns-4d7385a9e7ac
● https://www.youtube.com/watch?v=v9ejT8FO-7I&list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc(Design
Pattern Series)
● https://en.wikipedia.org/wiki/Structural_pattern
● https://stackoverflow.com/questions/980601/what-is-an-anti-pattern
● https://dev.to/carlillo/design-patterns---adapter-2pi3
● https://stackoverflow.com/questions/319728/when-do-you-use-the-bridge-pattern-how-is-it-different-from-
adapter-pattern
● https://en.wikipedia.org/wiki/Composite_pattern
● https://en.wikipedia.org/wiki/Decorator_pattern
● https://en.wikipedia.org/wiki/Facade_pattern
● https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch09s18.html
● http://www.cs.sjsu.edu/faculty/pearce/modules/patterns/distArch/proxy.htm
Thank You
Any Question?

More Related Content

PDF
Gang of Four in Java
PPT
Domain Driven Design (DDD)
PPTX
Object oriented modeling and design
PPTX
Uml Presentation
PPT
Class diagrams
PPT
Design patterns ppt
PPTX
Design Concept software engineering
PPTX
Domain-Driven Design
Gang of Four in Java
Domain Driven Design (DDD)
Object oriented modeling and design
Uml Presentation
Class diagrams
Design patterns ppt
Design Concept software engineering
Domain-Driven Design

What's hot (20)

PPTX
Domain Driven Design 101
PPTX
Component-based Software Engineering
PPT
Object-Oriented Analysis and Design
PDF
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
PDF
Build responsive applications with google flutter
PPTX
Clean Code - The Next Chapter
PPTX
Domain Driven Design(DDD) Presentation
PPTX
Mobile Application Development: Hybrid, Native and Mobile Web Apps
PDF
Domain Driven Design (Ultra) Distilled
PPTX
Let us understand design pattern
PDF
Introduction to Design Pattern
PPTX
How to Draw an Effective ER diagram
PDF
software design principles
PPT
Design Patterns (Examples in .NET)
PPTX
Brownfield Domain Driven Design
PPTX
Creating the first app with android studio
PDF
Design patterns
PDF
NextJS, A JavaScript Framework for building next generation SPA
PDF
Hexagonal architecture - message-oriented software design
PDF
Software Project Development Process
Domain Driven Design 101
Component-based Software Engineering
Object-Oriented Analysis and Design
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
Build responsive applications with google flutter
Clean Code - The Next Chapter
Domain Driven Design(DDD) Presentation
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Domain Driven Design (Ultra) Distilled
Let us understand design pattern
Introduction to Design Pattern
How to Draw an Effective ER diagram
software design principles
Design Patterns (Examples in .NET)
Brownfield Domain Driven Design
Creating the first app with android studio
Design patterns
NextJS, A JavaScript Framework for building next generation SPA
Hexagonal architecture - message-oriented software design
Software Project Development Process
Ad

Similar to Design patterns (20)

PPTX
Design patterns
PDF
Design Patterns Java programming language.pdf
PDF
Gof design pattern
PPTX
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
PDF
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
PPT
Software Design Patterns
PPT
Software Design Patterns
PPT
5 Design Patterns Explained
DOCX
Design patterns
PPTX
Design patterns
DOCX
Patterns (contd)Software Development ProcessDesign patte.docx
PDF
GOF Design pattern with java
PDF
Java Design Patterns Interview Questions PDF By ScholarHat
PPTX
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
PPTX
Design Patterns
PPTX
Sofwear deasign and need of design pattern
PPSX
Prophecy Of Design Patterns
PPTX
Oops design pattern_amitgupta
PPT
Design patterns
DOCX
Design Pattern Notes: Nagpur University
Design patterns
Design Patterns Java programming language.pdf
Gof design pattern
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
Software Design Patterns
Software Design Patterns
5 Design Patterns Explained
Design patterns
Design patterns
Patterns (contd)Software Development ProcessDesign patte.docx
GOF Design pattern with java
Java Design Patterns Interview Questions PDF By ScholarHat
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Design Patterns
Sofwear deasign and need of design pattern
Prophecy Of Design Patterns
Oops design pattern_amitgupta
Design patterns
Design Pattern Notes: Nagpur University
Ad

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
composite construction of structures.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Construction Project Organization Group 2.pptx
PPTX
web development for engineering and engineering
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
DOCX
573137875-Attendance-Management-System-original
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
additive manufacturing of ss316l using mig welding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Lecture Notes Electrical Wiring System Components
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
composite construction of structures.pdf
Internet of Things (IOT) - A guide to understanding
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mechanical Engineering MATERIALS Selection
Construction Project Organization Group 2.pptx
web development for engineering and engineering
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Model Code of Practice - Construction Work - 21102022 .pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
573137875-Attendance-Management-System-original
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CH1 Production IntroductoryConcepts.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Design patterns

  • 1. Design Patterns for software engineering Presented by: Rohan Jain Tanisha Bhayani Akshay Bhanderi Abhay Desale
  • 2. What is design pattern? ● Design patterns are typical solutions to commonly occurring problems in software design. ● They are like pre-made blueprints that you can customize to solve a recurring design problem in your code. ● Types of design pattern ○ Creational Design Patterns ○ Structural Design Patterns ○ Behavioral Design Patterns
  • 3. Creational Design Pattern: Factory Method we create object without exposing the creation logic to client and the client use the same common interface to create new type of object
  • 4. Creational Design Pattern:Abstract Factory Lets you produce families of related objects without specifying their concrete classes.
  • 5. Creational Design Pattern: Builder ● That lets you construct complex objects step by step. ● The pattern allows you to produce different types and representations of an object using the same construction code.
  • 6. Creational Design Pattern: Singleton class Database is private static field instance: Database private constructor Database() is public static method getInstance() is if (Database.instance == null) then acquireThreadLock() and then if (Database.instance == null) then Database.instance = new Database() return Database.instance public method query(sql) is class Application is method main() is Database foo = Database.getInstance() foo.query("SELECT ...") // ... Database bar = Database.getInstance() bar.query("SELECT ...") // The variable `bar` will contain the same object as // the variable `foo`. That lets you ensure that a class has only one instance, while providing a global access point to this instance.
  • 7. Creational Design Pattern: Prototype lets you copy existing objects without making your code dependent on their classes.
  • 8. Structure Design Pattern: Adapter Pattern Scenario: Two incompatible interfaces but the core functionality is same. Class Adapter - Inheritance Object Adapter - Delegation through Composition
  • 9. Structure Design Pattern: Bridge Pattern Scenario: Vary the implementation and the abstraction by placing the two into separate class hierarchies.
  • 10. Structure Design Pattern: Composite Pattern Scenario: When clients ignore the difference between compositions of objects and individual objects.
  • 11. Structure Design Pattern: Decorator Pattern Scenario: Allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class.
  • 12. Structure Design Pattern: Facade Pattern Scenario: The client facing interface needs simplification.
  • 13. Structure Design Pattern: Flyweight Pattern Scenario: Minimize memory usage or computational expenses by sharing as much as possible with similar objects.
  • 14. Structure Design Pattern: Proxy Pattern Scenario: When client needs to protect, hide complexity, or delay expensive actions.
  • 15. Anti Pattern ● Applying a particular design pattern in the improper context.
  • 16. Behaviour Pattern ● Behavioral design patterns are concerned with the interaction and responsibility of objects. Behaviour Design Pattern: Chain of Responsibility What it suggests? Pass the request along the chain of handlers instead of one. Control order of request handling
  • 17. Behaviour Design Pattern: Command What is suggets? Turns a request into a stand-alone object that contains all information about the request.
  • 18. Behaviour Design Pattern: Iterator What is suggets? lets you traverse elements of a collection without exposing its underlying representation
  • 19. Behaviour Design Pattern: Meditor What is suggets? This pattern restricts direct communications between the objects and forces them to collaborate only via a mediator object. Increases reusability
  • 20. Behaviour Design Pattern: Template Method What it says? Just define the skeleton of a function in an operation, deferring some steps to its subclasses. Remove duplication
  • 21. Behaviour Design Pattern: Visitor What is says? Visitor lets you define a new operation without changing the classes of the elements on which it operates.
  • 22. Behaviour Design Pattern: Memento Lets you save and restore the previous state of an object without revealing the details of its implementation.
  • 23. Behaviour Design Pattern: Observer Lets you define a subscription mechanism to notify multiple objects about any events that happen to the object they’re observing.
  • 24. Behaviour Design Pattern: State Lets an object alter its behavior when its internal state changes. It appears as if the object changed its class.
  • 25. Behaviour Design Pattern: Strategy Lets you define a family of algorithms, put each of them into a separate class, and make their objects interchangeable. Problem Solution
  • 26. References ● https://refactoring.guru/design-patterns ● https://www.javatpoint.com/design-patterns-in-java ● https://sourcemaking.com/design_patterns ● https://www.youtube.com/watch?v=TeZqKnC2gvA (for visiter) ● https://www.youtube.com/watch?v=7Pj5kAhVBlg ● https://medium.com/educative/the-7-most-important-software-design-patterns-d60e546afb0e ● https://medium.com/federicohaag/coding-better-using-design-patterns-4d7385a9e7ac ● https://www.youtube.com/watch?v=v9ejT8FO-7I&list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc(Design Pattern Series) ● https://en.wikipedia.org/wiki/Structural_pattern ● https://stackoverflow.com/questions/980601/what-is-an-anti-pattern ● https://dev.to/carlillo/design-patterns---adapter-2pi3 ● https://stackoverflow.com/questions/319728/when-do-you-use-the-bridge-pattern-how-is-it-different-from- adapter-pattern ● https://en.wikipedia.org/wiki/Composite_pattern ● https://en.wikipedia.org/wiki/Decorator_pattern ● https://en.wikipedia.org/wiki/Facade_pattern ● https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch09s18.html ● http://www.cs.sjsu.edu/faculty/pearce/modules/patterns/distArch/proxy.htm