Kotlin Standard Library Cookbook: Over 90 recipes to help you learn the latest features of Kotlin and write better code using the Standard Library
暫譯: Kotlin 標準庫食譜:超過 90 個食譜幫助你學習 Kotlin 的最新功能並使用標準庫編寫更好的程式碼

Samuel Urbanowicz

  • 出版商: Packt Publishing
  • 出版日期: 2018-07-27
  • 售價: $1,380
  • 貴賓價: 9.5$1,311
  • 語言: 英文
  • 頁數: 242
  • 裝訂: Paperback
  • ISBN: 1788837665
  • ISBN-13: 9781788837668
  • 相關分類: JVM 語言
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Build optimized applications in Kotlin by learning how to smartly implement standard libraries.

Key Features

  • Get the most out of the Kotlin library to develop high-quality portable applications
  • Explore the powerful support for data processing and I/O operations
  • Discover ways to enhance your Android application development

Book Description

Given the verbosity of Java, developers have turned to Kotlin for effective software development. The Kotlin standard library provides vital tools that make day-to-day Kotlin programming easier. This library features the core attributes of the language, such as algorithmic problems, design patterns, data processing, and working with files and data streams.

The recipes in this book offer coding solutions that can be readily executed. The book covers various topics related to data processing, I/O operations, and collections transformation. We'll walk through effective design patterns in Kotlin and you'll understand how coroutines add new features to JavaScript.

As you make your way through the chapters, you'll learn how to implement clean, reusable functions and scalable interfaces containing default implementations. In the concluding chapters, we'll provide recipes on functional programming concepts, such as lambdas, monads, functors, and Kotlin scoping functions.

By the end of the book, you'll be able to address a range of problems that Kotlin developers face by implementing easy-to-follow solutions.

What you will learn

  • Work with ranges, progressions, and sequences in use cases
  • Add new functionalities to current classes with Kotlin extensions
  • Understand elements such as lambdas, closures, and monads
  • Build a REST API consumer with Retrofit and a coroutine adapter
  • Discover useful tips and solutions for making your Android projects
  • Explore the benefits of standard library features

Who this book is for

This book is for software developers who are familiar with Kotlin's basics and want to discover more advanced features and concepts, especially those provided by the Kotlin standard library. It's also ideal for experienced software developers who are familiar with the functional programming paradigm and other programming languages who want to switch to Kotlin. It will also help Java developers switch to Kotlin and integrate it into existing Java Virtual Machine (JVM) projects.

Table of Contents

  1. Charm of ranges, progressions and sequences
  2. Designing expressive functions and adjustable interfaces
  3. Shaping code with Kotlin functional programming features
  4. Powerful data processing
  5. Tasteful design patterns based on Kotlin built-in concepts
  6. Friendly I/O operations
  7. Making Asynchronous programming great again
  8. Unit tests with JUnit and Kotlin Mockito
  9. Miscellaneous

商品描述(中文翻譯)

**使用 Kotlin 建立優化的應用程式,學習如何智慧地實作標準函式庫。**

#### 主要特點

- 充分利用 Kotlin 函式庫來開發高品質的可攜式應用程式
- 探索對資料處理和 I/O 操作的強大支援
- 發現增強 Android 應用程式開發的方法

#### 書籍描述

由於 Java 的冗長性,開發人員轉向 Kotlin 以進行有效的軟體開發。Kotlin 標準函式庫提供了重要的工具,使日常的 Kotlin 程式設計變得更容易。這個函式庫具備語言的核心特性,例如演算法問題、設計模式、資料處理以及檔案和資料流的操作。

本書中的食譜提供了可以立即執行的程式碼解決方案。書中涵蓋了與資料處理、I/O 操作和集合轉換相關的各種主題。我們將深入探討 Kotlin 中的有效設計模式,並了解協程如何為 JavaScript 增添新功能。

在逐章學習的過程中,您將學會如何實作乾淨、可重用的函式和包含預設實作的可擴展介面。在最後幾章中,我們將提供有關函數式程式設計概念的食譜,例如 lambda、monad、functor 和 Kotlin 範圍函式。

在書籍結束時,您將能夠通過實作易於遵循的解決方案來解決 Kotlin 開發人員面臨的一系列問題。

#### 您將學到什麼

- 在使用案例中處理範圍、進程和序列
- 使用 Kotlin 擴展為現有類別添加新功能
- 理解 lambda、閉包和 monad 等元素
- 使用 Retrofit 和協程適配器構建 REST API 客戶端
- 發現有用的提示和解決方案以改善您的 Android 專案
- 探索標準函式庫功能的好處

#### 本書適合誰

本書適合熟悉 Kotlin 基礎的軟體開發人員,想要探索更高級的功能和概念,特別是 Kotlin 標準函式庫提供的功能。它也非常適合熟悉函數式程式設計範式和其他程式語言的經驗豐富的軟體開發人員,想要轉向 Kotlin。它還將幫助 Java 開發人員轉向 Kotlin,並將其整合到現有的 Java 虛擬機 (JVM) 專案中。

#### 目錄

1. 範圍、進程和序列的魅力
2. 設計表達式函式和可調介面
3. 使用 Kotlin 函數式程式設計特性塑造程式碼
4. 強大的資料處理
5. 基於 Kotlin 內建概念的優雅設計模式
6. 友好的 I/O 操作
7. 讓非同步程式設計再次偉大
8. 使用 JUnit 和 Kotlin Mockito 的單元測試
9. 其他雜項