Hey there, I just want some guidance from you, I a...
# android
p
Hey there, I just want some guidance from you, I am doing Android Development and I am bit confused should I skill up in Compose or KMM for Ios and Android development, I know that I have to use jetpack compose for both but in KMM need have hands on swift also but is that same in Compose also? Please let me know which will be better for both IOS and android?
j
Jetpack Compose is a way to design UI for android apps. It's a very good idea to learn developing with this over XML as it's much easier to use once you've learned it. I believe SwiftUI is what's used to develop UI for iOS. KMM is just a way to share common logic, like models, networking, repositories, caching, etc between iOS and Android. You will still create the UI for each platform individually as far as I understand it, although I haven't used KMM myself. I did read something about someone using Compose for iOS recently but that it was still experimental. If that works well enough eventually that could save a lot of time as well.
p
I am am Android developer from past 1 year and using XML for ui and Java, Kotlin for logic and all,.... And I saw one post on LinkedIn and that clicked me if compose can do for both then why KMM? ....
j
Jetpack Compose is just used for designing the UI. KMM is what enables you to work in a single project for both platforms.
p
Totally agreed that KMM used shared logic for both plateform. https://www.linkedin.com/posts/seabdulbasit_ios-android-compose-ugcPost-7031153641923186688-BBa4?utm_source=share&utm_medium=member_android this is the of that post, guy used compose for cross platform
j
Yes. He's using Compose instead of SwiftUI. He's likely using KMM as well.
p
Any idea how it can be achieved?
j
No I haven't looked into the specifics, but I remember reading that it shouldn't yet be used for production code as it's still in experimental stages.
I would wait with doing Compose for iOS if I were you. You could try to create a KMM project and see if you can get that to work while using SwiftUI for iOS and Compose for Android.
👍 1
l
You can use the https://github.com/JetBrains/compose-jb library to build Android, iOS, desktop, and web UI with one codebase. Right now, iOS support is experimental, but should be fine for toy projects.
There's discussion in #compose-ios that can help you decide whether to use it now or wait.
If your goal right now is learning I'd highly recommend using Compose, and focusing on Android first, then moving on to iOS support. You'll learn the basics with Android, then when getting iOS to work, you can learn more of the internals.
p
@Landry Norris Thank you so much for your help and guidance, I'll like to ask one more question, Like I am doing Android app development using Java, kotlin and XML, so if I have develop only Android app then which is will be more efficient, time saving, performance wise, compose or normal xml ?
l
I’d focus on Compose, since it’s newer. Google has a tendency to remove things when there’s a replacement. I don’t think this will happen soon for XML, but you never know.
p
Right 😂, Google is Google, by the way can I connect with you for any further information or help if I needed? If you don't mind?
l
Sure. I’m no expert, though.
For Compose help, #compose is generally pretty helpful.
p
Just for my reference, What you do? Like Android developer, Kotlin spring boot developer?
l
I’m a KMM developer (Android/iOS). I tend to work on lower level code, so I’m not as up-to-date on the higher level abstractions.
p
This KMM and jetpack compose is new to me, I have to skill up anyway, but you are already working on it .... And I have just started.... But I have one experience for Android developer using Java,kotlin and XML
Year*