Make object creation more flexible with the Factory Method and Abstract Factory design patterns! Today, we'll look at code that could benefit from these patterns, we'll apply a traditional version of them from the classic Gang of Four Design Patterns book, and then we'll see how we can modernize them with Kotlin's language features.
✨ New to Kotlin? Start your journey here: https://typealias.com/start/
... or pick up the new Leanpub Edition for offline access and more! https://book.typealias.com/
🚀 Get the inside scoop on everything I'm working on - join my new email newsletter!
Sign up here: https://newsletter.typealias.com/
📺 Watch Episode #2 of the TypeAlias Show Livestream:
https://www.youtube.com/live/fcul4vIbqiI
📚 Chapters
00:00 Introduction
00:22 Example Code
01:48 Refactoring to a Factory Method Pattern
06:37 Refactoring to an Abstract Factory Pattern
12:14 Modernizing the Patterns with Kotlin
18:28 Wrap-up