尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
GOF
Naveen Kumar K S
Adith.Naveen@gmail.com
Introduction
¡ Design patterns represent the best practices used
by experienced object-oriented software
developers.
¡ Design patterns are solutions to general problems
that software developers faced during software
development
¡ All Design Patterns are got based on trial and
error by software engineers.
GOF?
¡ Discussed in 1994
¡ By Four people
¡ Erich Gamma
¡ Richard Helm
¡ Ralph Johnson
¡ John Vlissides
¡ To encourage people to go with reusable coding
Types of Design Patterns
¡ There are 23 design patterns which can be
classified in three categories: Creational,
Structural and Behavioral patterns.
¡ Another design pattern J2EE will be discussed in
other course
Creational Patterns
Abstract Factory Creates an instance of several families of classes
Builder Separates object construction from its representation
Factory Method Creates an instance of several derived classes
Prototype A fully initialized instance to be copied or cloned
Singleton A class of which only a single instance can exist
Structural Patterns
Adapter Match interfaces of different classes
Bridge Separates an object’s interface from its implementation
Composite A tree structure of simple and composite objects
Decorator Add responsibilities to objects dynamically
Facade A single class that represents an entire subsystem
Flyweight A fine-grained instance used for efficient sharing
Proxy An object representing another object
Behavioral Patterns
Chain of Resp. A way of passing a request between a chain of objects
Command Encapsulate a command request as an object
Interpreter A way to include language elements in a program
Iterator Sequentially access the elements of a collection
Mediator Defines simplified communication between classes
Memento Capture and restore an object's internal state
Observer A way of notifying change to a number of classes
State Alter an object's behavior when its state changes
Strategy Encapsulates an algorithm inside a class
Template Method Defer the exact steps of an algorithm to a subclass
Visitor Defines a new operation to a class without change
Singleton
¡ Singleton pattern is one of the simplest design
patterns in Java. This type of design pattern
comes under creational pattern as this pattern
provides one of the best ways to create an
object.
Factory Pattern
¡ Factory pattern is one of most used design
pattern in Java. This type of design pattern
comes under creational pattern as this pattern
provides one of the best ways to create an
object.
¡ In Factory pattern, we create object without
exposing the creation logic to the client and
refer to newly created object using a common
interface.
Abstract Factory Pattern
¡ Abstract Factory patterns work around a super-
factory which creates other factories. This factory
is also called as factory of factories. This type of
design pattern comes under creational pattern
as this pattern provides one of the best ways to
create an object.
Prototype Pattern
¡ Prototype pattern refers to creating duplicate
object while keeping performance in mind. This
type of design pattern comes under creational
pattern as this pattern provides one of the best
ways to create an object.
Bridge Pattern
¡ Bridge is used when we need to decouple an
abstraction from its implementation so that the
two can vary independently. This type of design
pattern comes under structural pattern as this
pattern decouples implementation class and
abstract class by providing a bridge structure
between them.
Need for Bridge Pattern
Bridge Pattern
Filter Pattern
¡ Filter pattern or Criteria pattern is a design
pattern that enables developers to filter a set of
objects using different criteria and chaining them
in a decoupled way through logical operations.
This type of design pattern comes under
structural pattern as this pattern combines
multiple criteria to obtain single criteria.
Decorator Pattern
¡ Decorator pattern allows a user to add new
functionality to an existing object without altering
its structure. This type of design pattern comes
under structural pattern as this pattern acts as a
wrapper to existing class.
Façade Pattern
¡ Facade pattern hides the complexities of the
system and provides an interface to the client
using which the client can access the system. This
type of design pattern comes under structural
pattern as this pattern adds an interface to
existing system to hide its complexities.
Observer Pattern
¡ Observer pattern is used when there is one-to-
many relationship between objects such as if one
object is modified, its dependent objects are to
be notified automatically. Observer pattern falls
under behavioral pattern category.
Delegate Pattern
¡ Business Delegate Pattern is used to decouple
presentation tier and business tier. It is basically
use to reduce communication or remote lookup
functionality to business tier code in presentation
tier code. In business tier we have following
entities.
Thank You
J2EE Design Pattern
J2EE Patterns
¡ Presentation Tier Patterns
¡ Business Tier Patterns
¡ Integration Tier Patterns
Intercepting Filter
¡ intercepts incoming requests and outgoing
responses and applies a filter.
¡ These filters may be added and removed in a
declarative manner
¡ For an incoming request, this is often a Front
Controller
Intercepting Filter
Front Controller
¡ Is a container to hold the common processing
logic that occurs within the presentation tier
¡ A controller handles requests and manages
content retrieval, security, view management,
and navigation, delegating to a Dispatcher
component to dispatch to a View.
¡ The Front Controller pattern creates central
control logic for presentation request handling.
Front controller
Dispatcher View
¡ Combines a controller and dispatcher with views
and helpers to handle client requests and
prepare a dynamic presentation as the response.
¡ A dispatcher is responsible for view management
and navigation and can be encapsulated either
within a controller, a view, or a separate
component.
¡ The Dispatcher View pattern handles the request
and generates a response while managing
limited business processing.
Dispatcher View
Business Tier
Patterns
Business Delegate
¡ Reduces coupling between remote tiers and
provides an entry point for accessing remote
services in the business tier.
¡ A Business Delegate might also cache data as
necessary to improve performance.
¡ A Business Delegate encapsulates a Session
Façade and maintains a one-to-one relationship
with that Session Façade.
¡ You want to hide clients from the complexity of
remote communication with business service
components.
Business Delegate
Session Façade
¡ Provides coarse-grained services to the clients by
hiding the complexities of the business service
interactions.
¡ This is the same as a Façade pattern as
described in GOF Design Patterns, but just
provides an interface to a service instead of
code.
Session Façade
Composite Entity
¡ Implements a Business Object using local entity
beans and POJOs.
¡ When implemented with bean-managed
persistence, a Composite Entity uses Data Access
Objects to facilitate persistence.
¡ to avoid the drawbacks of remote entity beans,
such as network overhead and remote inter-
entity bean relationships.
Composite Entity
Transfer Object
¡ You want clients to access components in other
tiers to retrieve and update data.
¡ You want to reduce remote requests across the
network.
¡ You want to avoid network performance
degradation caused by chattier applications
that have high network traffic.
¡ Reduces network traffic
¡ Simplifies remote object and remote interface
Transfer Object
Integration Tier
Patterns
Data Access Object
¡ Enables loose coupling between the business
and resource tiers.
¡ Data Access Object encapsulates all the data
access logic to create, retrieve, delete, and
update data from a persistent store.
¡ Data Access Object uses Transfer Object to send
and receive data.
Data Access Object
Web Service Broker
¡ Exposes and brokers one or more services in your
application to external clients as a web service
using XML and standard web protocols.
¡ A Web Service Broker can interact with
Application Service and Session Façade.
¡ A Web Service Broker uses one or more Service
Activators to perform asynchronous processing of
a request.
¡ The Web Service Broker pattern exposes and
brokers services using XML and web protocols.
Web Service Broker
Question??

