I'm new android developer and i complete all the fundamentals and foundation of the android development with Kotlin, Now i look at build app like Instagram or Facebook or very complex app with complex features to improve my experience, So i want advice from the senior developer, which the best choice for app like instagram, Jetpack Compose or XML
I search on the YouTube and Google, but there is no one answer my question
I worked with Compose and XML for the same kind of projects. The big difference is Compose is more fluent after getting to know the syntax better.
I recommend working with Jetpack Compose because no matter the size of your application, it can be much more readable and clean. I will write the main points for both of them down below.
For XML :
- Managing complex codes with XML usually requires more effort and may require additional libraries (LiveData, ViewModel, etc.).
- Rendering is slow (not that slow, but as a user, you can see the difference).
- Works fine with older versions of Android devices. If you want to reach a crowded user base, ensure that you research Android version usage.
- You will separate the UI definitions from business logic. For me, it is hard to manage.
For Jetpack Compose :
- You write the ui codes as Kotlin files within the business logic so they are easy to read and manage.
- New tech, so not very good with older devices.
- If you don't know Jetpack Compose, it is not a good idea to start learning with a big project. First, it can seem too much mess, but after getting used to it, it will be so much faster than XML.
- Google supports Jetpack Compose and is continuously improving the technology. For new projects, it is highly recommended to go with Jetpack Compose.