Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design Pattern (Creational Design (Abstract factory (In stead of using the…
Design Pattern
Creational Design
Abstract factory
In stead of using the new
key word, you can instantiate an class by creating an Abstract Factory object with a create
method.
-
-
-
Prototype
Instead of using the new
key word, just copy the original object with prototype
Prototype design pattern is used when the Object creation is a costly affair and requires a lot of time and resources and you have a similar object already existing.
Prototype pattern provides a mechanism to copy the original object to a new object and then modify it according to our needs. Prototype design pattern uses java cloning to copy the object.
-
Structural design
Bridge
Decouple an abstractions from its implementation, so that two can vary independently.
-
Adapter
Allow otherwise incompatible classes to work together by converting the interface of one class into an interface expected by the clients.
Composite
Compose objects into tree structures and lets clients treat individual objects and compositions uniformly
-
Facade
Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.
The Façade pattern provides an interface which shields clients from complex functionality in one or more subsystems. It is a simple pattern that may seem trivial but it is powerful and extremely useful. It is often present in systems that are built around a multi-layer architecture.
The intent of the Façade is to provide a high-level interface (properties and methods) that makes a subsystem or toolkit easy to use for the client.