More Related Content

What's hot

Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
Chetan Gole
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
Himanshu
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Satheesh Sukumaran
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
Manish Kumar
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
Asma CHERIF
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
Asraa Batool
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
mewaseem
 
Software architecture design ppt
Software architecture design pptSoftware architecture design ppt
Software architecture design ppt
farazimlak
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
mkruthika
 
Architectural patterns part 1
Architectural patterns part 1Architectural patterns part 1
Architectural patterns part 1
assinha
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
Swathy T
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
ASHOK KUMAR PALAKI
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
Prawesh Shrestha
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
Vaidik Trivedi
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Pankhuree Srivastava
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
Amith Tiwari
 

What's hot (20)

Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Software architecture design ppt
Software architecture design pptSoftware architecture design ppt
Software architecture design ppt
 
Software design patterns ppt
Software design patterns pptSoftware design patterns ppt
Software design patterns ppt
 
Architectural patterns part 1
Architectural patterns part 1Architectural patterns part 1
Architectural patterns part 1
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 

Similar to Gof design pattern

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...
Luis Valencia
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
Jason Townsend, MBA
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
Saurabh Moody
 
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
Simplilearn
 
Design pattern
Design patternDesign pattern
Design pattern
Shreyance Jain
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
SHAHZAIBABBAS13
 
