Professional Documents
Culture Documents
Ray Cromwell
Inbox
The future of email
Web
JS
Android
Java
iOS
ObjC
Technical Goals
Lightning fast
Once in Objective-C
Once in Java
Once in Javascript/HTML
3x the code
3x the tests
3x the bugs
Divergence
Solution #2?
Web Everywhere?
C/C++ everywhere?
NDK/JNI on Android
But how?
Pros
Cons
Higher latency
Hybrid Model
UI Frontend
Written in Java
Benefits
Deeper Integrations
Deeper Integration 2
Prophet!
Example
package com.sfeir.calc;
!
Example Usage
#import <Foundation/Foundation.h>
#include "com/sfeir/calc/CalcEngine.h"
#include "com/sfeir/calc/CalcEngineImpl.h"
!
int main (int argc, const char * argv[]) {
!
@autoreleasepool {
!
id<ComSfeirCalcCalcEngine> calcEngine = [[ComSfeirCalcCalcEngineImpl
!
printf ("insert expression...\n");
!
char str[50] = {0};
!
scanf("%s", str);
!
NSString *expr = [NSString stringWithUTF8String:str];
!
int result = [calcEngine evaluateWithNSString:expr];
!
!
}
alloc] init];
return 0;
Android
Other Gotchas
ProtoBufs
Debugging
Xcode works
Operational Transforms
Syncing layers
Summary
World Peace
Thanks