Preface

Who This Book Is For

This book is for everyone who has at least one year of programming experience and is intended to deliver the basic constructs of a programming language. You do not need any prior experience with Kotlin or Java. Some basic familiarity with Android is helpful for the practical part of this book, but it is not required.

This book also assumes you’re familiar with some basic terms surrounding software development. The glossary can help if you’re unfamiliar with a certain term that is used without explanation.

In short, you fulfill the prerequisites to follow this book if any of the following are true.

This is by no means an exhaustive list. Most important, you should be eager to learn Kotlin and then put it into practice by building two Android apps.

How This Book Is Structured

This book first covers Kotlin in detail to teach you all essential language features, and then moves on to using Kotlin in the context of Android. Although Kotlin is introduced comprehensively, this is by no means a language reference but rather a practical book focusing on gaining hands-on experience.

Part I, Learning Kotlin, introduces the Kotlin programming language.

Part II, Kotlin on Android, lets you put what you learned in Part I into practice by building two Android apps with Kotlin.

How to Follow This Book

Unless you already have a strong understanding of Kotlin, you should definitely go through Part I before attempting to build the apps in Part II. You may skip Chapter 5, which covers interoperability with Java, but it is useful to understand what happens under the hood and how Kotlin compiles to Java bytecode. Also, even if you already know Kotlin, you may want to read Chapter 6 if you’re not familiar with coroutines yet.

In Part II, you may skip Chapter 9 covering domain-specific languages (DSLs) because it is not a prerequisite for another chapter. However, DSLs are a popular feature of Kotlin that can improve your code, and it’s a good way to recap interesting language features from Part I. Finally, if you’re not interested in migrating an existing app to Kotlin or adopting Kotlin at your company, you may skip Chapter 10.

For all resources, updates, and news related to this book, please visit its companion website at

https://kotlinandroidbook.com

The site hosts runnable and editable versions of all listings in this book for you to work with, lists all related resources and GitHub repositories, and presents any updates and corrections for the book. In short, it’s your companion while reading this book and applying it to your work. The main GitHub repository for this book can also be found directly at github.com/petersommerhoff/kotlin-for-android-app-development.

Book Conventions

This book follows several conventions that are used consistently throughout the book.

Register your copy of Kotlin for Android App Development on the InformIT site for convenient access to updates and/or corrections as they become available. To start the registration process, go to informit.com/register and log in or create an account. Enter the product ISBN (9780134854199) and click Submit. Look on the Registered Products tab for an Access Bonus Content link next to this product, and follow that link to access any available bonus materials. If you would like to be notified of exclusive offers on new editions and updates, please check the box to receive email from us.