Creating Elegant, Expressive, and Performant JVM and Android Applications
Venkat Subramaniam

#Kotlin
#JVM
#Android
#SDK
#JDK
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.
Table of Contents
1. Hello Kotlin
Part I — Scripting with Kotlin
2. Kotlin Essentials for the Java Eyes
3. Working with Functions
4. External Iteration and Argument Matching
5. Using Collections
6. Type Safety to Save the Day
Part II — Object-Oriented Kotlin
7. Objects and Classes
8. Class Hierarchies and Inheritance
9. Extension Through Delegation
Part III — Functional Kotlin
10. Functional Programming with Lambdas
11. Internal Iteration and Lazy Evaluation
Part IV — Elegant and Efficient Kotlin
12. Fluency in Kotlin
13. Creating Internal DSLs
14. Programming Recursion and Memoization
Part V — Programming Asynchronous Applications
15. Exploring Coroutines
16. Asynchronous Programming
Part VI — Interop and Testing
17. Intermixing Java and Kotlin
18. Unit Testing with Kotlin
19. Programming Spring Applications with Kotlin
20. Writing Android Applications with Kotlin
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.
Who Is This Book For?
This book is for programmers, lead developers, architects, and technical managers. The book assumes familiarity with the basics of programming and also assumes moderate knowledge of Java and the JDK. The book doesn’t assume any knowledge of Kotlin. If you’re an Android programmer, this book lays the good foundation you’ll need to program those devices with Kotlin, though this book doesn’t focus exclusively on the Android platform.
If you’re new to Kotlin, this book will help you get started and quickly move forward with the application of the language for your projects. If you’re already using Kotlin, you may use this book to gain deeper understanding of some of the advanced features of the language.
You may also use this book to train your developers to get proficient with Kotlin, to use it to create highly fluent and expressive code, and to solve intricate problems.
What’s in This Book
Kotlin is a multi-paradigm programming language.
You may write plain scripts in Kotlin, write object-oriented code, functional style code, program asynchronously, & more. To provide reasonable coverage to this broad spectrum of topics, this book is divided into multiple parts. Part I focuses on scripting with Kotlin. Part II is all about object-oriented programming. In Part III, you’ll learn to use functional-style capabilities.
Part IV will tie what you’ve learned so far together to make your code more fluent and teach you how to create internal domain-specific languages (DSLs).
In Part V, you’ll learn about the new coroutines and programming asynchronously. The final Part VI deals with Java interop, testing, using Kotlin with Spring, and programming Android applications with Kotlin.
Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., and an instructional professor at the University of Houston. He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly invited speaker at several international conferences. He's the (co)author of multiple books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer.









