Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cross Platform Development with Djinni

Cross Platform Development with Djinni

The App Store will turn 10 this year and nearly since the introduction of the App Store developers and business owners were looking for solutions to develop one app for multiple platforms. What sounds like a dream solution to save development costs and time brought us projects like PhoneGap, Titanium, React Native and many more.

After hard work and a lot of effort we saw that all this solutions didn't hold up to their promises. The UX was poor because we didn't have a native UI and bug fixes took a lot of time to solve and made the code base worse. A single code base meant a lot of if and elses. It didn't work out and didn't save time or costs.

But is this the end or could there be a solution to develop features and share them on multiple platforms? Yes, actually there is a great solution. For that purpose Dropbox developed a tool called Djinni which lets you define a API and generated bindings for multiple platforms. The actual API needs to be implemented in C++ and can be used in iOS, Android, Windows, Mac or Linux apps.

Using Djinni now in multiple large projects we think we found a great solution for the sharing code between multiple platforms.

Ömer Avci

March 01, 2018
Tweet

More Decks by Ömer Avci

Other Decks in Programming

Transcript

  1. What we want to talk about → The challenge →

    Why Hybrid-Apps don't work? → The Shared Library approach → How does it work? → Why is it the best solution? → Any disadvantages?
  2. Why Hybrid-Apps don't work? → User Experience is → One

    code base with bugs (from both) → Doesn't save cost or time → Unclear future → Support of platform features take additional time
  3. The Shared Library approach → Share only business logic →

    Write once, use everywhere → C++ Library can used everywhere (nearly) → Define & generate interface with Djinni
  4. How does it work? → APIs need to be defined

    in IDLs → Djinni generator creates glue code → Interfaces can be defined on both sides → Interfaces need to be implemented
  5. Steps to repeat 1. Define your API in IDL 2.

    Generate the glue code 3. Import generated files in your project 4. Implement interface
  6. Why is it the best solution? → Enables Native UI

    & UX → Write business logic once, use everywhere → Defining & implementing API leads to better code (& architecture) → Implementation works the same → Business logic can be fully tested