Paul Krill
Editor at Large

Dropbox taps C++ for mobile app dev

news analysis
Sep 16, 20142 mins

The Carousel and Mailbox apps now leverage established C++ language for code portability and performance

Sometimes an older staple of computing can become the ideal choice for modern application development. Looking for code portability and performance, Dropbox has leveraged C++ for native mobile development of its Carousel photo gallery and Mailbox email application.

Officials from Dropbox on Monday described an architecture partnering C++ application logic with a language bridge leveraging JNI (Java Native Interface) or Objective-C. Also in the mix is UI platform code based on Java, for Google’s Android platform, and Objective-C, for Apple’s iOS. The company even devised its own tool to link C++, which was first developed in 1979, to Java or Objective-C, called Djinni. The tool is offered via open source.

“There is no other language that you can compile natively to both Android and iOS,” said Andrew Twyman, platforms and libraries engineer at Dropbox, during the @Scale 2014 technical conference. Dropbox started the project with the C language because it was the most compatible, but decided C was not up to the challenge of “real” application development, Twyman said. Mailbox had been written as a pure iOS application in Objective-C but Dropbox developers moved to C++ when they wanted to do an Android port. Carousel was built from the ground up via the company’s C++ architecture.

Dropbox has followed a Model-View-ViewModel architecture with C++, Alex Allain, platforms and libraries lead at Dropbox, said. C++ has been around since 1979. But was been improved lately, in version 11, with capabilities such as lambda functions, Allain explained. C++ 14 recently was unveiled, featuring improvements to lambdas. Previously, Embarcadero Technologies cited C++ as a fit for cross-platform business applications running on devices.

The Djinni tool arose out of Dropbox’s need to deal with the complexities of JNI (Java Notation). But then developers found they wanted to have it available to work with all languages. Djinni, according to the tool’s GitHub page, generates parallel C++, Java, and Objective-C type definitions from an interface description file.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author