Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design Patterns - Coggle Diagram
Design Patterns
Prototype
Used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects.
avoid subclasses of an object creator in the client application, like the factory method pattern does.
avoid the inherent cost of creating a new object in the standard way when it is prohibitively expensive for a given application.
Abstract Factory
Intent
-
Provides an interface for creating families of related or dependent objects without specifying their concrete classes
Result
-
the client code does not know and is not burdened by the actual concrete type of the object that was just created
-
Observer
Intent
An object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes
Result
used for implementing distributed event handling systems, in "event driven" software
-
Most modern programming-languages comprise built-in "event" constructs implementing the observer-pattern components
Command
Intent
a behavioral design pattern used to encapsulate all information needed to perform an action at a later time.
Result
This information includes the method name, the object that owns the method and values for the method parameters.
Command patterns include four objects listed as: command, receiver, invoker and client.
-
Visitor
Intent
the visitor design pattern is a way of separating an algorithm from an object structure on which it operates
Result
the visitor allows adding new virtual functions to a family of classes, without modifying the classes
a visitor class is created that implements all of the appropriate specializations of the virtual function
Builder
-
Result
allows adding new virtual functions to a family of classes, without modifying the classes.
-
-