Devesh Rx Blog

What is Jetpack Compose for Android ?

Learning Compose changed my life as an Android App Developer. let's explore what is jetpack compose & what's the advantage.

What is Jetpack Compose for Android ?

i been learning jetpack compose for android from last 1 year & it significantly changed my life as a android app developer and also improved overall quality of my apps. if you want to build android apps then learning jetpack compose will be very helpful & in this video we will be discussing why you should learn jetpack compose, what is jetpack compose & what are it's benefits.

What is Jetpack Compose ?

let's start with what is Jetpack Compose for android ?

according to their website it is “modern toolkit for building native Android UI” which simply means it is a api library which handle rendering of views in android. previously in android, we use to create views using XML file, in which layouts & elements are properly arranged along with their attributes & properties. problem with this approach is, there is lot of boilerplate code, it is very difficult to create complex views which have dynamic state and it is not flexible. to solve this problem, google has introduced jetpack compose. in jetpack compose, instead of using xml file, we write entire UI & various UI Elements in kotlin code inside a special function called as composable functions. these functions are rendered into Views.

why to use jetpack compose ?

this approach for building UI Views has many advantages like,

you can write less code for simple tasks, for example if you want to create a list of items, previously we used recycle views in android which has lots of boiler plat code, but in jetpack compose, you can create same list view using just few lines of code in single function. this increase your speed of development & productivity.

another advantage of using jetpack compose is, it has Unidirectional Data Flow. now without going into depth/deep in engineering aspects of it, in simple words, when you build ui in jetpack compose, there is unidirectional flow of events & data. all data flows downward into UI Elements & all events like user interactions goes upwards from UI elements to parent activity. because of this we can separate UI layer from Data layer. if you work in big app projects then this will be very helpful & less chaotic.

if you want to learn jetpack compose then subscribe to my youtube channel because i will be making more videos on modern android app development like jetpack compose including full tutorial for beginners.



android
jetpack compose
app development
modern android app development
youtube



Discover More

Watch on YouTube