Book Image

Simplifying Application Development with Kotlin Multiplatform Mobile

By : Róbert Nagy
Book Image

Simplifying Application Development with Kotlin Multiplatform Mobile

By: Róbert Nagy

Overview of this book

Sharing code between platforms can help developers gain a competitive edge, and Kotlin Multiplatform Mobile (KMM) offers a sensible way to do it. KMM helps mobile teams share code between Android and iOS in a flexible way, leaving room for native development. The book begins by helping you to gain a clear understanding of the Kotlin Multiplatform approach, how it works, and how it is different from cross-platform technologies, such as React Native and Flutter, and code sharing options, such as C++. You'll then see how your team can use this software development kit (SDK) to build native applications more effectively by learning timeless concepts and working through practical examples. As you advance, you'll get to grips with the core concepts, understand why UI sharing fails, and get hands-on with developing a small KMM application. Finally, you'll discover expert tips and best practices, along with production- and adoption-related questions, that will help you take the next step in your project and career. By the end of this Kotlin book, you'll have gained a solid understanding of the capabilities of KMM and be able to share code between Android and iOS flexibly.
Table of Contents (15 chapters)
1
Section 1 - Getting Started with Multiplatform Mobile Development Using Kotlin
5
Section 2 - Code Sharing between Android and iOS
10
Section 3 - Supercharging Yourself for the Next Steps

Getting to know our project – Dogify

Our project is called Dogify. In this app, we'll be showing different breeds of dogs with images, with the possibility of favoriting them. We'll get our data from a dog API (https://dog.ceo/dog-api/) and then cache it in our local database:

Figure 4.1 – Dogify on iOS and Android

We'd also like to have the possibility of seeing our favorite breeds, which will be stored locally, in our database.

Before we get into the details of our project, let's first understand the objectives that we want our project to meet. Our app/project was designed/selected with the following objectives:

  • It is fairly simple to understand and develop.
  • It covers most of the common KMM use cases.
  • It covers production-related questions.
  • It covers the most-used KMM tools.

Since creating a fairly simple project that covers production-related questions as well is quite a challenge,...