10. UpcomingTitanium Release
3.3.0 – targeted for end of June
150+ bug fixes
Continued performance & parity improvements
ImprovedCLI capabilities:
Modules build
Push to device is default (no iTunes sync)
Improved intelligent prompting
Improved Studio Packaging (smaller, more robust)
11. Ti.Next
Next major release ofTitanium (aka 4.0)
Significant re-architecture ofTitanium
(Mostly) same API
Incredible performance boost and reduction in app
size
Improved Extensibility
Windows support
12.
13. 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 (4th
generation compiler under development)
14. 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)
15. 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)
16. 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()
17. Hyperloop Front-end
Front-end uses UglifyJS to turn JS code into an AST
and then perform transformations on the code to
make it more suitable for native generation
18. Example of Front-end transformations
Foo.bar = 1 Foo_set_bar(1)
Foo.bar() Foo_bar()
var foo = new Bar() Bar_constructor()
foo.bar(1) Bar_bar(foo, 1)
19. 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.)
20. Hyperloop metabase
Defined platform APIs in JSON format
Automatically generate for all platforms supported
Large tree of all supportedAPIs (classes, functions,
types, etc.)
Supports both C and platform specific languages
(Objective-C, Java, etc.)
Uses Clang (+platform specific tools) to generate
Rich metadata about the platform
23. 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
24. Hyperloop code re-writing
Huge blocks of code will be optimized into pure
native code generation
No penalty for “JS bridge” like inTi.current
JS engine runs on main UIThread:
No thread context switching / creation overhead
Will provide background worker for asynchronous
non-blocking tasks
26. Ti.Next
Titanium APIs are being re-written using Hyperloop JS syntax 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
27. 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
29. Ti.When?
No specific date yet – trying to finish gen4 compiler:
30-45+ days from having enough completed for all
3 major backends (iOS, Android,Windows) before
Ti.Next API framework design can start
Likely 6-9 months from this point
Target is beta before end of year / could be sooner
Likely Windows Developer Preview Release first