2. About Me
Currently responsible for all “Client” products
Led design of Aptana, an open-sourceWeb IDE
Aptana acquired by Appcelerator. Aptana folded into
Titanium Studio
10+ years fostering vibrant open source communities
Architected web-based framework for secure DoD
healthcare applications (acquired by Humana)
14. Alloy
CustomTSS queries
<Annotation> tag support in maps, plus data-binding for
annotation generation
Widget themes
Customizing the Android ActionBar using the <Menu>
tag
Creating Date/Time pickers
Keyboard and returnkey type shortcuts
18. CLI
Windows Hybrid
Project templates
Consolidated module projects
deploy.json is baked into the APK
No more version number formatting for iOS and Android
Display iOS logging when running app on device
Genymotion officially supported (includes debugging)
20. Studio
Push to device is default (no iTunes sync)
Improved Studio Packaging (smaller, more robust)
Configuring Studio proxy configures CLI proxy
Alloy productivity features:
Jump to event/class/id definitions from controller class
Create event/class /id definitions from controller class
Create new view and style files through context menu
21. Active Committers
• Opened up Appcelerator
Community
• Reduced active PRs backlog
by 50%
• Invited Open-Source module
committers
• Move wiki guides public and
invite comments
• Prettify public spaces
22. Automation andTesting
ti-mocha
Framework for running Mocha-based unit tests inTitanium
Beta stage
https://github.com/tonylukasavage/ti-mocha
tio2
Framework for runningTi-mocha tests on emulators and devices
and reporting results
Alpha stage
https://github.com/appcelerator/tio2
23. That was the first half (H1) of 2014.
How about H2…or H6?
24. Ti.Next
Next major release ofTitanium (aka 4.0)
Significant re-architecture ofTitanium
(Mostly) same API
Huge performance boost and reduction in app size
Improved extensibility
Windows support
25.
26. Ti.Next Foundation
Foundation ofTi.Next is a new compiler, built from
the ground up for performance, extensibility
Open Source under Apache Public License v2
http://github.com/appcelerator/hyperloop
Over a year of R&D already on Hyperloop (6th
generation compiler under development)
27. Hyperloop fundamentally changes game
Hyperloop will allow mixed modes of integration:
Titanium traditional (all-in)
Titanium in Native
Native inTitanium
Titanium in other frameworks (Phonegap,
Xamarin)
Pure Native (Hyperloop only)
28. What is Hyperloop?
Hyperloop turns JS code into native code by mapping the
native APIs into JS syntax
Hyperloop will be (mainly) used byTitanium platform
developers to buildTitanium APIs or modules
A more traditional compiler architecture:
Front-end (parse and transform JS AST)
Back-end (generate native, platform specific code)
+Metabase (metadata about target platform)
29. Hyperloop iOS Example
“use hyperloop”
var view = new UIView(CGRectMake(100,100,50,50));
view.backgroundColor = UIColor.redColor();
var window = new UIWindow();
window.addSubview(view);
window.makeKeyAndVisible()
Need to revist (dn’t pollute the global namespace)
30. Hyperloop Front-end
Front-end turns JS code into an AST and then
performs transformations on the code to make it
more suitable for native generation.
32. Example Generation
app.js:
var b = 1;
HL_jscode.mm:
// variable:12
auto b = JSValueMakeNumber(ctx,1);
auto var13 = JSStringCreateWithUTF8CString("b");
JSObjectSetProperty(ctx,object,var13,b,0,exception);
CHECK_EXCEPTION(exception);
34. Hyperloop Back-end
Back-end generates C/C++ code for target platform
~90% of the back-end code is reusable for all
platforms supported
10% is basically specific syntax for things like
calling methods, properties, etc. and other
platform specific nuances (differences in file
extensions, etc.)
35. Hyperloop Metabase
Defined platform APIs in JSON format
Automatically generated for all platforms supported
Complete tree of a platform’s public API (classes,
functions, types, etc.)
Supports C and platform-specific languages (Objective-
C, Java, etc.)
Uses Clang (+platform specific tools) to generate
Rich metadata about the platform
39. Hyperloop JS engine
Unified JS engine for all platforms based on
JavaScriptCore
iOS 7.0+ comes with engine installed
Port forWindows and Android
Performance testing showed JSC was basically native
speed
40. Hyperloop code re-writing
Huge blocks of code are optimized into pure native
code generation
No penalty for “JS bridge” like inTi.current
JS engine runs on main UI thread:
No thread context switching / creation overhead
Will provide background worker for asynchronous
non-blocking tasks
47. Ti.Next
Titanium APIs are being implemented using Hyperloop and
compiled using Hyperloop compiler
Titanium APIs (and native APIs) will be first-class JS objects
Goal is to generate API interfaces, test cases from API
documentation
Full Node.js require implementation
Will likely deprecate platform specific APIs and provide a
compatibility module
Likely will reduce size of overall API
Titanium APIs will use module design
48. Ti.Next Modules
Migration path for modules (still trying to determine)
Packaging likely will change and modules will be
expressed in Hyperloop syntax
Possibility of a module compatibility shim
49. Hyperloop inTi.Current
Hyperloop is already being used inTi.Current!
URLSession API inTitanium 3.2
CoreMotion API inTitanium 3.3
https://github.com/appcelerator/hyperloop/wiki/Us
ing-Hyperloop-code-in-Ti.Current-SDK
Probably our compatibility layer (so API will be
same to developer, implementation different)
50. When?
Gen6 compiler close to release:
Almost have enough completed for all 3 major
backends (iOS, Android,Windows) beforeTi.Next
API framework design can start
Likely 6+ months from this point
Target is beta before end of year…could be sooner
Likely Windows Developer Preview Release first
51. iOS 8
Similar approach to iOS 7. Pre-releases track public betas
In planning stages now. Gathering feedback on areas of
interest
Capability of adding interactive widgets to the notifications area
Health Kit / Home Kit
Adding Extensions to the Share Sheet
Multiple keyboards
Camera APIs /Touch API
Not a boring release!
3.2 came out in December….moving to 6-month release cycles.
Talk about 3.2 features and how those continue in 3.3.0
Build out CLI. Developers use their own tooling
Custom TSS queries
<Annotation> tag support in maps, plus data-binding for annotation generation: ALOY-800
Widget themes: ALOY-387
Customizing the Android ActionBar using the <Menu> tag: ALOY-784
Creating Date/Time pickers: ALOY-263
Keyboard and returnkey type shortcuts: ALOY-927
<TextField id="txt" keyboardType="DECIMAL_PAD" returnKeyType="DONE"/>
"#txt": {
keyboardType: "DECIMAL_PAD",
returnKeyType: "DONE"
}
deploy.json is baked into the APK (no more need for an SD card)
No more version number formatting for iOS and Android, uses exactly what’s in the tiapp.xml (except CFBundleShortVersionString is truncated to 3 digits)
Genymotion officially supported (includes Debugging)
Debug Android apps in Genymotion emulator
Intelligent prompting
Push to multiple devices simultaneously
Invest in R & D. Dogfood it ourselves. Alloy command model. Refactored repository. Compiler pipeline. Decoupled. DP1: Front-end, backend. Now: Mutliple backends. Want to engage the community on how to beuild ti.next.
Titanium in native: Drag in a hyperloop-created piece into your native application
DP1: Non-standard kewords. Now pure ECMAScript 5 syntax
100% standard ECMAScript
Removal of .hjs file type
Disambiguation done automatically wherever possible
Note reliance on “Auto” here
Now using C++ 11
Can use "auto" everywhere
Point clang to custom framework, add to metabase, then link in library as part of build process
Why JavaScriptCore over V8? V8 is less secure—you can’t turn off jitting.
Things that you can’t move to native code are the things that you can’t JIT
JavaScriptCore and V8 basically comparable in speeds.
Time not spent in the JavaScript engine.
If there were a hotspot (i.e. OpenCL, OpenGLShaders, just write a native extension and reference it)
In Ti.Next, you’ll be able to treat objects like actual JS objects
Application code will be compiled via javascript
Example of conditionals
Check out transformed JavaScript (run on example)