Design Pattern in Software Engineering
Design Pattern in Software Engineering Design Pattern in Software Engineering
Design Pattern in Software Engineering
Bilal Hassan
 
Design patterns
Design patternsDesign patterns
Design patterns
F(x) Data Labs Pvt Ltd
 
Design patterns
Design patternsDesign patterns
Design patterns
Ahmed Elharouny
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
danhaley45372
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
Naga Muruga
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
Gaurav Tyagi
 
Design patterns fast track
Design patterns fast trackDesign patterns fast track
Design patterns fast track
Binu Bhasuran
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
Shahzad
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
anguraju1
 
Gang of Four in Java
Gang of Four in Java Gang of Four in Java
Gang of Four in Java
Mina Tafreshi
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
sukumarraju6
 
Design patterns
Design patternsDesign patterns
Design patterns
Kolade Ibrahim Arowolo
 
Design Pattern with Actionscript
Design Pattern with ActionscriptDesign Pattern with Actionscript
Design Pattern with Actionscript
Daniel Swid
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Satheesh Sukumaran
 

Similar to Gof design pattern (20)

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...
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
 
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
C# Design Patterns | Design Pattern Tutorial For Beginners | C# Programming T...
 
Design pattern
Design patternDesign pattern
Design pattern
 
Software design and Architecture.pptx
Software design and Architecture.pptxSoftware design and Architecture.pptx
Software design and Architecture.pptx
 
Design Pattern in Software Engineering
Design Pattern in Software Engineering Design Pattern in Software Engineering
Design Pattern in Software Engineering
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Design patterns fast track
Design patterns fast trackDesign patterns fast track
Design patterns fast track
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
Gang of Four in Java
Gang of Four in Java Gang of Four in Java
Gang of Four in Java
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design Pattern with Actionscript
Design Pattern with ActionscriptDesign Pattern with Actionscript
Design Pattern with Actionscript
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 

Recently uploaded

78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
Derek Wenmoth
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
Infosec
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
whatchangedhowreflec
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
Kalna College
 
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
Nguyen Thanh Tu Collection
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
MattVassar1
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
BiplabHalder13
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
PriyaKumari928991
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
Friends of African Village Libraries
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
Kalna College
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
chaudharyreet2244
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
Sarojini38
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
MattVassar1
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
yarusun
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 

Recently uploaded (20)

78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
 
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 

