The (not so) hidden cost of sharing code between iOS andAndroid

The (not so) hidden cost of sharing code between iOS andAndroid

  • August 15, 2019
Table of Contents

The (not so) hidden cost of sharing code between iOS andAndroid

Until very recently, Dropbox had a technical strategy on mobile of sharing code between iOS and Android via C++. The idea behind this strategy was simple—write the code once in C++ instead of twice in Java and Objective C. We adopted this C++ strategy back in 2013, when our mobile engineering team was relatively small and needed to support a fast growing mobile roadmap.

We needed to find a way to leverage this small team to quickly ship lots of code on both Android and iOS. We have now completely backed off from this strategy in favor of using each platforms’ native languages (primarily Swift and Kotlin, which didn’t exist when we started out). This decision was due to the (not so) hidden cost associated with code sharing.

Here are some of the things we learned as a company on what it costs to effectively share code. And they all stem from the same basic issue: By writing code in a non-standard fashion, we took on overhead that we would have not had to worry about had we stayed with the widely used platform defaults. This overhead ended up being more expensive than just writing the code twice.

Source: dropbox.com

Tags :
Share :
comments powered by Disqus

Related Posts

Flutter 1.0: Google’s Portable UI Toolkit

Flutter 1.0: Google’s Portable UI Toolkit

Today, at Flutter Live, we’re announcing Flutter 1.0, the first stable release of Google’s UI toolkit for creating beautiful, native experiences for iOS and Android from a single codebase. Cross-platform mobile development today is full of compromise. Developers are forced to choose between either building the same app multiple times for multiple operating systems, or to accept a lowest common denominator solution that trades native speed and accuracy for portability.

Read More
The inconvenient truth about cancer and mobile phones

The inconvenient truth about cancer and mobile phones

On 28 March this year, the scientific peer review of a landmark United States government study concluded that there is “clear evidence” that radiation from mobile phones causes cancer, specifically, a heart tissue cancer in rats that is too rare to be explained as random occurrence. Eleven independent scientists spent three days at Research Triangle Park, North Carolina, discussing the study, which was done by the National Toxicology Program of the US Department of Health and Human Services and ranks among the largest conducted of the health effects of mobile phone radiation. NTP scientists had exposed thousands of rats and mice (whose biological similarities to humans make them useful indicators of human health risks) to doses of radiation equivalent to an average mobile user’s lifetime exposure.

Read More
Scaling Cash Payments in Uber Eats

Scaling Cash Payments in Uber Eats

This article is the fourth in a series covering how Uber’s mobile engineering team developed the newest version of our driver app, codenamed Carbon, a core component of our ridesharing business. Among other new features, the app lets our population of over three million driver-partners find fares, get directions, and track their earnings. We began designing the new app in conjunction with feedback from our driver-partners in 2017 and began rolling it out for production in September 2018.

Read More