Skip to Main Content
Kotlin Design Patterns and Best Practices - Third Edition
book

Kotlin Design Patterns and Best Practices - Third Edition

by Alexey Soshin
April 2024
Intermediate to advanced content levelIntermediate to advanced
474 pages
9h 39m
English
Packt Publishing
Content preview from Kotlin Design Patterns and Best Practices - Third Edition

4

Getting Familiar with Behavioral Patterns

This chapter talks about behavioral patterns using Kotlin. Behavioral patterns deal with how things interact with each other.

We will learn how an object can change how it acts depending on the situation, how objects can talk to each other without knowing all the details, and how to go through complicated setups easily. We will also touch on functional programming in Kotlin, which makes it easier to use some of these patterns.

In this chapter, we’ll explore the following topics:

  • Strategy
  • Iterator
  • State
  • Command
  • Chain of Responsibility
  • Interpreter
  • Mediator
  • Memento
  • Visitor
  • Template Method
  • Observer

By the end of this chapter, you’ll be able to structure your code in a highly decoupled and flexible manner. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kotlin Design Patterns and Best Practices - Second Edition

Kotlin Design Patterns and Best Practices - Second Edition

Alexey Soshin
Programming Kotlin

Programming Kotlin

Venkat Subramaniam
Kotlin in Action

Kotlin in Action

Svetlana Isakova, Dmitry Jemerov

Publisher Resources

ISBN: 9781805127765Supplemental Content