in native apps
allen pike steamclock software
in native apps allen pike steamclock software build delightful - - PowerPoint PPT Presentation
in native apps allen pike steamclock software build delightful apps. embed a javascript runtime. embrace our platforms. enable tinkering. render native opengl. mix javascript and native. share javascript in native apps. build
in native apps
allen pike steamclock software
apps.
apps.
Blow people’s minds.
git clone git://github.com/v8/v8.git
Note: The handle stack is not part of the C++ call stack, but the handle scopes are embedded in the C++ stack. Handle scopes can only be stack- allocated, not allocated with new.
JavaScriptCore.framework
var multiply = function(arg1, arg2) { return arg1 * arg2; }
In JavaScript In Objective-C
var multiply = function(arg1, arg2) { return arg1 * arg2; } [jsContext evaluateScript:jsFile]; JSValue* jsMultiply = jsContext[@"multiply"]; JSValue* jsResult = [jsMultiply callWithArguments:@[@5, @17]];
In JavaScript In Objective-C
int (^multiply)(int, int) = ^(int arg1, int arg2) { return arg1 * arg2; }; jsContext[@"multiply"] = multiply;
In Objective-C In JavaScript
int (^multiply)(int, int) = ^(int arg1, int arg2) { return arg1 * arg2; }; jsContext[@"multiply"] = multiply;
In Objective-C In JavaScript
var result = multiply(1, 2);
Load a JavaScript VM
Objective-C to JavaScript
JavaScript to Objective-C
JavaScriptCore WebView Nice bridging More flexibility Reference cycles
+ + Delightful possibilities =
blue text you can click focus on images white backgrounds type-heavy layouts flat rectangles
highly responsive touch gorgeous scrolling physics-based gestures beautiful 3d real-time blur
“A 500 lb. monolith
211 MB
now allen.
github.com/SteamClock/JSCalc
node Java UIKit Android UI Objective-C
node UIKit Android UI logic logic
node Java Objective-C HTML HTML
node Java UIKit Droid Obj-C HTML HTML
Java UIKit Droid Obj-C HTML HTML node Brainfuck OpenGL Text WebObjects logic
appears!
apike steamclock.com