mmozoqa.blogg.se

Kotlin android ios
Kotlin android ios





The solution would be to find a version of the wrapper and the library that are compatible with each other (maybe by trail and error). This discrepancy in versions could lead to unexpected errors. Additionally, the project uses an external library which internally uses the same Kotlin wrapper library but with a different version. The project uses the Kotlin wrapper library for React.JS with the 17.0.1 version. Having a project like the one below could potentially not work correctly. From my experience I can state that some versions of the wrappers are not compatible with each other. Some Kotlin/JS libraries (Mostly related to React.JS) are dependent on the official Kotlin wrapper libraries. Hiccups / problems encountered Kotlin/JS wrapper dependency

kotlin android ios

In my opinion tests should also be considered in the overall metric, because if the platforms did not share code, both platforms would probably contain production and tests code which would be approximately the same. However, the shared module almost doubles in lines of code because it contains the most tests. The React module does not contain any tests so its lines of code did not change. Bar chart of the distribution with test code based on the platform Pie chart of the percentage distribution with test code based on platform There exist more libraries for mobile and additionally the two platforms which are more similar to each other than Android and React. If the project was comprised of two mobile platforms (Android and iOS) the code reuse would be higher because Kotlin Multiplatform for mobile community is much bigger. The Android and the React platforms are significantly different from each other which makes the code re-usage harder. Most notably in this project the networking, settings persistence and maybe the database could have been implemented fully in the shared module.įor projects with more business logic than the one for this MSc the shared module could potentially have more code compared to the client platforms. Some of the implementations could have been avoided by using Kotlin Multiplatform libraries which work on both platforms. However, additionally these modules also contain a lot of implementations for the data layer. The platform modules contain a lot of code for the view and presentation layers. Pie chart of the percentage distribution based on platform Bar chart of the distribution based on the platform

kotlin android ios

Most of the code resides in the client platforms, i.e. Code like generated libraries (Dukat) and tests were not taken into account. The code distribution will be counted by Kotlin source code lines meaning that empty lines and comments are not counted. Part 5 The Summary (This part) Project code distribution The thesis is based on my Fuller Stack project which consists of an Android App, a Kotlin React.JS app and a Ktor server. This article series contains parts of my thesis about Kotlin Multiplatform.







Kotlin android ios