![]() ![]() Input validation / rules engine: Consider implementing a syntax highlighter, you wouldn't want to do that on the backend. Logging / monitoring: Expose a single logging / monitoring API which can be shared across platforms Data model operations on local copy of data: For some use cases you can't just send everything to the server all the time, instead you want a local representation which is periodically synced with the server Some use cases I think about off the top of my head: : I noticed that they even have some kind of built-in HTTP client abstraction. And even if you create something resonable today, one of the platforms might introduce new features which destroys your abstraction. For something like audio/video playback or BLE, I'm guessing that there might be enough differences between Android and iOS that an abstraction that fit both is really unwieldy. ![]() Adding a new REST route or change data validation would be done only once and be in sync on all platforms.īut I'm guessing that you have to pretty knowledgeable about the underlying platforms to know how (and if it's even possible) to create a good abstraction above the platform code. You use platform specific frameworks for making the actual HTTP requests, but can write all higher level business logic in Kotlin and expose that. ![]() However, I wonder if/when/to what extent the abstractions become leaky.įor me it makes perfect sense to e.g create an internal API client using this. Kotlin Multiplatform looks really cool and limiting code sharing to non-UI code makes much more sense to me. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |