Modern Android App Architecture with Dropbox Store and JetPack

July 15, 2020

A few days ago, Dropbox acquired an open-source Store library. The aim behind taking the ownership was to modify it to make it more suitable to the prevailing Android developer ecosystem. 

Now, Store also includes Google JetPack collection of libraries which poses as a solution for creating current-day Android apps.

Google JetPack makes it possible to create high-quality Android apps while accelerating the development process

There are two objectives that this library fulfills – It leverages advanced Kotlin features in order to reduce the boilerplate code and offers high-level abstractions besides those found in the Android SDK, i.e., Fragments and [Activities]. These allow the developers to present complex tasks in an easier and simpler way.

Like in case of the traditional mobile app architecture, there are numerous components in Jetpack that developers can use independently and cover four areas – Architecture, Foundation, User Interface, and Behavior.

In fact, Google uploaded its own recommended Android app architecture along with JetPack defining the set of modules that make up an Android app and how they interact. As shown in the image, a well-architecture Android app is fundamentally based on the tenets – model-driven UI, separation of concerns, and one-directional dependencies across several modules.

However, though Jetpack offers most of the components for the creation of an Android app based on the architecture suggested by Google, there is an exception – the Repository layer.

On this matter, Mike Nakhimovich, the creator of Store states- 

“Repository currently only has a few code samples and no reusable abstractions that work across different implementations. That’s one of the big reasons why Dropbox is investing in Store–to solve this gap in the architecture model above.”

Store, while relying on a reactive design, aims to support Android app development where data flows in and out of the UI in a seamless manner without forcing the users to navigate back and forth. Mike goes on to say on this matter –

“Reactive front ends led me to think of how we can have declarative data stores with simple APIs that abstract complex features like multi-request throttling and disk caching that are needed in modern mobile applications.”

To explain this in brief – Dropbox Store helps in connecting the app model with an external data source by using a declarative interface centralizing all data-related activities. 

Store aims at optimizing network usage in order to keep it at a minimum. This library was rewritten Kotlin backed by Coroutines and Flow, followed by another major change of discarding RxJava for structured concurrency paradigm which is implemented in Kotlin reactive streams. 

This switch poses a big impact on ensuring all resources employed in concurrent tasks are freed whenever the task completes, says Mike.

“The big problem with RxJava’s approach to scoping background operations is that it’s too easy for engineers to forget to call dispose. Failing to dispose of active subscriptions directly leads to memory leaks.”

In addition, the Store also supports disk caching, memory caching with TTL and size policies, explicitly skipping the cache to fetch new data from the data source, multi-casting of responses, among many others.

Now, that Dropbox is implementing many changes in the Store for improvement, it has been set on a path of becoming a great source of resources for all Android app development developers.

THE AUTHOR
Content Writer
Prev PostNext Post
Read more blogs
News & Events

Is Blockchain the Answer to Fighting Coronavirus Outbreak?

The victim-count of Coronavirus has increased to 28,276 while taking 565 lives already.  With the virus epidemic being on the verge of becoming pandemic, there is a cloud of concern hovering over not just the affected nations but also the rest of the entire world.  The grim picture of Coronavirus is not just of the…
Tripti Rai
News & Events

Google Acquires Appsheet, a No-code Mobile App Development Platform

Google recently announced that they have acquired AppSheet, a Seattle based no-code mobile app development platform. The terms of the acquisition have not been disclosed yet, but it has been revealed that AppSheet will continue to serve its existing customers.  AppSheet was founded back in 2014 by Praveen Seshadri and Brian Sabino to help businesspeople…
Bhupinder Kour
News & Events

Eddy Travels, the AI-Based Bot, Raises $500K in Pre-Seeding

Eddy Travels, an AI-based travel assistant bot closed a pre-seeding funding of about $500,000 led by Techstars. Other investors who participated in this funding session were Practica Capital and Open Circle Capital VC funds from Lithuania, and angel investors from U.S, U.K., and Canada. The Toronto-based AI tech startup was launched back in November 2018…
Bhupinder Kour