Mindmap
Design Pattern
Inhalt der Mindmap
Design Pattern
- http://www.journaldev.com/1827/java-design-patterns-example-tutorial#facade-pattern
Creational Pattern
- Factory
- Factory design pattern is used when we have a super class with multiple sub-classes and based on input, we need to return one of the sub-class. This pattern take out the responsibility of instantiation of a class from client program to the factory class
- NumberFormat.getInstance()
- Factory design pattern is used when we have a super class with multiple sub-classes and based on input, we need to return one of the sub-class. This pattern take out the responsibility of instantiation of a class from client program to the factory class
- Abstract Factory
- get rid of if-else block and have a factory class for each sub-class and then an Abstract Factory class that will return the sub-class based on the input factory class
- Singleton
- Singleton pattern restricts the instantiation of a class and ensures that only one instance of the class exists in the java virtual machine. The singleton class must provide a global access point to get the instance of the class.
- Java Synchronization
- http://www.journaldev.com/1061/java-synchronization-and-thread-safety-tutorial-with-examples
- Volatile keyword
- Synchronize keyword
- Atomic Wrapper class
- Locks
- safe collection classes
- Java Synchronization
- Singleton pattern restricts the instantiation of a class and ensures that only one instance of the class exists in the java virtual machine. The singleton class must provide a global access point to get the instance of the class.
- Builder
- build the object step-by-step and provide a method that will actually return the final Object.
- StringBuilder.append()
- build the object step-by-step and provide a method that will actually return the final Object.
- Prototype
- Prototype 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. So this pattern provides a mechanism to copy the original object to a new object and then modify it according to our needs
- Factory
Structural Pattern
- Adapter
- its used so that two unrelated interfaces can work together
- Composite
- When we need to create a structure in a way that the objects in the structure has to be treated the same way, we can apply composite design pattern.
- Facade
- Provide a unified interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level interface that makes the subsystem easier to use.
- Decorator
- used to modify the functionality of an object at runtime
- Adapter
Behavior Pattern
- Observer
- Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically
- Chain of Responsibility Pattern
- Chain of responsibility pattern is used to achieve lose coupling in software design where a request from client is passed to a chain of objects to process them. Then the object in the chain will decide themselves who will be processing the request and whether the request is required to be sent to the next object in the chain or not.
- Template
- defines the steps to execute an algorithm and it can provide default implementation that might be common for all or some of the subclasses.
- Observer
Informationen
- Beschreibung
- 1 Technical Issues Mindmap am Design Pattern, erstellt von longlh3009 am 22/04/2015.
- Erstellt von
- longlh3009
- Aufrufe
- 1
- Verlauf
-
- Erstellt von Lee Long · 22 Apr 2015
- Kopiert von longlh3009 · 22 Apr 2015
- Bewertung