Java Design Patterns: Behavioral Part 2

Java Design Patterns: Behavioral Part 2

56mIntermediate2020-12-10

Authors

Bethan Palmer

Bethan Palmer

Developer

Course details

Behavioral design patterns can help you take your Java code to the next level. Join instructor Bethan Palmer as she walks you through the following design patterns, with challenges to check your understanding of each: Observer, State, Strategy, Template Method, and Visitor. Learn about the Observer pattern, which ensures an object's dependencies are notified when it changes state. Discover the State pattern, which allows an object to alter its behavior when its internal state changes, and can be used to avoid large and repetitive switch statements. Explore how the Strategy pattern allows you to create a family of interchangeable algorithms, how the Template Method pattern enables you to redefine the steps of an algorithm without changing its structure, and more. Along the way, Bethan demonstrates how to implement each design pattern in real-world situations.

Skills covered

JavaOracleProgramming LanguagesSoftware DevelopmentOne-Off

Concepts

Introduction

  • Improve code quality with behavioral design patterns
  • What you should know

The Observer Pattern

  • Understanding the Observer pattern
  • Implementing an observer
  • Implementing an observable
  • Challenge - The Observer pattern
  • Solution - The Observer pattern

The State Pattern

  • Understanding the State pattern
  • Avoiding large switch statements
  • Allowing an object to change its behavior
  • Challenge - The State pattern
  • Solution - The State pattern

The Strategy Pattern

  • Understanding the Strategy pattern
  • Implementing the Strategy pattern
  • Improving the Strategy pattern with Java 8 features
  • Challenge - The Strategy pattern
  • Solution - The Strategy pattern

The Template Method Pattern

  • Understanding the Template Method pattern
  • Implementing the Template Method pattern
  • Challenge - The Template Method pattern
  • Solution - The Template Method pattern

The Visitor Pattern

  • Understanding the Visitor pattern
  • Creating a visitor
  • Implementing the full Visitor pattern
  • Challenge - The Visitor pattern
  • Solution - The Visitor pattern

Conclusion

  • Next steps
40,000 Toman