apk.fm / News / Android Developers Blog: Twitter going all in on Jetpack Compose for feature development: greater productivity, less bugs

Android Developers Blog: Twitter going all in on Jetpack Compose for feature development: greater productivity, less bugs


Posted by The Android Crew

Twitter going all in for Jetpack Compose feature development 

As one of the vital broadly used social media platforms, Twitter is at all times trying to find methods to higher join its customers. On the similar time, with the intention to effectively construct new options whereas sustaining current ones, builders want supportive infrastructure. The Twitter engineering crew turned to Jetpack Compose to kick-start a a lot wanted overhaul of the app’s UI basis. With Compose, builders can simply discover and use the appropriate APIs, fluidly model and modularize parts, and in the end construct extra with much less code.

Twitter launches UI overhaul

A handful of groups such because the Android Shopper UI crew, Buyer Acquisition, Twitter Blue, and Communities groups revamped their improvement processes, inspiring pleasure amongst Twitter’s engineers. “A number of groups at Twitter have adopted Compose of their each day workflows,” mentioned Sneha Patil, senior software program engineer and technical lead on the Communities crew for Twitter for Android. By eradicating the work of making and establishing customized theming and attributes, Compose made writing capabilities and implementing design necessities considerably quicker and extra easy than what they skilled with Views. Jetpack Compose enabled these groups to work quicker and extra successfully, guarantee reusability of their code, and simply onboard new engineers.

Revitalizing the event course of

Creating dynamic content material is simple with Compose. The Twitter crew used the LazyColumn composable to construct UI with out the necessity for an Adapter or ViewHolder, simplifying the method of writing code that seamlessly brings layouts, themes, and kinds to life. With fewer strains to jot down, improvement groups at Twitter decreased their boilerplate, skilled much less bugs throughout improvement and releases, enabled UI experimentation, and sped up the testing processes. These enhancements heightened productiveness so builders may spend extra time constructing what makes Twitter distinctive.

Additionally they used Compose to construct stateless parts which can be reusable throughout the app. The pliability of Compose made it simpler and quicker to satisfy design necessities, making the setup of theming and styling simpler for each new and skilled engineers to work with.

Constructing new options utilizing Compose

Given the enhancements skilled, they determined to construct a whole new function utilizing Compose. They constructed the Communities function, Twitter’s devoted house the place customers can have interaction in discussions they care about most, from the bottom up utilizing Compose. Based mostly on the groups’ earlier expertise utilizing Views for different options, constructing with Compose was a lot quicker they usually had much less bugs. “It was like magic,” mentioned Sneha, “It’s a sport changer for the way we will develop on Android with Compose.

Quote from Yoali Sotomayer Baqueiro 

Compose boosts improvement output

Compose boosted the speed and effectivity of Twitter engineers’ UI improvement. Builders simply integrated and constructed with Compose, which made it simpler for them to modularize code, reuse parts, and break down dependencies. The crew commonly makes use of UI experimentation, and Compose helped improve their confidence in realizing what the parts that react to person interactions, knowledge updates, and completely different display screen sizes will appear to be in manufacturing.

These groups’ preliminary success with Compose impressed different improvement groups at Twitter to comply with swimsuit. Now, even engineers engaged on advanced legacy parts are trying into adopting it.

Total, Compose has not solely eliminated lots of the obstacles the crew skilled in Views — it additionally added enjoyment into the workflow, with some builders able to abandon previous strategies for good. “I’m excited to jot down extra Compose and by no means contact an XML structure once more,” mentioned Yoali Sotomayor Baqueiro, software program engineer for Android Shopper UI at Twitter. “It makes creating UI not simply simpler but additionally far more enjoyable and intuitive.

Get began

Optimize your UI improvement with Compose.

Source hyperlink

Take a comment