Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ Google Drive cut code and development time in half with Jetpack Compose and new architecture

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Google Drive cut code and development time in half with Jetpack Compose and new architecture


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: android-developers.googleblog.com

Posted by Nick Butcher โ€“ Product Manager for Jetpack Compose, and Florina Muntenescu โ€“ Developer Relations Engineer


As one of the worldโ€™s most popular cloud-based storage services, Google Drive lets people do more than just store their files online. With Drive, users can synchronize, share, search, edit, and even pin specified files and content for safe and secure offline use.

Recently, Driveโ€™s developers revamped the applicationโ€™s home screen to provide a more seamless experience across devices, matching updates made to Google Driveโ€™s web version. However, the appโ€™s previous architecture and codebase wouldโ€™ve prevented the team from completing the updates in a timely manner.

Instead of struggling with the appโ€™s previous tech stack to implement the update, the Drive team rebuilt the home page from the ground up using Androidโ€™s recommended architecture and Jetpack Compose, Androidโ€™s modern declarative toolkit for creating native UI.

Compose, combined with architecture improvements, cut our development time nearly in half.โ€ โ€” Dale Hawkins, Senior software engineer and tech lead at Google Drive

Experimenting with Kotlin and Compose

The Drive team experimented with Kotlin โ€” which the Compose toolkit is built with โ€” for several months before planning the appโ€™s home screen rebuild. Driveโ€™s developers liked Kotlinโ€™s improved syntax and null enforcement, making it easier to produce code.

โ€œWe had been using RxJava, but started looking into replacing that with coroutines,โ€ said Dale Hawkins, the features team lead for Google Drive. โ€œThis led to a more natural alignment between coroutines and Jetpack Compose. After a deep dive into Compose, we came away with a clear understanding of how Compose has numerous benefits over the Views-based approach.โ€

Following the Kotlin exploration, Dale experimented with Jetpack Compose. โ€œI was pleased with how easy it was to build the UI using Compose. So I continued the experiment after that week,โ€ said Dale. โ€œI eventually rewrote the feature using Compose.โ€

Using Compose

Shortly after experimenting with Jetpack Compose, the Drive team decided to use it to completely rebuild the appโ€™s home screen UI.

โ€œWe wanted to make some major changes to match the ones being done for the web version, but that project had a several-month head start. We wanted to release the Android version shortly after the web changes went live to ensure our users have a seamless Google Drive experience across devices,โ€ said Dale.

The Drive team's experimentation and testing with Jetpack Compose showed that the new toolkit was powerful and reliable and that it would enable them to move faster. With this in mind, the Drive team decided to step away from their old codebase and embrace Jetpack Compose for the appโ€™s home screen update. Not only would it be quicker and easier, but it would also better prepare the team to easily make future UI changes.

Using Androidโ€™s guidance for architecture

Before going all-in with Jetpack Compose, Drive developers wanted to restructure the application by implementing a completely new app architecture. Drive developers followed Androidโ€™s official architecture guidance to apply structural changes, paving the way for the new Kotlin codebase.

โ€œThe recommended architecture reinforces good separation between layers,โ€ said Quintin Knudsen, an Android engineer for Google Drive. โ€œWe work in a highly dynamic environment and need to be able to adjust to any app changes. Using well-defined and independent layers helps isolate any changes or UI requirements. The recommendations from Android offered sound ways to structure the layers.โ€ With a clear separation between the appโ€™s data and UI layers, developers could work in parallel to significantly speed up testing and development.

Drive developers also relied on Mappers and UseCases when creating the new architecture. These patterns allowed them to create flexible code that is easier to manage. They also exposed flows from their ViewModels to make the UI respond immediately to any data changes, making it much simpler to implement and understand UI updates.

Less code, faster development

With the appโ€™s newly improved architecture and Jetpack Compose, the Drive team was able to develop the appโ€™s new home screen in less than half the time that they expected. They also implemented the new code and finished quality assurance testing nearly seven weeks ahead of schedule.

โ€œThanks to Compose, we had the groundwork done within a couple of weeks. We delivered a great implementation over a month ahead of schedule, and itโ€™s been praised by product, UX, and even other engineering teams,โ€ said Dale.

Despite having fewer features, the original home screen required over 12,000 lines of code. The new Compose-based home screen has many new features and only required 5,100 lines of codeโ€”a 57% reduction. Having less code makes it much easier for developers to maintain the app and implement any updates.

Testing the new UI in Jetpack Compose also required significantly less code. Before Compose, Drive developers used roughly 9,000 lines of code to test about 62% of the UI. With Compose, it took only 2,200 lines to test over 80% of the new UI.

The original home screen required over 12,000 lines of code. The Compose-based home screen only required 5,100 lines of code. Thatโ€™s a 57% reduction.โ€ โ€” Dale Hawkins, Senior software engineer and tech lead at Google Drive

Looking forward

A new and improved app architecture paired with Jetpack Compose allowed Drive developers to rebuild the appโ€™s home screen UI faster and easier than they couldโ€™ve imagined. The Drive team plans to expand its use of Compose within the application for things like supporting large dynamic displays and text resizing.

โ€œAs we work on new projects, weโ€™re taking the opportunity to update older UI code to make use of our new architecture and Compose. The new code will be objectively better and features will be easier to write, test, and maintain,โ€ said Dale.

Get started

Improve app architecture using Androidโ€™s official architecture guidance and optimize your UI development with Jetpack Compose.

...



