ticonf eu 2014
TRANSCRIPT
![Page 1: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/1.jpg)
TiConf EU AmsterdamINGO MUSCHENETZSr. Director of Platform and Tooling, Appcelerator@bingomar
![Page 2: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/2.jpg)
About Me
Currently responsible for all “Client” productsLed design of Aptana, an open-source Web IDEAptana acquired by Appcelerator. Aptana folded into Titanium Studio10+ years fostering vibrant open source communitiesArchitected web-based framework for secure DoD healthcare applications (acquired by Humana)
![Page 3: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/3.jpg)
We can’t build it alone…
![Page 4: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/4.jpg)
The Titanium CommunityA FORCE FOR GOOD
![Page 5: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/5.jpg)
TITANIUM IS GROWING UP
![Page 6: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/6.jpg)
NUMBER OF UNIQUE MOBILE DEVICES
250,000,000
![Page 7: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/7.jpg)
NUMBER OF REGISTERED TITANIUM DEVELOPERS
604,000
![Page 8: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/8.jpg)
NUMBER OF CLOUD API REQUESTS
30,000,000,000
![Page 9: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/9.jpg)
FORTUNE 100 COMPANIES USING TITANIUM
68% of F100
![Page 10: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/10.jpg)
![Page 11: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/11.jpg)
The road ahead
![Page 12: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/12.jpg)
Upcoming Titanium Release
3.3.0 – targeted for mid-July800+ issues addressed (50% bugs, 50% features)Continued performance & parity improvements
![Page 13: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/13.jpg)
Ti.include()[gone!]*
*deprecated in 3.3.0. Will go away in 3.4.0
![Page 14: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/14.jpg)
Alloy
Custom TSS queries<Annotation> tag support in maps, plus data-binding for annotation generationWidget themesCustomizing the Android ActionBar using the <Menu> tagCreating Date/Time pickersKeyboard and returnkey type shortcuts
![Page 15: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/15.jpg)
Demo: AlloyCUSTOM TSS QUERIES
![Page 16: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/16.jpg)
Custom TSS Queries
'#boydlee': {image: '/boydlee.jpg',width: '75%',top: 10,borderWidth: 3
}
/* CUSTOM TSS QUERIES */
'#boydlee[if=Alloy.Globals.isTalliPhone]': {image: '/boydlee0.jpg',borderColor: '#4682b4'
}
'#boydlee[if=Alloy.Globals.isGalaxyS5]': {image: '/boydlee1.jpg',borderColor: '#70a050'
}
![Page 17: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/17.jpg)
![Page 18: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/18.jpg)
CLI
Windows HybridProject templatesConsolidated module projectsdeploy.json is baked into the APKNo more version number formatting for iOS and AndroidDisplay iOS logging when running app on deviceGenymotion officially supported (includes debugging)
![Page 19: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/19.jpg)
SDK
NSURLConnectionAppCompat libraryCoreMotion moduleView Clipping/View ShadowsFull-text search of documentationBlackBerry updates
![Page 20: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/20.jpg)
Studio
Push to device is default (no iTunes sync)Improved Studio Packaging (smaller, more robust)Configuring Studio proxy configures CLI proxyAlloy productivity features:
Jump to event/class/id definitions from controller classCreate event/class /id definitions from controller classCreate new view and style files through context menu
![Page 21: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/21.jpg)
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
![Page 22: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/22.jpg)
Automation and Testing
ti-mochaFramework for running Mocha-based unit tests in TitaniumBeta stagehttps://github.com/tonylukasavage/ti-mocha
tio2Framework for running Ti-mocha tests on emulators and devices and reporting resultsAlpha stagehttps://github.com/appcelerator/tio2
![Page 23: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/23.jpg)
That was the first half (H1) of 2014.How about H2 …or H6?
![Page 24: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/24.jpg)
Ti.Next
Next major release of Titanium (aka 4.0)Significant re-architecture of Titanium(Mostly) same APIHuge performance boost and reduction in app sizeImproved extensibilityWindows support
![Page 25: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/25.jpg)
![Page 26: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/26.jpg)
Ti.Next Foundation
Foundation of Ti.Next is a new compiler, built from the ground up for performance, extensibility
Open Source under Apache Public License v2http://github.com/appcelerator/hyperloopOver a year of R&D already on Hyperloop (6th generation compiler under development)
![Page 27: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/27.jpg)
Hyperloop fundamentally changes game
Hyperloop will allow mixed modes of integration:Titanium traditional (all-in)Titanium in NativeNative in TitaniumTitanium in other frameworks (Phonegap, Xamarin)Pure Native (Hyperloop only)
![Page 28: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/28.jpg)
What is Hyperloop?
Hyperloop turns JS code into native code by mapping the native APIs into JS syntaxHyperloop will be (mainly) used by Titanium platform developers to build Titanium APIs or modulesA more traditional compiler architecture:
Front-end (parse and transform JS AST)Back-end (generate native, platform specific code)+Metabase (metadata about target platform)
![Page 29: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/29.jpg)
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)
![Page 30: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/30.jpg)
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.
![Page 31: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/31.jpg)
JavaScript to Native
Ti.Current
app.js
Titanium SDK (JS)
Titanium SDK
(Native)
Ti.Next (Dev-Time)
app.js
Titanium SDK (JS)
Ti.SDK (Native)
Ti.Next (Runtime)
Ti.SDK (Native)
app.js (JS)
app.js (Native)
Ti.SDK (JS)
![Page 32: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/32.jpg)
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);
![Page 33: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/33.jpg)
JavaScript to Native Compilation
Ti.Current FutureImproved HeuristicsHyperloop
(H1)Hyperloop
(H6)
JavaScript
Native
JavaScriptCore
![Page 34: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/34.jpg)
Hyperloop Back-end
Back-end generates C/C++ code for target platform
~90% of the back-end code is reusable for all platforms supported10% is basically specific syntax for things like calling methods, properties, etc. and other platform specific nuances (differences in file extensions, etc.)
![Page 35: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/35.jpg)
Hyperloop Metabase
Defined platform APIs in JSON formatAutomatically generated for all platforms supportedComplete 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 generateRich metadata about the platform
![Page 36: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/36.jpg)
Hyperloop Android Metabase example
"java.lang.String": { "package": "java.lang", "interfaces": [ "java.io.Serializable", "java.lang.Comparable", "java.lang.CharSequence" ], "superClass": "java.lang.Object", "attributes": [ "final", "public" ], "metatype": "class", "methods": { "<init>": [ { "exceptions": [], "args": [], "name": "<init>", "attributes": [ "public" ],
![Page 37: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/37.jpg)
Hyperloop iOS Metabase example
"NSString": { "metatype": "interface", "framework": "Foundation", "superClass": "NSObject", "protocols": [ "NSCopying", "NSMutableCopying", "NSSecureCoding" ], "name": "NSString", "methods": { "length": [ { "name": "length", "metatype": "method", "instance": true, "selector": "length", "returnType": "unsigned int", "returnSubtype": "NSUInteger", "requiresSentinel": false, "args": [] } ],
![Page 38: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/38.jpg)
Hyperloop Windows Metabase example
"Platform.String": { "methods": { ".ctor": [ { "attributes": [ "public", "hidebysig", "specialname", "rtspecialname", "instance", "runtime", "managed" ], "returnType": "void", "name": ".ctor", "args": [] } ], "modopt": [ { "attributes": [ "public", "hidebysig”,
![Page 39: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/39.jpg)
Hyperloop JS engine
Unified JS engine for all platforms based on JavaScriptCore
iOS 7.0+ comes with engine installedPort for Windows and Android
Performance testing showed JSC was basically native speed
![Page 40: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/40.jpg)
Hyperloop code re-writing
Huge blocks of code are optimized into pure native code generationNo penalty for “JS bridge” like in Ti.currentJS engine runs on main UI thread:
No thread context switching / creation overheadWill provide background worker for asynchronous non-blocking tasks
![Page 41: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/41.jpg)
Hyperloop Experimentation
git clone https://github.com/appcelerator/hyperloop.gitgit checkout v2.0.0./setup.shcd hyperloop-clisudo npm link
![Page 42: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/42.jpg)
Hyperloop Run (iOS)
cd <project directory>hyperloop clean library compile package launch --src=. --arch=i386
Interesting options:--dump-ir.hyperloop file, add { "obfuscate": false }
![Page 43: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/43.jpg)
Demo: Hyperloop On AndroidGENERATION 6 COMPILER (H6)
![Page 44: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/44.jpg)
![Page 45: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/45.jpg)
Demo: Hyperloop On WindowsGENERATION 6 COMPILER (H6)
![Page 46: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/46.jpg)
![Page 47: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/47.jpg)
Ti.Next
Titanium APIs are being implemented using Hyperloop and compiled using Hyperloop compiler
Titanium APIs (and native APIs) will be first-class JS objectsGoal is to generate API interfaces, test cases from API documentationFull Node.js require implementationWill likely deprecate platform specific APIs and provide a compatibility moduleLikely will reduce size of overall APITitanium APIs will use module design
![Page 48: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/48.jpg)
Ti.Next Modules
Migration path for modules (still trying to determine)Packaging likely will change and modules will be expressed in Hyperloop syntaxPossibility of a module compatibility shim
![Page 49: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/49.jpg)
Hyperloop in Ti.Current
Hyperloop is already being used in Ti.Current!
URLSession API in Titanium 3.2CoreMotion API in Titanium 3.3https://github.com/appcelerator/hyperloop/wiki/Using-Hyperloop-code-in-Ti.Current-SDKProbably our compatibility layer (so API will be same to developer, implementation different)
![Page 50: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/50.jpg)
When?
Gen6 compiler close to release:Almost have enough completed for all 3 major backends (iOS, Android, Windows) before Ti.Next API framework design can startLikely 6+ months from this pointTarget is beta before end of year…could be soonerLikely Windows Developer Preview Release first
![Page 51: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/51.jpg)
iOS 8
Similar approach to iOS 7. Pre-releases track public betasIn planning stages now. Gathering feedback on areas of interest
Capability of adding interactive widgets to the notifications areaHealth Kit / Home KitAdding Extensions to the Share SheetMultiple keyboardsCamera APIs / Touch API
![Page 52: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/52.jpg)
TO NEW ADVENTURES
![Page 53: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/53.jpg)
Thank YouINGO MUSCHENETZ@bingomar
![Page 54: TiConf EU 2014](https://reader031.vdocuments.net/reader031/viewer/2022011722/53f51c5c8d7f7297528ba444/html5/thumbnails/54.jpg)