Gof design pattern

  • 1. GOF Naveen Kumar K S Adith.Naveen@gmail.com
  • 2. Introduction ¡ Design patterns represent the best practices used by experienced object-oriented software developers. ¡ Design patterns are solutions to general problems that software developers faced during software development ¡ All Design Patterns are got based on trial and error by software engineers.
  • 3. GOF? ¡ Discussed in 1994 ¡ By Four people ¡ Erich Gamma ¡ Richard Helm ¡ Ralph Johnson ¡ John Vlissides ¡ To encourage people to go with reusable coding
  • 4. Types of Design Patterns ¡ There are 23 design patterns which can be classified in three categories: Creational, Structural and Behavioral patterns. ¡ Another design pattern J2EE will be discussed in other course
  • 5. Creational Patterns Abstract Factory Creates an instance of several families of classes Builder Separates object construction from its representation Factory Method Creates an instance of several derived classes Prototype A fully initialized instance to be copied or cloned Singleton A class of which only a single instance can exist
  • 6. Structural Patterns Adapter Match interfaces of different classes Bridge Separates an object’s interface from its implementation Composite A tree structure of simple and composite objects Decorator Add responsibilities to objects dynamically Facade A single class that represents an entire subsystem Flyweight A fine-grained instance used for efficient sharing Proxy An object representing another object
  • 7. Behavioral Patterns Chain of Resp. A way of passing a request between a chain of objects Command Encapsulate a command request as an object Interpreter A way to include language elements in a program Iterator Sequentially access the elements of a collection Mediator Defines simplified communication between classes Memento Capture and restore an object's internal state Observer A way of notifying change to a number of classes State Alter an object's behavior when its state changes Strategy Encapsulates an algorithm inside a class Template Method Defer the exact steps of an algorithm to a subclass Visitor Defines a new operation to a class without change
  • 8. Singleton ¡ Singleton pattern is one of the simplest design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.
  • 9. Factory Pattern ¡ Factory pattern is one of most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. ¡ In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface.
  • 10. Abstract Factory Pattern ¡ Abstract Factory patterns work around a super- factory which creates other factories. This factory is also called as factory of factories. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.
  • 11. Prototype Pattern ¡ Prototype pattern refers to creating duplicate object while keeping performance in mind. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.
  • 12. Bridge Pattern ¡ Bridge is used when we need to decouple an abstraction from its implementation so that the two can vary independently. This type of design pattern comes under structural pattern as this pattern decouples implementation class and abstract class by providing a bridge structure between them.
  • 13. Need for Bridge Pattern
  • 15. Filter Pattern ¡ Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled way through logical operations. This type of design pattern comes under structural pattern as this pattern combines multiple criteria to obtain single criteria.
  • 16. Decorator Pattern ¡ Decorator pattern allows a user to add new functionality to an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class.
  • 17. Façade Pattern ¡ Facade pattern hides the complexities of the system and provides an interface to the client using which the client can access the system. This type of design pattern comes under structural pattern as this pattern adds an interface to existing system to hide its complexities.
  • 18. Observer Pattern ¡ Observer pattern is used when there is one-to- many relationship between objects such as if one object is modified, its dependent objects are to be notified automatically. Observer pattern falls under behavioral pattern category.
  • 19. Delegate Pattern ¡ Business Delegate Pattern is used to decouple presentation tier and business tier. It is basically use to reduce communication or remote lookup functionality to business tier code in presentation tier code. In business tier we have following entities.
  • 22. J2EE Patterns ¡ Presentation Tier Patterns ¡ Business Tier Patterns ¡ Integration Tier Patterns
  • 23. Intercepting Filter ¡ intercepts incoming requests and outgoing responses and applies a filter. ¡ These filters may be added and removed in a declarative manner ¡ For an incoming request, this is often a Front Controller
  • 25. Front Controller ¡ Is a container to hold the common processing logic that occurs within the presentation tier ¡ A controller handles requests and manages content retrieval, security, view management, and navigation, delegating to a Dispatcher component to dispatch to a View. ¡ The Front Controller pattern creates central control logic for presentation request handling.
  • 27. Dispatcher View ¡ Combines a controller and dispatcher with views and helpers to handle client requests and prepare a dynamic presentation as the response. ¡ A dispatcher is responsible for view management and navigation and can be encapsulated either within a controller, a view, or a separate component. ¡ The Dispatcher View pattern handles the request and generates a response while managing limited business processing.
  • 30. Business Delegate ¡ Reduces coupling between remote tiers and provides an entry point for accessing remote services in the business tier. ¡ A Business Delegate might also cache data as necessary to improve performance. ¡ A Business Delegate encapsulates a Session Façade and maintains a one-to-one relationship with that Session Façade. ¡ You want to hide clients from the complexity of remote communication with business service components.
  • 32. Session Façade ¡ Provides coarse-grained services to the clients by hiding the complexities of the business service interactions. ¡ This is the same as a Façade pattern as described in GOF Design Patterns, but just provides an interface to a service instead of code.
  • 34. Composite Entity ¡ Implements a Business Object using local entity beans and POJOs. ¡ When implemented with bean-managed persistence, a Composite Entity uses Data Access Objects to facilitate persistence. ¡ to avoid the drawbacks of remote entity beans, such as network overhead and remote inter- entity bean relationships.
  • 36. Transfer Object ¡ You want clients to access components in other tiers to retrieve and update data. ¡ You want to reduce remote requests across the network. ¡ You want to avoid network performance degradation caused by chattier applications that have high network traffic. ¡ Reduces network traffic ¡ Simplifies remote object and remote interface
  • 39. Data Access Object ¡ Enables loose coupling between the business and resource tiers. ¡ Data Access Object encapsulates all the data access logic to create, retrieve, delete, and update data from a persistent store. ¡ Data Access Object uses Transfer Object to send and receive data.
  • 41. Web Service Broker ¡ Exposes and brokers one or more services in your application to external clients as a web service using XML and standard web protocols. ¡ A Web Service Broker can interact with Application Service and Session Façade. ¡ A Web Service Broker uses one or more Service Activators to perform asynchronous processing of a request. ¡ The Web Service Broker pattern exposes and brokers services using XML and web protocols.
  翻译: