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.5k
Event Detection
marcosero
1
1.7k
Other Decks in Programming
See All in Programming
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
180
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
300
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
480
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
240
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
220
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
840
Webフレームワークの ベンチマークについて
yusukebe
0
200
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
5.2k
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.2k
Contextとはなにか
chiroruxx
1
390
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
Art, The Web, and Tiny UX
lynnandtonic
304
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
The Pragmatic Product Professional
lauravandoore
37
7.4k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.7k
The agentic SEO stack - context over prompts
schlessera
0
840
KATA
mclloyd
PRO
35
15k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
460
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
180
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.