Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Kotlin

You're reading from   Mastering Kotlin Learn advanced Kotlin programming techniques to build apps for Android, iOS, and the web

Arrow left icon
Product type Paperback
Published in Oct 2019
Publisher Packt
ISBN-13 9781838555726
Length 434 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nate Ebel Nate Ebel
Author Profile Icon Nate Ebel
Nate Ebel
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. Section 1: Kotlin – A Modern Solution to Application Development FREE CHAPTER
2. A New Challenger Approaches 3. Programmers' Multi-Tool – Flexible, Expressive, and Concise 4. Section 2: Putting the Pieces Together – Modeling Data, Managing State, and Application Architecture
5. Understanding Programming Paradigms in Kotlin 6. First-Class Functions 7. Modeling Real-World Data 8. Section 3: Play Nice – Integrating Kotlin With Existing Code
9. Interoperability as a Design Goal 10. Crossing Over – Working across Java and Kotlin 11. Controlling the Story 12. Baby Steps – Integration through Testing 13. Section 4: Go Beyond – Exploring Advanced and Experimental Language Features
14. Practical Concurrency 15. Building Your Own Tools – Domain-Specific Languages (DSLs) 16. Fully Functional – Embracing Functional Programming 17. Section 5: The Wide World of Kotlin – Using Kotlin across the Entire Development Stack
18. Kotlin on Android 19. Kotlin and Web Development 20. Introducing Multiplatform Kotlin 21. Taming the Monolith with Microservices 22. Practical Design Patterns 23. Assessments 24. Other Books You May Enjoy

What this book covers

Chapter 1, A New Challenger Approaches, provides context for what Kotlin is, how it came about, and why it is gaining popularity. It provides a high-level overview of where the book is headed and lays the foundation for the following chapters' focus on language features, patterns, best practices, and the ability to target multiple domains and platforms.

Chapter 2, Programmers' Multi-Tool – Flexible, Expressive, and Concise, dives into the basic details of the Kotlin language. It highlights some of the most popular language features, such as first-class functions, non-null types, and multiple programming paradigms. For each of these features, you will begin to understand how to take advantage of the feature, and what impact it can have on the overall application architecture.

Chapter 3, Understanding Programming Paradigms in Kotlin, provides an overview of different programming paradigms that Kotlin supports, including imperative, functional, and reactive programming. The chapter describes these paradigms, and details how Kotlin supports, but does not enforce, all three.

Chapter 4, First-Class Functions, introduces you to Kotlin's support for first-class functions. It describes, in detail, how Kotlin functions are flexible, concise, and powerful. You will learn how to leverage Kotlin features such as default parameter values, infix functions, extension functions, and higher-order functions.

Chapter 5, Modeling Real-World Data, exposes you to the fundamentals of inheritance and composition in Kotlin. This chapter details the differences between enums, data classes, sealed classes, and type classes, and aims to illustrate when and why you should choose one over another.

Chapter 6, Interoperability as a Design Goal, provides background into the design goals behind interoperability in Kotlin, why interoperability is so important to Kotlin, and teaches you how to quickly add Kotlin to an existing project.

Chapter 7, Crossing Over – Working across Java and Kotlin, explores the practical ramifications of adding Kotlin to an existing Java code base. It details how to work with both the language within the same project, and about some of the challenges associated with adding a second language to a project.

Chapter 8, Controlling the Story, details how Kotlin code can be modified to provide a better interoperability experience with Java. It highlights how to apply annotations, and how to design Kotlin APIs to make working with Kotlin from Java more idiomatic and enjoyable.

Chapter 9, Baby Steps – Integration through Testing, explores how to integrate Kotlin into an existing project through testing, and demonstrates how the testing experience can be improved using Kotlin and Kotlin-specific features such as DSLs.

Chapter 10, Practical Concurrency, introduces you to advanced threading concepts. It does so by starting from basic threads and working up to Kotlin coroutines as an idiomatic solution for writing asynchronous, non-blocking code.

Chapter 11, Building Your Own Tools – Domain-Specific Languages (DSLs), introduces the concept of custom Domain-Specific Languages (DSLs) written in Kotlin and how they can be used as a powerful tool to solve a variety of challenges.

Chapter 12, Fully Functional – Embracing Functional Programming, provides a deep dive into achieving functional programming with Kotlin. It focuses on how to effectively use the Kotlin Standard Library to write more functional code, and it also takes a look at the Arrow library for writing truly functional code with Kotlin.

Chapter 13, Kotlin on Android, explores the use of Kotlin for Android development. It details why Kotlin is so popular for Android development, how it makes a developer's life easier, and what Kotlin tooling is available for building Android applications.

Chapter 14, Kotlin and Web Development, introduces the use of Kotlin for frontend web development. This chapter will help you to understand where Kotlin can be used for web development, how to get started by building a simple project, and what the limitations of Kotlin for frontend web development are.

Chapter 15, Introducing Multiplatform Kotlin, explores the use of Kotlin for multiplatform projects. It describes how the Kotlin multiplatform approach is different from other cross-platform solutions, how to package and write code that targets multiple platforms, and where the current limitations exist. In this chapter, you will learn how to set up a multiplatform project that targets iOS, Android, and the web using common Kotlin code.

Chapter 16, Taming the Monolith with Microservices, introduces the use of Kotlin for backend services that can be used within a microservices architecture. It will describe how and where Kotlin can be used to write backend services and how those can interoperate with other services.

Chapter 17, Practical Design Patterns, revisits familiar Java design patterns and demonstrates how to reimagine those patterns using Kotlin features that have been explored throughout this book.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime