Kotlin Design Patterns and Best Practices: Build scalable applications using traditional, reactive, and concurrent design patterns in Kotlin, 2/e (Paperback)

Soshin, Alexey

  • 出版商: Packt Publishing
  • 出版日期: 2022-01-21
  • 售價: $1,680
  • 貴賓價: 9.5$1,596
  • 語言: 英文
  • 頁數: 356
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1801815720
  • ISBN-13: 9781801815727
  • 相關分類: JVM 語言Design Pattern
  • 立即出貨 (庫存=1)




Improve the scalability and maintainability of your applications by implementing a variety of design patterns using Kotlin


Key Features:

  • Understand traditional and modern design patterns to improve the design of your application
  • Combine the benefits of object-oriented, functional, reactive, and concurrent programming
  • Choose the best microservices architecture and frameworks for your web application


Book Description:

Design patterns are well-known solutions to common architectural problems as they allow you to solve many problems efficiently and create a shared vocabulary between developers. This book shows you how easy it can be to implement traditional design patterns in the modern multi-paradigm Kotlin programming language, and takes you through the new patterns and paradigms that have emerged.

This second edition is updated to cover the changes introduced from Kotlin 1.2 up to 1.5 and focuses more on the idiomatic usage of coroutines, which have become a stable language feature. You'll begin by learning about the practical aspects of smarter coding in Kotlin, and will understand basic Kotlin syntax and the impact of design patterns on your code.

The book also provides an in-depth explanation of the classical design patterns, such as Creational, Structural, and Behavioral families, before moving on to functional programming. You'll go through reactive and concurrent patterns, and finally, get to grips with coroutines and structured concurrency to write performant, extensible, and maintainable code.

By the end of this Kotlin book, you'll have explored the latest trends in architecture and design patterns for microservices, as well as understanding the tradeoffs when choosing between different architectures.


What You Will Learn:

  • Implement all the classical design patterns using the Kotlin programming language
  • Apply reactive and concurrent design patterns to make your application more scalable
  • Discover best practices in Kotlin and explore its new features
  • Understand the key principles of functional programming and learn how they apply to Kotlin
  • Find out how to write idiomatic Kotlin code and learn which patterns to avoid
  • Harness the power of Kotlin to design concurrent and reliable systems with ease
  • Create an effective microservice with Kotlin and the Ktor framework


Who this book is for:

This book is for developers looking to apply design patterns they've learned from other languages in Kotlin to build reliable, scalable, and maintainable applications. Prior programming knowledge is necessary to get started with this book. Experience in Java or design patterns is helpful, but not mandatory.


透過使用 Kotlin 實現各種設計模式,提升應用程式的可擴展性和可維護性。

- 瞭解傳統和現代設計模式,改進應用程式的設計
- 結合物件導向、函數式、反應式和並行編程的優勢
- 為您的 Web 應用程式選擇最佳的微服務架構和框架

設計模式是解決常見架構問題的廣為人知的解決方案,它們可以讓您高效地解決許多問題,並在開發人員之間建立共享的詞彙。本書將向您展示如何在現代多範式 Kotlin 程式語言中輕鬆實現傳統設計模式,並介紹新興的模式和範式。

第二版更新了 Kotlin 1.2 至 1.5 引入的變化,並更加關注協程的慣用用法,協程已成為穩定的語言特性。您將首先學習在 Kotlin 中更聰明地編碼的實用方面,並瞭解基本的 Kotlin 語法以及設計模式對代碼的影響。



- 使用 Kotlin 程式語言實現所有傳統設計模式
- 應用反應式和並行設計模式,使應用程式更具擴展性
- 探索 Kotlin 的最佳實踐,並瞭解其新功能
- 瞭解函數式編程的關鍵原則,以及它們如何應用於 Kotlin
- 瞭解如何編寫慣用的 Kotlin 代碼,並學習避免使用哪些模式
- 利用 Kotlin 的優勢輕鬆設計並發和可靠的系統
- 使用 Kotlin 和 Ktor 框架創建有效的微服務

本書適合開發人員,他們希望將從其他語言學到的設計模式應用於 Kotlin,以構建可靠、可擴展和可維護的應用程式。開始閱讀本書需要具備一定的程式編寫知識,有 Java 或設計模式的經驗會有所幫助,但不是必需的。