Design Patterns were first documented in 1994 with the famous title "Design Patterns - Elements of Reusable Object-Oriented Software (GoF)". Every time we iterate over a Java collection, we use several design patterns, for example:
1. Abstract Class - Woolf (PLoPD4)
2. Factory Method (GoF)
3. Template Method (GoF)
4. Iterator (GoF)
And when we iterate using Java 8 Streams and Lambdas, we use:
5. Command Pattern (GoF)
Every toString(), equals() and hashCode() method is essentially:
6. Object Recursion (PLoPD4)
and when we use a ThreadPoolExecutor, we are likely to use:
7. Facade (GoF)
8. Mediator (GoF)
9. Observer (GoF)
In this revamp of our flagship patterns course, we have extended the curriculum to 30 patterns, including quite a few never before presented in any Java course:
Abstract Class, Builder, Essence, Memento, Proxy, Flyweight, Strategy, Null Object, Iterator, Factory Method, Template Method, Composite, Visitor, Acyclic Visitor, Object Recursion, Default Visitor, Adapter, Command, Decorator, Extension Object, Singleton, State, Facade, Prototype, Abstract Factory, Interpreter, Mediator, Observer, Bridge and Chain of Responsibility
We also show how the Java Virtual Machine interacts with the code that we produce with patterns, such as: inlining, escape analysis, garbage collection and other HotSpot optimizations.
Most patterns have exercises that you can do to cement your knowledge.
We use Java 10 throughout the course.
Heinz Kabutz is the author of “The Java Specialists’ Newsletter”, a publication enjoyed by tens of thousands of Java experts in over 145 countries. His book “Dynamic Proxies (in German)” was #1 Bestseller on Amazon.de in Fachbücher für Informatik for about five minutes until Amazon fixed their algorithm. Thanks to a supportive mother, he has now sold 5 copies.
Heinz’s Java Specialists’ newsletter is filled with amusing anecdotes of life on the Island of Crete. He is a popular speaker at all the best Java conferences around the world, and also at some of the worst. He teaches Java courses in classrooms around the world, where his prime objective is to make absolutely sure that none of his students fall asleep. He is not always successful.