Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DO NOT REPEAT YOURSELF
Search
Marco Sero
March 13, 2015
Programming
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DO NOT REPEAT YOURSELF
Leverage the power of C++ and Djinni to write native cross platform code on iOS and Android
Marco Sero
March 13, 2015
More Decks by Marco Sero
See All by Marco Sero
Working on a Legacy App
marcosero
3
3.4k
Event Detection
marcosero
1
1.7k
Other Decks in Programming
See All in Programming
dRuby over BLE
makicamel
2
340
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
210
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
140
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
CSC307 Lecture 17
javiergs
PRO
0
320
AIで効率化できた業務・日常
ochtum
0
140
Vite+ Unified Toolchain for the Web
naokihaba
0
310
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
The Pragmatic Product Professional
lauravandoore
37
7.3k
WCS-LA-2024
lcolladotor
0
640
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
440
Bash Introduction
62gerente
615
220k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Transcript
DO NOT REPEAT YOURSELF
IOS AND ANDROID HAVE SOMETHING IN COMMON
C++
BUT USING IT... IT'S NOT GREAT
Objective-C++ on iOS JNI (Java Native Interface) on Android
UNTIL...
DJINNI BY
.djinni interface + C++ implementation Djinni JAVA AND OBJECTIVE-C INTERFACES
THE HACK
SHARED C++ IMAGE CACHE
DEFINE INTERFACE IN A .djinni FILE image_cache = interface +c
{ static create_with_path(path: string): image_cache; image_for_key(key: string): binary; save_image_for_key(key: string, image_data: binary); }
IMPLEMENT IT IN C++ shared_ptr<ImageCache> ImageCache::create_with_path(const std::string &path) { ...
} vector<uint8_t> ImageCache::image_for_key(const string &key) { ... } void ImageCache::save_image_for_key(const string &key, const vector<uint8_t> &image_data) { ... }
USE IT FROM OBJECTIVE-C id<YCCPImageCache> imageCache = [YCPPImageCacheCppProxy createWithPath:cachePath]; NSData
*imageData = [imageCache imageForKey:cacheKey]; [imageCache saveImageForKey:cacheKey imageData:imageData]; AND JAVA ImageCache imageCache = ImageCache.createWithPath(cachePath); byte[] imageBlob = this.imageCache.imageForKey(cacheKey); imageCache.saveImageForKey(cacheKey, imageBlob);
NEVER WRITE JNI AND OBJECTIVE-C++ AGAIN
SHARE NATIVE CODE BETWEEN PLATFORMS MORE EASILY
DO I RECOMMEND THIS?
NO AT LEAST FOR OUR APPS
THANK YOU.