![Meta constructed threads in solely 5 months utilizing Jetpack Compose Meta constructed threads in solely 5 months utilizing Jetpack Compose](https://geeks-news.com/wp-content/uploads/https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsyEHrxFST3n2kJMycebxNdqrW92KY_yCXE-VSE9y_cshYT6c-33O8NlrmsUJ-obIzxiz9H05q6Q6e_LGC1EGLzMWMex3kcozRFLyrzr40i3IbS39vIAgouE8A9Om8AEQYDZ_aJdNakpJ9QM4hNuTOmEud84DxthVcQ8MvK8W8kGz9vuSTaxw4D3EhHQM/s1600/image5.gif)
[ad_1]
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsyEHrxFST3n2kJMycebxNdqrW92KY_yCXE-VSE9y_cshYT6c-33O8NlrmsUJ-obIzxiz9H05q6Q6e_LGC1EGLzMWMex3kcozRFLyrzr40i3IbS39vIAgouE8A9Om8AEQYDZ_aJdNakpJ9QM4hNuTOmEud84DxthVcQ8MvK8W8kGz9vuSTaxw4D3EhHQM/s1600/image5.gif)
Posted by Yasmine Evjen – Product Supervisor, and Florina Muntenescu – Developer Relations Engineer
Following its launch in July of 2023, Meta’s Threads turned probably the most quickly downloaded app ever with over 100 million downloads in its first week. Meta created the brand new text-based social media platform as a spot to construct connections and have significant conversations. To make sure the app was arrange for achievement at its launch and into the longer term, Threads builders used Jetpack Compose, Android’s fashionable declarative toolkit for constructing UI.
A better solution to construct UI with Jetpack Compose
Threads is constructed on prime of present code from its sister app Instagram, which makes use of Views for its UI improvement. After constructive experiences from different Android builders about Compose, and following inner testing and an evaluation of the toolkit’s advantages, Threads engineers opted to construct the all-new app from scratch utilizing Compose. By utilizing Compose, the group may transfer sooner and higher put together the app for any future updates.
“We determined Jetpack Compose can be our goal UI framework going ahead,” mentioned Richard Zadorozny, a software program engineer at Threads. “We needed to construct the brand new app UI from scratch utilizing Compose as a result of it will allow us to maneuver sooner than refactoring a big software like Instagram.”
Regardless that most of Threads’ engineers had no prior expertise utilizing Compose, they discovered it simple to get began and be taught the brand new toolkit. With Compose, Threads engineers constructed and shipped the app in solely 5 months. This significantly exceeded the group’s pace expectations for creating a high-quality Android software — particularly of this complexity and scale. The group attributes a lot of this pace to the flexibleness and decoupling Compose supplied.
Compose helped Threads engineers streamline the event of recent product options. The modular nature of the toolkit let Threads builders iterate on the app because it advanced and teed up the app’s structure for future improvement. Compose additionally helped engineers construct user-friendly options that adhered to Materials Design tips.
![Threads was built and shipped in five months, exceeding our speed expectations for building a high-quality Android app of this complexity and scale.” — Richard Zadorozny, software engineer at Threads](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgjp0yhRQDaowwoM0fWHLq6Lwb6aX6Zawmc9bDAne7nIIrZUMeqakcrlJVrI6kuD7_X91Xl7d_QKOkmDOcIhhQrvhVL0LC9HrnBeHfjdg5ucDZAdfyyRCXrktBanPhevPgrM8ZVV33Kl0fe5VDbqzb5wdzBWtxuXwhI2WEsdNNqxu3bigpTxSLyDiOG_k/s1600/image4.png)
Going all in with Compose
Threads engineers developed nearly the entire app’s surfaces utilizing Compose. In the long run, they constructed over 90% of Threads utilizing Compose, together with the app’s exercise feed, navigation, search, profiles, onboarding web page, shared component transitions, media viewer, settings, and extra.
Whereas Compose did largely all the pieces Threads engineers wanted it to, it was nonetheless simple for them to interoperate with Views as mandatory. They used Views for Threads’ movies and the media picker that’s accessible when creating a brand new publish.
Compose gives fashionable APIs that ship straight with an app. Due to this, Threads engineers spent much less time worrying about backward compatibility, lacking options, or differing performance between completely different variations of Android. As an alternative, they might focus their vitality on creating a high-quality software.
“Compose’s design encourages a modular, plug-in method to improvement,” mentioned Richard. “Modifiers make all kinds of performance inherently reusable, so that you now not must subclass sophisticated ViewGroups or lump all kinds of logic into one place.”
![Moving image shows Jetpack Compose/Modifiers code appears on screen](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdL2XJ5vo1Zjqhb3TbgHbXkSDvc3_Exr6IeRLMOjBghiC2e5vRFBxjN9AlpXDyzZ1Z7MPan4PFzHZqvPo9m5Sesv4SDhaJNGkGnqEQTzd7J5imdaAVmwwXfg-frUMLk_bhgP11mVxuQmjzOMfrE6MKk9cd2qd314KadEVG7zwI9P6CB41CNZm5DXYXx4g/s1600/image3.gif)
The Threads group used Modifiers for the app’s customized click on behaviors and its thread line illustration that seems on the left aspect of posts. Modifiers additionally allowed Threads builders to simply add the app’s branding to any components and ensured they have been correctly aligned on-screen.
Threads engineers additionally ensured the app was prepared for customers throughout platforms at launch. That meant ensuring Threads resizes to work on completely different gadgets, like giant screens and foldables. The adaptive layouts Compose provides guarantee an app responds correctly to completely different display screen sizes, orientations, and kind elements. This made it simpler for the Threads app to “simply work” for configuration modifications, in keeping with Richard.
![For developers who are building new apps, I would definitely recommend using Compose. Not only is it enjoyable… it sets your team up for success in the future.” — Richard Zadorozny, software engineer at Threads](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbovWwgoFE2rPxTU4M8xAUgqkng-ph-RYssAiohRLd4_T9aTGEl9VCQR0SmwK5lJHn9sRcaJihXr3BCRfOJId4Lg2bhXeQyLl15slMkfXxV6YAqM1lJtzzYxkKzc5rKm-yJNMkv7k9jUNp61gNLdn9OiKCSr14whnimmGwcZf3GLMlTu0_c3sHANSr5fI/s1600/image2.png)
Compose is the ‘future’ of Android UI
Compose supplied Threads builders a better solution to design and create UI whereas making ready the app’s structure for the longer term. With its intuitive composables and fashionable declarative framework, Compose made end-to-end improvement easy and gave Threads builders confidence that updating the app can be simple.
Given the constructive outcomes the group noticed with the discharge of Threads, Meta plans to broaden its use of Compose to a few of Instagram’s most necessary surfaces, just like the app’s important feed.
“It’s reached a degree the place Jetpack Compose can do nearly all the pieces you’ll want, and its modular nature makes it simple to make many of the modifications you would wish to fill the gaps,” mentioned Richard. “I consider Compose is the way forward for Android UI improvement, and it’s simply enjoyable!”
Get began
Optimize your UI improvement with Jetpack Compose.
[ad_2]