Hi!
I’ve got a real problem when I try to explain what Kotlin MPP is:
- When talking about Android and iOS people immediately realise what that means.
- When talking about Kotlin/JS they understand what it means after a while.
When talking about a multi-platform project that goes over the client - server boundary, most people get lost.
Let me show it through an example:
I told an android developer of my company, that she does not have to worry about the communication. No Volley, no Retrofit, forget it all.
Just use the objects defined in commonMain
of the common data model project. Everything will work because the communication can be automatically handled once you have the data model. Don’t worry about URL’s, generated APIs, etc. You don’t need anything like that.
She looked at me like I’m an alien. What do you mean?
As a business level developer you don’t need URLs and you shouldn’t to code any APIs. You say MyObject().create()
or MyObject.read(12)
. That’s it.
Oh, and when your college develops the browser frontend, he uses the exact same syntax. Actually, we can put a few classes into common code and use them both for the mobile and browser projects.
In Kotlin, not writing (and not generating) communication code at all is reality.
Sharing components between mobile and browser is reality.
Our projects use the exact same communication and validation everywhere (mobile, server, browser).
I feel that Kotlin MPP is communicated wrong.
Mobile clients and JS are important on their own. But as I see they are just part of a bigger picture.
So far I’ve never seen the integration communicated properly. You tend to think an application as separated parts: mobile, server, browser.
Why? These are parts of one application. They should not be more different than necessary.
When I talk about this with developers personally, I can explain how this works. And the feedback is usually very positive. They realise the power of having one language.
They realise that having one common code used by all software components is good.
When I try to write this down, I’m stuck. I’ve literally spend days with this and haven’t been able to do it well. (As this example shows. )