Kotlin Multiplatform Android/iOS: Coding and culture

Kotlin Multiplatform Android/iOS: Connecting coding and culture
How does Kotlin Multiplatform affect your development culture?

Kotlin Multiplatform

Kotlin Multiplatform (KMP) is a way of writing cross-platform code in Kotlin. It is not about compiling all code for all platforms, and it doesn’t limit you to a subset of common APIs. KMP provides mechanisms for writing platform-specific implementations for a common API.

Culture

Culture is a big focus for many companies, including Brightec. We want to be in and build meaningful places to work. We want to be collaborative and make things better together.

However, we also like to feel part of a community. Often the community we choose to belong to is related to our platform of choice, or to the technology we use.

Introducing a cross/multi-platform technology can challenge our existing cultures and even identity.

Multiplatform Shift

Shifting to a multiplatform technology means a developer now belongs to both teams. They have to support one another if the new technology is to succeed.

We must consider the needs of our colleagues first, sometimes over our own.

KMP naturally falls more within the Android camp. This is because it uses the same programming language. Often the Android developers within a team are asked to write the KMP shared code. Your Android developers need to make the first steps towards the common goals of the whole team.

Put iOS first

It might be difficult to stomach for some, but you need to put your iOS colleague’s needs first.

KMP is a Kotlin technology, so it will more naturally feel familiar and function better on a JVM platform. If you hit a fork, and you've got to choose between a better iOS or Android implementation, choose iOS. The likelihood is that the pain for Android developers will be less than the pain would be for iOS developers.

KMP has written a specific page on interoperability. Use this to help you make life easier for your iOS teammates. Interop-Guide

Wherever possible, provide iOS (and Android) specific extension functions. Try to make integration for all platforms as intuitive as possible.

Dependency

Consider the new dependency you are creating upon one developer to another. Without premeditating this, you might find a tension builds between those developers.

Raise this concern early, talk about ways to ease it.

Consider how you might schedule the work. How will you communicate the changes in the latest build?

My experience

I have worked on two projects, which utilise KMP. We recently retrospected KMP in isolation of the projects. The reception from iOS developers far exceeded my expectations. Due, at least in part, to our consideration and iOS first approach.

We also found that it helped our developers communicate better across teams. We used KMP for writing our API integration code. We felt that because we all shared the API integration, we all shared a common language of the subject matter.

Conclusion

I have found that when given some consideration, using a cross/multi-platform technology can "improve" your culture. It can increase communication. It can shorten the distance between the platform camps. It can encourage a greater team vibe.

Have an interest in Kotlin?

Check out Alistair's other musings on all things Kotlin:

- Kotlin Multiplatform Android/iOS: Testing

- Kotlin Multiplatform iOS: Certificate Pinning

- Kotlin Multiplatform Android/iOS: Project Structure Strategies

- Or if you're completely new to Kotlin, have a look at our overview on it, Kotlin is here. So what?


Looking for something else?

Search over 400 blog posts from our team

Want to hear more?

Subscribe to our monthly digest of blogs to stay in the loop and come with us on our journey to make things better!