-
Factory
Pattern
-
Abstract
Factory Pattern
-
Singleton
Pattern
-
Adapter
Pattern
-
Bridge
Pattern
-
Composite
Pattern
-
Proxy
Pattern
-
Chain
of Responsibility Pattern
-
Command
Pattern
-
Observer
Pattern
-
State
Pattern
-
Strategy
Pattern
The
kind of discussion may be like the following:
Bridge
Pattern/Handle-Body :
-
Motivation
- Why is this necessary to separate the interface from its
implementation
-
How
does the separation of interface and its implementation solve the
issue of extending, modifying and reusing abstractions and
implementation separately
Applicability
-
To
avoid permanent binding between an abstraction and its
implementation. This might be the case when we want to switch the
implementation at run time
-
both
the abstractions and their implementations should be extensible by
subclassing. this pattern lets us combine the different abstractions
and implementations and extend them independently.
-
if
we change the implementation, the client code of the abstraction
wont be affected, in the sense the client code will not be
recompiled
-
the
implementation of the abstraction will be completely hidden from the
client code
Implementation
-
How
an interface is attached with its implementation through Interface
constructor. the correct implementation can be passed as a parameter
in the concrete abstraction constructor
-
How
a parameterized Factory implementation can be placed in between the
Interface and its implementation to solve this issue
-
How
changes in the implementation code won't affect the client code
vis-a-vis compilation
-
Example
Somenath MukhopadhyaySomenath Mukhopadhyay
|