diff --git a/abstract-factory/README.md b/abstract-factory/README.md index c049401fc..1c1966739 100644 --- a/abstract-factory/README.md +++ b/abstract-factory/README.md @@ -141,6 +141,9 @@ Use the Abstract Factory pattern when * Dependency injection in java hides the service class dependencies that can lead to runtime errors that would have been caught at compile time. +## Tutorial +* [Abstract Factory Method Tutorial](https://www.journaldev.com/1418/abstract-factory-design-pattern-in-java) + ## Real world examples * [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html) diff --git a/bridge/README.md b/bridge/README.md index a37c35174..a53e6143f 100644 --- a/bridge/README.md +++ b/bridge/README.md @@ -189,6 +189,9 @@ Use the Bridge pattern when * you have a proliferation of classes. Such a class hierarchy indicates the need for splitting an object into two parts. Rumbaugh uses the term "nested generalizations" to refer to such class hierarchies * you want to share an implementation among multiple objects (perhaps using reference counting), and this fact should be hidden from the client. A simple example is Coplien's String class, in which multiple objects can share the same string representation. +## Tutorial +* [Bridge Pattern Tutorial](https://www.journaldev.com/1491/bridge-design-pattern-java) + ## Credits * [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612) diff --git a/decorator/README.md b/decorator/README.md index 37cfd88df..1b9d8a511 100644 --- a/decorator/README.md +++ b/decorator/README.md @@ -117,6 +117,9 @@ Use Decorator * For responsibilities that can be withdrawn * When extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing +## Tutorial +* [Decorator Pattern Tutorial](https://www.journaldev.com/1540/decorator-design-pattern-in-java-example) + ## Real world examples * [java.io.InputStream](http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html), [java.io.OutputStream](http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html), [java.io.Reader](http://docs.oracle.com/javase/8/docs/api/java/io/Reader.html) and [java.io.Writer](http://docs.oracle.com/javase/8/docs/api/java/io/Writer.html) diff --git a/strategy/README.md b/strategy/README.md index 697b6cc88..74828cafc 100644 --- a/strategy/README.md +++ b/strategy/README.md @@ -29,6 +29,9 @@ Use the Strategy pattern when * an algorithm uses data that clients shouldn't know about. Use the Strategy pattern to avoid exposing complex, algorithm-specific data structures * a class defines many behaviors, and these appear as multiple conditional statements in its operations. Instead of many conditionals, move related conditional branches into their own Strategy class +## Tutorial +* [Strategy Pattern Tutorial](https://www.journaldev.com/1754/strategy-design-pattern-in-java-example-tutorial) + ## Credits * [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612) diff --git a/template-method/README.md b/template-method/README.md index 65381d0ce..def168a8d 100644 --- a/template-method/README.md +++ b/template-method/README.md @@ -25,6 +25,9 @@ The Template Method pattern should be used * when common behavior among subclasses should be factored and localized in a common class to avoid code duplication. This is good example of "refactoring to generalize" as described by Opdyke and Johnson. You first identify the differences in the existing code and then separate the differences into new operations. Finally, you replace the differing code with a template method that calls one of these new operations * to control subclasses extensions. You can define a template method that calls "hook" operations at specific points, thereby permitting extensions only at those points +## Tutorial +* [Template-method Pattern Tutorial](https://www.journaldev.com/1763/template-method-design-pattern-in-java) + ## Credits * [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)