From the course: Complete Guide to Java Design Patterns: Creational, Behavioral, and Structural
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
What are creational design patterns? - Java Tutorial
From the course: Complete Guide to Java Design Patterns: Creational, Behavioral, and Structural
What are creational design patterns?
When we first start writing programs, it's quite common to put a lot of the logic in the class. But as applications grow, this becomes less practical. Creational design patterns are a set of patterns that help you to manage this complexity. This is the first of the three types of design pattern that I'm going to be looking at in this course. As an example, say that I start creating an application to keep track of invoices for a store. In the beginning, I might just create a class called invoice, and I'd keep all my logic in that class. Then over time, I would add new classes that use my invoice class. So in lots of places in the code, I would have the words "new invoice." Then one day I might need to change how invoice objects are created. For example, I might want to change the constructor, or I might want to have different configurations for different types of invoice. This is tricky because now all my code is tightly coupled to this invoice class and how new invoice objects are…
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Understand abstract factories3m 7s
-
(Locked)
Recognize where to use abstract factories3m 53s
-
(Locked)
Create factories for families of objects6m 4s
-
(Locked)
Implement the complete Abstract Factory pattern6m 1s
-
(Locked)
Challenge: The Abstract Factory pattern1m 36s
-
(Locked)
Solution: The Abstract Factory pattern2m 34s
-
(Locked)
-
-
(Locked)
Understand the Chain of Responsibility pattern1m 23s
-
(Locked)
Recognize where to use the Chain of Responsibility pattern2m 35s
-
(Locked)
Implement a successor chain4m 49s
-
(Locked)
Challenge: The Chain of Responsibility pattern1m 48s
-
(Locked)
Solution: The Chain of Responsibility pattern3m 59s
-
(Locked)