2

Working with Creational Patterns

In this chapter, we will explore how classic creational patterns are implemented using Kotlin. These patterns focus on when and how you create objects. For each design pattern, we will discuss its purpose and how Kotlin facilitates its implementation.

The topics covered in this chapter include the following patterns:

  • Singleton
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype

By mastering these design patterns, you will improve your ability to manage objects, adapt to changes, and write maintainable code.

Before we proceed, it’s important to acknowledge that not all of the design patterns described in this and subsequent chapters may be useful to you. However, it is still valuable to be thorough and cover ...

Get Kotlin Design Patterns and Best Practices - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.