๐Ÿ“Œ Google Drive cut code and development time in half with Jetpack Compose and new architecture


๐Ÿ“ˆ 93.18 Punkte

๐Ÿ“Œ Android Developer Story: Google Drive cut code and development time in half with Jetpack Compose


๐Ÿ“ˆ 77.95 Punkte

๐Ÿ“Œ Whatโ€™s New with Android Jetpack and Jetpack Compose


๐Ÿ“ˆ 47.73 Punkte

๐Ÿ“Œ Writing cleaner Jetpack Compose code with the Twitter Compose Ruleset


๐Ÿ“ˆ 46.55 Punkte

๐Ÿ“Œ Jetpack Compose Mastery Part 2: Advanced Tools and Resources for Mastering Compose UI


๐Ÿ“ˆ 43.73 Punkte

๐Ÿ“Œ Jetpack Compose Mastery Series Finale: 38 Key Issues in Compose UI


๐Ÿ“ˆ 42.67 Punkte

๐Ÿ“Œ Learn Jetpack Compose at Compose Camp


๐Ÿ“ˆ 42.67 Punkte

๐Ÿ“Œ Learn Jetpack Compose at a Compose Camp near you!


๐Ÿ“ˆ 42.67 Punkte

๐Ÿ“Œ Jetpack Compose Mastery Part 1: A Comprehensive Guide to Building Your First Compose Application


๐Ÿ“ˆ 42.67 Punkte

๐Ÿ“Œ Now's the time to learn Android development with Jetpack Compose!


๐Ÿ“ˆ 42.38 Punkte

๐Ÿ“Œ Whatโ€™s new in Jetpack Compose, Google Summer of Code 2024, and more dev news!


๐Ÿ“ˆ 38.66 Punkte

๐Ÿ“Œ A modern approach to Android development, with Jetpack Compose and more!


๐Ÿ“ˆ 37.28 Punkte

๐Ÿ“Œ The next step in modern Android development: Jetpack Compose


๐Ÿ“ˆ 36.22 Punkte

๐Ÿ“Œ Mercari improves UI development productivity by 56% with Jetpack Compose


๐Ÿ“ˆ 36.22 Punkte

๐Ÿ“Œ Twitter going all in on Jetpack Compose for feature development: greater productivity, less bugs


๐Ÿ“ˆ 36.22 Punkte

๐Ÿ“Œ Learn Android Development with Jetpack Compose #Shorts


๐Ÿ“ˆ 36.22 Punkte

๐Ÿ“Œ Clueโ€™s development speed improves 3X after rebuilding the app with Jetpack Compose


๐Ÿ“ˆ 36.22 Punkte

๐Ÿ“Œ Java developer try Jetpack Compose for firstย time


๐Ÿ“ˆ 34.97 Punkte

๐Ÿ“Œ Play Time with Jetpack Compose


๐Ÿ“ˆ 34.97 Punkte

๐Ÿ“Œ New in Jetpack Compose, Flutter, TensorFlow, and more Google I/O 2023 announcements


๐Ÿ“ˆ 34.79 Punkte

๐Ÿ“Œ Latest Updates to Google Play, New APIs in Jetpack Compose, and more dev news!


๐Ÿ“ˆ 34.79 Punkte

๐Ÿ“Œ Google: Jetpack Compose Lets Android Developers Write Apps With 'Dramatically Less Code'


๐Ÿ“ˆ 34.68 Punkte

๐Ÿ“Œ Compose for Wear OS is now 1.0: time to build wearable apps with Compose!


๐Ÿ“ˆ 33.89 Punkte

๐Ÿ“Œ Jetpack Compose Buttons for Google Pay and Google Wallet


๐Ÿ“ˆ 33.87 Punkte

๐Ÿ“Œ Android Dev Story: Lyft reduced their code for UI components by as much as 60% using Jetpack Compose


๐Ÿ“ˆ 32.68 Punkte

๐Ÿ“Œ Mercari reduces 355K lines of code, a 69% difference, by rebuilding with Jetpack Compose


๐Ÿ“ˆ 32.68 Punkte

๐Ÿ“Œ Android Developer Story: Reddit rebuilds feature with 44% less code using Jetpack Compose


๐Ÿ“ˆ 32.68 Punkte

๐Ÿ“Œ Lyft reduced their code for UI components by as much as 60% using Jetpack Compose


๐Ÿ“ˆ 32.68 Punkte

๐Ÿ“Œ SoundCloud supported more screens using 45% less code with Jetpack Compose


๐Ÿ“ˆ 32.68 Punkte

๐Ÿ“Œ Now in Android: 40 - Google I/O 2021, Jetpack Compose, Android 12 beta, and more!


๐Ÿ“ˆ 31.87 Punkte

๐Ÿ“Œ Now in Android: 99 - Jetpack Compose, Google AI on Samsung Galaxy, Play recovery tools, and more!


๐Ÿ“ˆ 31.87 Punkte

๐Ÿ“Œ What's New in Jetpack Compose (Android Dev Summit '19)


๐Ÿ“ˆ 31.73 Punkte

๐Ÿ“Œ What's new in Jetpack Compose


๐Ÿ“ˆ 31.73 Punkte

๐Ÿ“Œ Whatโ€™s new in Jetpack Compose


๐Ÿ“ˆ 31.73 Punkte

๐Ÿ“Œ Whatโ€™s new in the Jetpack Compose March โ€™23 release


๐Ÿ“ˆ 31.73 Punkte











matomo