Chapter 10: Summary and Your Next Steps

We'll close this book by summarizing all the things that were discussed throughout and providing guidance for the next steps in your KMP learning journey.

In this chapter, I'd like to provide an overview of what we've learned in this book to emphasize the central ideas that were covered. We will then provide a quick glimpse into the future of KMP apps, which will be combined with some personal opinions, so please take them with a grain of salt. Finally, I will provide the necessary resources for you to continue your KMP journey.

This chapter will be a short one and will consist of the following topics:

  • Recapitulating what you have learned
  • Managing your KMP expectations
  • Learning resources

Recapitulating what you have learned

We started this book by reasoning about what market need Kotlin Multiplatform tries to meet. We explored native applications, why people tend to turn to technologies such as React Native and Flutter, and why these technologies may not turn out to be the best solutions, generally speaking.

Furthermore, we discussed how to differentiate multiplatform from cross-platform notions, what a multiplatform technology tries to achieve, and how Kotlin Multiplatform leverages its tech stack to provide a sensible multiplatform solution.

After reading the first two chapters, you are expected to have a broader understanding of which technology is more suitable for a specific use case, project, or client need.

In Chapter 3, Introducing Kotlin for Swift Developers, we made a slight detour to ensure that iOS developers don't feel alienated by Kotlin and that everyone has the necessary knowledge to start learning about Kotlin Multiplatform.

Then, we set up our first Kotlin Multiplatform Mobile (KMM) project by writing the shared code for it, as well as the consumer Android and iOS apps, all while exploring the issues that you could come across when consuming from iOS and how to overcome them.

After that, we covered the best practices and tips in the realm of KMM and started exploring questions related to production environments, such as tooling, package management, team structure, adoption tips, and others. This has led us to this chapter, to see what we've learned and how to continue learning and exploring.

Managing your KMP expectations

This section will consist of some thoughts on the roadmap of KMP and some questions regarding its future.

Will it change the mobile development landscape?

In some sense, yes. Think of KMP as a new tool in the native app development palette that can offer good code sharing capabilities. It's already taking some "market share" from pure native and cross-platform technologies (such as React Native and Flutter). While the ratio will probably change (I'm personally bullish on KMP becoming the preferred choice), I can't see why one of these three approaches would disappear – they can all serve a specific use case.

Kotlin/Native's direct interoperability with Swift

Many people are excited about this since it's on the JetBrains teams' roadmap. I think that with the new concurrency model and direct interoperability with Swift, the usability and experience with the iOS will improve a lot, though it will probably never be perfect since Kotlin and Swift, in the end, are similar but still different in some aspects.

Tooling and documentation have improved a lot lately, probably due to the introduction of KMM and there being a dedicated KMM team at Touchlab. Still, those who are knowledgeable of infrastructure who are skilled in KMP, as well as the relevant Android and iOS build tools, will probably be needed.

Shared UI

The Compose UI toolkit is interesting and has gained a lot of traction, with more people trying to make it a toolkit that can be used on iOS as well, making it possible to write two apps with one piece of source code in KMP. This is already possible with the legacy view systems if you make the necessary abstractions on platform specifics.

For me, this is where things become cross-platform and unmaintainable as it can be hard to keep up with two frameworks.

Nevertheless, it's an interesting topic because, with KMP, you get the flexibility of sharing as much code as you want. So, you could start by sharing your business logic, then trying to share the UI-related things; if that doesn't work out, you can always go back. With other technologies, this is a different story.

Next, I'll show you where you learn more about KMP and the best ways to deepen your knowledge, at least from my experience.

Learning resources

Starting in 2019, trying to experiment with KMP was one of the best learning experiences I could've asked for. Early on, experimental stuff teaches you how best to be resourceful and to learn at a deeper level – not just by reading documentation and learning how to something, but what's behind it and how it works. It can be hard and uncomfortable at the start, but I highly recommend it for any developer.

First and foremost, I'd like to thank the huge KMP community, who helped me gain the knowledge I needed to write this book.

Although not indexed by Google, the kotlinlang Slack channel is a great place to start searching for any Kotlin-related issue and to start a conversation on different topics. Lately, it has been the starting point for me when searching for something, especially for experimental things. You can join the Slack channel at https://surveys.jetbrains.com/s3/kotlin-slack-sign-up; I highly recommend the #multiplatform and #kotlin-native channels for starters.

John O'Reilly's KMP example projects are incredible and always up to date. Whenever I was struggling with the compatibility of the different library versions, these libraries were the go-to for me, and I have the feeling that is the same for a lot of people in the community. Checking out the https://github.com/joreilly/PeopleInSpace repository is a good way to become familiar with his work.

Touchlab's work is also amazing in this space: https://github.com/touchlab. The IceRock team has also contributed with great libraries: https://github.com/icerockdev.

While it's impossible to list all the great contributors, you can find a list of the available KMP libraries at the following two links:

Although KMM-specific documentation was a bit lacked, it has picked up speed. JetBrains has a pretty good KMM guide at https://kotlinlang.org/docs/kmm-overview.html.

Last but not least, the Kotlin by JetBrains (https://www.youtube.com/c/Kotlin/) and JetBrainsTV (https://www.youtube.com/user/JetBrainsTV) YouTube channels provide a huge collection of great Kotlin talks.

Summary

In this chapter, we provided an overview of the main topics that were covered in the book, tried to reason about the future direction of KMP, and discussed some of the best ways to learn more about this technology.

I hope you've enjoyed this book and are eager to try out KMP – the community needs you! Please note that while I've tried to do my best, I have probably made some mistakes along the way; if you've noticed anything you don't agree with or require more clarity on any specific topic, don't hesitate to contact me.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.255.189