Book description
Programmers don't just use Kotlin, they love it. Even Google has adopted it as a first-class language for Android development. With Kotlin, you can intermix imperative, functional, and object-oriented styles of programming and benefit from the approach that's most suitable for the problem at hand. Learn to use the many features of this highly concise, fluent, elegant, and expressive statically typed language with easy-to-understand examples. Learn to write easy-to-maintain, high-performing JVM and Android applications, create DSLs, program asynchrony, and much more.
Kotlin is a highly concise, elegant, fluent, and expressive statically typed multi-paradigm language. It is one of the few languages that compiles down to both Java bytecode and JavaScript. You can use it to build server-side, front-end, and Android applications. With Kotlin, you need less code to accomplish your tasks, while keeping the code type-safe and less prone to error. If you want to learn the essentials of Kotlin, from the fundamentals to more advanced concepts, you've picked the right book.
Fire up your favorite IDE and practice hundreds of examples and exercises to sharpen your Kotlin skills. Learn to build standalone small programs to run as scripts, create type safe code, and then carry that knowledge forward to create fully object-oriented and functional style code that's easier to extend. Learn how to program with elegance but without compromising efficiency or performance, and how to use metaprogramming to build highly expressive code and create internal DSLs that exploit the fluency of the language. Explore coroutines, program asynchrony, run automated tests, and intermix Kotlin with Java in your enterprise applications.
This book will help you master one of the few languages that you can use for the entire full stack - from the server to mobile devices - to create performant, concise, and easy to maintain applications.
What You Need:
To try out the examples in the book you'll need a computer with Kotlin SDK, JDK, and a text editor or a Kotlin IDE installed in it.
Publisher resources
Table of contents
- Foreword
- Acknowledgments
- Introduction
- 1. Hello Kotlin
- Part I. Scripting with Kotlin
- Part II. Object-Oriented Kotlin
- Part III. Functional Kotlin
- Part IV. Elegant and Efficient Kotlin
- Part V. Programming Asynchronous Applications
-
Part VI. Interop and Testing
- 17. Intermixing Java and Kotlin
-
18. Unit Testing with Kotlin
- The Code Under Test
- Getting the Project Files
- Starting with a Canary Test
- Writing Empirical Tests
- Writing Data-Driven Tests
- Mocking Out Dependencies
- Testing Top-Level Functions
- Testing Coroutines and Asynchronous Calls
- Integrating with the Service
- Viewing the Code Coverage
- Taking the App for a Drive
- Wrapping Up
- 19. Programming Spring Applications with Kotlin
- 20. Writing Android Applications with Kotlin
- A1. Transpiling to JavaScript
- A2. Kotlin/Native
- A3. Kotlin to WebAssembly
- Bibliography
Product information
- Title: Programming Kotlin
- Author(s):
- Release date: September 2019
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781680506358
You might also like
video
Advanced Kotlin Programming
Designed for developers who already have a basic understanding of Kotlin, this video course examines some …
video
Introduction to Kotlin Programming
Kotlin 1.0 was released in February 2016, and since that time it’s been embraced by developers …
book
Kotlin in Action
Kotlin in Action guides experienced Java developers from the language basics of Kotlin all the way …
book
Functional Kotlin
Learn how to apply Functional Programming with Kotlin to real-life projects with popular libraries like Arrow. …