$30 off During Our Annual Pro Sale. View Details »
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
0
410
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
Tweet
Share
More Decks by Marco Sero
See All by Marco Sero
Working on a Legacy App
marcosero
3
3.3k
Event Detection
marcosero
1
1.6k
Other Decks in Programming
See All in Programming
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
170
Cell-Based Architecture
larchanjo
0
140
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
490
愛される翻訳の秘訣
kishikawakatsumi
3
340
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
260
エディターってAIで操作できるんだぜ
kis9a
0
750
Python札幌 LT資料
t3tra
6
1k
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
AIコーディングエージェント(Gemini)
kondai24
0
260
AIコーディングエージェント(skywork)
kondai24
0
200
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
73
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
750
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
It's Worth the Effort
3n
187
29k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
25
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
180
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
Utilizing Notion as your number one productivity tool
mfonobong
2
190
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.