From the course: Kotlin Multiplatform Development
The problem Kotlin Multiplatform solves - Kotlin Tutorial
From the course: Kotlin Multiplatform Development
The problem Kotlin Multiplatform solves
- [Instructor] Why are we discussing Kotlin Multiplatform? Cost complexity and trade-offs make it the best solution for many apps. Let me explain. Native apps have traditionally provided the best experience for users. What is a native app? A native app uses the best language and user interface libraries to run natively on your system. By using methods supported by your operating system vendor, your app is more likely to look like an app that belongs on that platform and to work in a way that is more intuitive to users of that operating system. Writing a traditional native app across iOS, Android, MacOs, Windows, Linux, and web requires a large team of highly paid developers communicating closely with one another. It is a very expensive and it's challenging to write one app that looks beautiful and runs nicely across all of these devices. Typically, one developer lacks the specific knowledge of languages and frameworks and the time to port one app to all of these different systems. Also, each platform ends up with unique bugs based upon the different development teams working on each platforms app. Enter hybrid frameworks. These were intended to solve the difficulty in knowing all of these systems, and to produce a native app across all of them. Most hybrid frameworks substitute calls in one language, like JavaScript or Dart, with user interface calls in the native language. While hybrid frameworks seem convenient and they would seem to solve the difficulty of producing an app across a wide spectrum of platforms, they have several key downsides. Debugging is challenging since multiple languages are involved, and the programmer may not understand the native code. The languages used tend to have poor performance, like JavaScript, or may be less known outside of hyper development, such as Dart. Apps which require careful handling of device hardware, like camera, Bluetooth, and others, may be more challenging to write and to maintain. Kotlin Multiplatform handles most of the downsides of hybrid frameworks admirably. What is Kotlin Multiplatform? In 2017, the Kotlin language team at JetBrains added support to allow running software written in Kotlin across a wide variety of different hardware and software types. They added support to allow writing apps for the Java Virtual Machine, or JVM, native on the LLVM, and web. However, each platform can still benefit from custom per-platform code in some instances. So they added a mechanism to the core Kotlin language to allow running a different function or method depending upon the underlying platform. That announcement was very popular and exciting, but it was still difficult to write software because you then had to write slightly different code to accommodate all the differences between platforms. This all changed with the development of Kotlin Multiplatform libraries. The complexity and cost of developing high-quality apps for many platforms has made native development a challenge. Meanwhile, hybrid frameworks often fall short. Kotlin Multiplatform changed the game by offering a method to share logic while still embracing the unique strengths of each platform.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
The problem Kotlin Multiplatform solves3m 50s
-
(Locked)
Comparison with alternatives3m 18s
-
(Locked)
Supported platforms and performance3m
-
(Locked)
Just what the KDoctor ordered3m 18s
-
(Locked)
Android studio for KMP9m 41s
-
(Locked)
Xcode for KMP4m 12s
-
(Locked)
Crafting a template with the Kotlin Multiplatform wizard1m 25s
-
-
-
-
-
-
-
-