Dropbox would rather write code twice than try to make C++ work on both iOS and Android

Write once, run anywhere? You must be kidding

  Dropbox running on a smartphone

Dropbox running on a smartphone

Dropbox has abandoned a long technical strategy of sharing C ++ code between its iOS and Android applications, saying that the overhead of Writing code twice is less than the cost of making code sharing work.

The online storage team formed the previous strategy in 2013 to allow a small team to send code quickly. Now he has "completely withdrawn from this" in favor of the use of native languages ​​for each platform, "mainly Swift and Kotlin."

Software engineer Eyal Guthmann gave several reasons for the decision. He said that the open source culture in the C ++ developer community is weak, especially when it comes to mobile devices, so they had to build frameworks to address cross-language type declarations and interface links (for connect with Objective-C and Java), JSON analysis and serialization. This would not have been necessary using the native libraries. The team also had to create a custom construction system.

Second, Guthmann said that tools for cross-platform development are weaker than for native languages, which means that mistakes were harder to find. A problem related to the multithreaded code between C ++ and Java took "weeks to complete."

Third, due to the differences between iOS and Android, not all code can be cross-platform. You have to write specific platform code for certain things: interaction with the camera reel, for example.

Fourth, it was difficult to find senior developers to work on mobile C ++.

Dropbox may have made cross-platform coding particularly challenging when choosing C ++ instead of C # or JavaScript. On the other hand, Guthmann said: "C / C ++ are the only languages ​​with a compiler compatible with Google and Apple, so using a different language would have created a lot of other problems"

. The problems that Dropbox faces will not apply to all projects. Dropbox needs to integrate deeply with the operating system and performance is critical. It is possible that a customized commercial application, for example, is a better use case for a multiplatform solution, since it does not have to be integrated to the same extent. Cross-platform C ++ might also make sense for applications that make intensive use of non-visual algorithms.

That said, Guthmann's publication shows that the dream of writing once, running anywhere is, in practical terms, still far away for many types of application. ®

Balancing consumerization and corporate control

For More Updates Check out Blog, Windows Softwares Drivers, Antivirus, Ms Office, Graphic Design Don’t Forget to Look Our Facebook Page Get Into Pc like us & follow on Twitter- @getinpc

Please Note: This content is provided and hosted by a 3rd party server. Sometimes these servers may include advertisements. igetintopc.com does not host or upload this material and is not responsible for the content.