Has there been any progress on any community effor...
# compose
l
Has there been any progress on any community efforts to port Compose to K/N? I remember seeing that the Jetpack team won't necessarily make the port, so it would have to be a community effort. Some of the projects that I've seen seem promising, but stopped at some point.
c
#compose-desktop and #compose-web exist. I have a feeling it'll come to K/N in some time. I know Square and jake wharton have been doing some of that according to a twitter thread a few weeks back.
l
It would be interesting to see compose coming to iOS. It would theoretically allow for KMM apps to be fully shared. UI seems to be the biggest unsolved issue with KMM.
c
I would argue against that a bit. I think the biggest factor that separates KMM vs other multi platform frameworks is the fact that it leaves the UI layer to be developed in whatever the native ui framework is.
๐Ÿ‘ 2
๐Ÿ‘๐Ÿผ 1
i.e. I think this chart has pulled more people to KMM because of the fact that UI isn't shared. I would still love to share UI though for some of my pet projects, but if flutter has shown me anything... it's that users can feel when something isn't native.
l
I would agree with that, but it seems some companies prefer Flutter because of the fact that the UI is "easier", which affects how many apps use KMM. It would be cool to be able to use it being possible to share UI to convince them to use KMM, then show how a native UI is better.
I found that explaining why a native UI is a better end-user experience than a shared UI (especially when bringing desktop into the mix) in a meeting leads to "but Flutter can also do a shared UI".
๐Ÿ‘ 1
v
Shared UI doesn't necessary imply non-native UI, does it? I think, the true beauty of Compose is in that it can wrap anything that can be represented as some tree of some updatable nodes. Mr. Wharton's work on Mosaic proves that. So iOS Compose could be a wrapper on native UIView or even SwiftUI maybe. KMM Compose UI library could represent some common ground between two or more native UI frameworks. The potential is there at least
๐Ÿ’ฏ 1
๐Ÿ‘๐Ÿผ 1
๐Ÿ‘ 5
l
I thought I saw an open-source project try something like that, but I can't find it anymore. I found it really interesting.
The difficult part with any shared UI is the differences between platforms. Android has the system back button, so I find it rare to see any sort of back button in apps, since a back button in an Android app is wasted space unless you can do something else with it. Same thing with how Navigation in Android tends to use drawers, while navigation on iOS tends to use bottom navigation.
v
Afaik back button in toolbar is the standard in Android nowadays but I agree with your point. Anyway, the design to the apps that are both on Android and iOS commonly comes from single design document and it's very rarely in my experience that two separate design docs are provided for different platforms. Some minor differences are and will be but majority of design is still the same to the point where very basic widgets are used. So what I mean is that it is more often EditText vs UITextField but not Android Screen A vs iOS Screen A. And minor differences could be much more efficiently represented in common code using
if (Android)
or
if (iOS)
in these cases
l
Makes sense. It would be great if a library existed that did this.
t
I'm working on a Compose wrapper for GTK, so it's not out of the realm of possibility for Compose to wrap native iOS UI elements. Swift interop is probably the biggest thing lacking.
Not using K/N though, I'm starting with JDK 17's foreign interop support.
l
Is your project open source or does it have a GitHub or something?
t
it's a giant mess on my laptop
currently in the "generating glib/gobject bindings" phase
but i did get a PoC going with a blank gtk window
l
I think every developer has a couple of giant messes on their laptop.
๐Ÿ˜… 2
t
I don't agree with the "Native UI" idea. From a dotnet background, I completely know how and why Xamarin sucks. You can use Xamarin Native to write your business logic once and build native UI separately, or you can use Xamarin.Forms to share the UI code, which can also wrap anything that can be represented as some tree. It is stable and production-ready right now, but it's not pixel-perfect across the platform, and requires the devs to have both the knowledge of the dotnet and Android and iOS, so why not just writing a completely native app when I have the knowledge of the Android and iOS which will have a better UX? So when Microsoft announcing maui, which is the successor of Xamarin.Forms, most of the complaint from the community is "Platform renderer is a bad design, don't use it, just use Skia to render the controls". Do we really want to follow the road of the Xamarin?
k
@Landry Norris this is the project you most likely saw: https://github.com/cl3m/multiplatform-compose