30초 요약
In a 2017 GOTO talk, Dmitry Jemerov introduces experimental Kotlin multiplatform projects, common code and platform implementations. The tooling and native limitations described reflect that period.
- 1JavaScriptTyped external declarations connect Kotlin code to JavaScript APIs.
- 2Shared logicShare business logic while retaining platform-specific code.
- 3Expected and actualCommon declarations can be fulfilled by each target.
- 4Platform APIsThe mechanism can include constructors and top-level functions.
- 5Build artifactsThe talk’s Gradle setup reflects the 2017 toolchain.
- 6Demo and testsA demo renders shared data on server and browser and runs common tests.
- 7NativeNative support was still preliminary at the time.
핵심 정리
- Typed external declarations connect Kotlin code to JavaScript APIs.
- Share business logic while retaining platform-specific code.
- Common declarations can be fulfilled by each target.
- The mechanism can include constructors and top-level functions.
- The talk’s Gradle setup reflects the 2017 toolchain.
- A demo renders shared data on server and browser and runs common tests.
- Native support was still preliminary at the time.
챕터별로 다듬은 전문 읽기
Kotlin and JavaScript
Language goals and browser interoperability.
In this GOTO Berlin 2017 talk, JetBrains engineer Dmitry Jemerov presents the then-experimental Kotlin 1.2 multiplatform approach. Tooling, platform support and APIs described in the talk are historical and may have changed.
Jemerov introduces Kotlin as a statically typed language designed to interoperate with existing ecosystems. He describes the JVM, JavaScript and native targets available or under development at the time.
For the browser, Kotlin source can compile to JavaScript and use external declarations for typed access to JavaScript libraries. He also demonstrates a dynamic type, which gives up compile-time checks for those accesses.
Jemerov describes React bindings and development tooling available at the time, including build integration, debugging and reloading. The exact setup is specific to the 2017 toolchain.
Multiplatform structure
Common code and platform implementations.
The central idea is to share platform-independent business logic while retaining platform-specific modules. He does not propose hiding every difference between platforms behind a single abstraction.
Common code declares expected functionality, and each target supplies an actual implementation. His example uses different date facilities on the JVM and in JavaScript.
The expect/actual mechanism can cover more than interface methods, including constructors and top-level functions. Jemerov explains how it can connect existing platform types to common declarations.
He walks through the Gradle configuration and common and platform-specific library artifacts used in the early implementation. These build details are not a current setup guide.
A shared-code demonstration
Rendering, serialization and tests.
In a demo, the server renders initial messages and the browser renders later messages using shared model, serialization and HTML-rendering code. He runs common tests against both JavaScript and JVM targets.
Native and questions
The early native toolchain and limitations.
Jemerov describes the early LLVM-based Kotlin/Native toolchain and iOS support, including access to platform libraries. He calls the memory-management design preliminary and emphasizes that the native integration was still evolving.
During questions, he says common tests can check that platform implementations satisfy shared expectations, while some behavior may intentionally differ by platform. He also describes interop limitations as they stood in 2017.
같은 채널의 다른 글
39:12EN
22:33EN
34:11EN
28:15EN
46:36EN
28:23EN