- What is Kotlin multiplatform?
- It is an approach to sharing data models and business logics across multiple application targets using a common Kotlin code base.
- How does Kotlin multiplatform differ from other cross-platform solutions, such as React Native of Flutter?
- Kotlin multiplatform aims to share models and business logic, but not UIs.
- What are the four compilation targets supported in Kotlin multiplatform projects?
- JVM
- Android
- iOS
- JavaScript
- What is the significance of the expect keyword?
- Indicates to the compiler that there will be a function/class/interface/and suchlike available in a target platform's source code that matches the signature defined in common Kotlin code. It can be thought of as similar to how a concrete class is an implementation of an interface or abstract class.
- What is the significance of the actual keyword?
- It indicates to the compiler that a function/class/interface/and so on is the platform-specific implementation of some element defined in the common code base.
- What are two potential benefits of Kotlin multiplatform?
- Sharing of data models
- Sharing of business logic
- Greater thought into application architecture
- What are two limitations of Kotlin multiplatform?
- Tooling is not great on all platforms, native in particular.
- It requires all developers to know some Kotlin to be able to work on the entire code base.
- It doesn't include UI development, which may be seen as a good or bad thing depending on your teams' needs.