Out there in 180 international locations and with over 1 billion downloads on Google Play, Dropbox is among the world’s hottest file sharing and cloud storage providers. Dropbox is on a mission to design a extra enlightened means of working, conserving life organized and work shifting. Just lately that meant Jetpack Compose , Android’s trendy declarative toolkit for creating native UI.
A wiser, sooner approach to construct UI
Since adopting Compose, Dropbox builders have rewritten many options for the app, together with its house display, file preview, and search experiences. Dropbox’s search expertise was fully rebuilt in just some weeks, which was 40% much less time than anticipated and fewer than half the time it took them to construct the identical function for iOS.
The crew with the ability to work sooner was a direct results of how easy it was for them to make use of Compose. Since rebuilding the search expertise, Dropbox builders have seen a 13% improve in profitable search periods —a key metric for the crew.
Compose helped Dropbox builders transfer shortly, letting them simply construct complicated, customized UIs with the toolkit’s primary constructing blocks and utilities. “Help for a number of previews, with totally different configurations or information, permits us to contemplate totally different variations of parts as we construct them as a substitute of as an afterthought,” stated Ryan Harter, workers Android engineer at Dropbox.
The Dropbox crew additionally constructed a brand new design system on prime of Android’s MaterialTheme, which the engineers completed by following Compose finest practices. Creating the brand new design system on prime of Android’s MaterialTheme minimized the time it took for Dropbox builders to put the app’s basis, permitting them to construct new options with Compose whereas sustaining a feel and look that’s according to Dropbox’s branding.
Compatibility with Views made making an attempt Compose straightforward
Dropbox builders had been additionally swayed to make use of Compose due to its interoperability with Views and had been impressed by how straightforward it was to develop in tandem with each toolkits. The Dropbox crew was in a position to assist basic Views libraries and plugins throughout the app whereas creating new UI parts utilizing Compose. Due to this, Dropbox builders might progressively migrate the app to Compose as a substitute of fully overhauling the app.
“Interoperability with Compose allowed us to maneuver ahead with the toolkit, even after we wanted to work together with Views in sure workflows akin to ExoPlayer and PDF doc views,” continued Ryan. “You can begin with a smaller element and expertise the advantages and improved pace with out committing to rewriting your whole app. It’s clear that Compose was designed with the intention that customers don’t must carry out an all-or-nothing migration.”
Improved testing and experimentation
Throughout their rewrites, Dropbox engineers discovered that Compose made creating simpler and enabled extra environment friendly testing. “Compose, along with Android Studio’s preview assist, has allowed us to iterate on options sooner by decreasing the size of the suggestions cycle whereas creating screens,” continued Ryan.
The quick suggestions cycle and interactive previews from Compose allowed the Dropbox crew to experiment with UX shortly and take a look at any assumptions that they had in regards to the updates, which made it simpler to launch options.
“If questions got here up about efficiency or use of an strategy, we went into Android Studio and used the interactive previews to check and measure outcomes so we’d have extra solutions and fewer assumptions,” stated Alison Wyllie, a senior software program engineer at Dropbox. “And the quick suggestions cycle and interactive previews that include Compose have allowed us to experiment shortly with UX and take a look at our assumptions, permitting us to get options into customers’ palms sooner.”
Jetpack Compose’s push towards a unidirectional information stream (UDF) additionally helped Dropbox engineers whereas testing and debugging. Combining UDF with Compose testing libraries and the toolkit’s declarative strategy to creating UI made the Dropbox crew assured that the app’s options had been secure and bug free as a result of they might absolutely take a look at them earlier than launch.