Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Founder Fridays: A declarative future fo...

vinaygaba
November 30, 2022

Google Founder Fridays: A declarative future for building Android apps

vinaygaba

November 30, 2022
Tweet

More Decks by vinaygaba

Other Decks in Technology

Transcript

  1. My background • Google Developer Expert for Android • Building

    Android apps since 2011 • Creator of JetpackCompose.app, Showkase & Learn Jetpack Compose By Example. Passionate about open source and often seen at tech conferences. • Was recently featured at Google I/O • I’ve helped build some of your favorite apps
  2. noun Jetpack Compose / jetᐧpak kuhmᐧpowz/ Jetpack Compose is a

    declarative & modern toolkit for building native Android UI. It simplifies and accelerates UI development on Android.
  3. What is Jetpack Compose? • What React did for web,

    Jetpack Compose aims to do that for Android • Paradigm shift to Android development as we know it • Complete rewrite from the ground up!!! Massive investment by Google • The community is embracing it with open arms. Here to stay!
  4. Why was it needed? • Existing UI Toolkit was tied

    to the Operating System • Lots of context switching • Simple things required a lot of code • State management was tricky
  5. @Composable fun HelloWorld() { } It’s a Function It’s a

    View It’s a Layout It’s a Custom View
  6. @Composable fun HelloWorld() { } It’s a Function It’s a

    View It’s a Layout It’s a Custom View It’s a Screen
  7. @Composable fun HelloWorld() { } @Composable is the magic sauce

    that allows it to transform from a simple function to something that renders UI on the screen
  8. @Composable fun ListComponent(superheroList: List<Person>) { LazyColumn(items = superheroList) { person

    -> SimpleRowComponent( person.name, person.age, person.profilePictureUrl ) } }
  9. @Composable fun ListComponent(superheroList: List<Person>) { LazyColumn(items = superheroList) { person

    -> SimpleRowComponent( person.name, person.age, person.profilePictureUrl ) } }
  10. Kotlin first Less code == Better build times Reduces development

    time Interoperable with the existing way Brings declarative programming to Android Intuitive and powerful APIs
  11. Takeaways for Students • If you are new to Android

    development, I’d recommend directly learning Jetpack Compose instead of trying to learn the old Android UI Toolkit (View system) first. • The whole industry is a beginner when it comes to Compose. It’s a great equalizer and it has levelled the playing field. Amazing opportunity to accelerate your career and put it on the fast track.
  12. Takeaways for Designers • If you haven’t dabbled with programming

    before, Jetpack Compose is a relatively easier framework to pick up as it reads like English. • Great for prototyping, if you prefer doing it on a real device. • Has a lot of similarities with how Figma thinks about components. For example, the idea of slots. • Your engineer counterparts will be talking about Jetpack Compose a lot over the next couple years. Would be valuable to at least be familiar with it .
  13. Takeaways for Developers • Every company around you will start

    using Jetpack Compose over the next couple years. • Learning Compose is going to be the most efficient use of your time if you want to be an Android developer • First mover advantage is real. Industry leaders are often created early on in the journey of a new technology. You have the opportunity to take one of those spots. • Barrier to entry is also much lower right now. Easier to stand out. Make the most of this opportunity. Lots of low hanging fruit.
  14. Takeaways for Engineering Leaders • Migration/Introduction of Jetpack Compose in

    your codebase is inevitable. • You will have to be thoughtful and careful about how you introduce it in your app. • Compose does have a steep learning curve and it’s important that you support your team in embracing this paradigm shift. • I can help in upleveling your Android team! Please reach out to learn more.
  15. Takeaways for Founders • If you are starting a greenfield

    Android app, I strongly recommend using only Jetpack Compose. • Using Compose is going to be a recruiting advantage over the next few years. Developers want to work with tools that make their life easier. Jetpack Compose promises to be that (at least all the early signs are super positive) • Hiring is probably your #1 problem. If you are looking for Android developers, I can help. I run a popular Jetpack Compose/Android focused Job Board. Please reach out to learn more.