ݺߣ

ݺߣShare a Scribd company logo
Hyperloop - new frontiers 
c.svensson@cgi.com, @connysvensson 
dev:mobile 22 May 2014 
Conny Svensson 
Managing Architect and Strategist Mobility
Hyperloop
Number of developers 
580 000
Number of Cloud API calls 
28 000 000 000
Fortune 100 companies using Titanium 
68% of F100
Appcelerator offerings
Titanium Studio IDE 
? Support for iOS, Android, BlackBerry, Tizen, Denso 
and mobile web with over 5,000 device and mobile OS APIs 
? Single JavaScript codebase 
? On-device debugger, live UI editor, code analyzer 
and performance profiler
Analytics 
? View the live health and availability of all the mobile apps in real-time 
? Real-time activity reporting for mobile projects including 
pre-deployment readiness and post-deployment success 
? Historical rolling timeframe reporting with trend analysis 
? Monitor end-user exceptions and crashes as they happen
API 
? API SDK provides for rapid development of custom APIs to 
mobilize any backend data source 
? Support for SAP, Oracle, Salesforce.com, Microsoft SharePoint 
and Microsoft Dynamics 
? Connectors to popular applications like LinkedIn, Yammer, 
PayPal, DropBox, Google Calendar, Facebook, Twitter, and many others 
? Ready access to common mobile services including push notification, 
photo storage, authentication and key value pair store
Whats next?
Ti.Next (Titanium 4.0) 
?Significant re-architecture of Titanium 
?(Mostly) same API 
?Incredible performance boost and reduction in app size 
?Improved Extensibility 
?Windows support
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 v2 
?http://github.com/appcelerator/hyperloop 
?Over a year of R&D already on Hyperloop (4th generation 
compiler under development)
Hyperloop integrations 
?Titanium traditional (all-in) 
?Titanium in Native 
?Native in Titanium 
?Titanium in other frameworks (PhoneGap, Xamarin) 
?Pure Native (Hyperloop only)
What is Hyperloop? 
?Hyperloop turns JS code into native code by mapping the 
native APIs into JS syntax 
?Hyperloop will be (mainly) used by Titanium platform 
developers to build Titanium APIs or modules 
?A more traditional compiler architecture: 
C Front-end (parse and transform JS AST) 
C Back-end (generate native, platform specific code) 
C +Metabase (metadata about target platform)
Hyperloop iOS example 
! 
! 
@import('Foundation'); 
@import('UIKit'); 
! 
var 
view 
= 
new 
UIView(CGRectMake(100,100,50,50)); 
view.backgroundColor 
= 
UIColor.redColor(); 
var 
window 
= 
new 
UIWindow(); 
window.addSubview(view); 
window.makeKeyAndVisible()
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
Example of Front-end translations 
! 
Foo.bar 
= 
1 
Foo_set_bar(1) 
! 
Foo.bar() 
Foo_bar() 
! 
var 
foo 
= 
new 
Bar() 
Bar_constructor() 
! 
foo.bar(1) 
Bar_bar(foo, 
1)
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.)
Hyperloop Metabase 
?Defined platform APIs in JSON format 
?Automatically generate for all platforms supported 
?Large tree of all supported APIs (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
Hyperloop Metabase iOS example
Hyperloop Metabase Android example
Hyperloop JS engine 
?Unified JS engine for all platforms based on 
JavaScriptCore 
C iOS 7.0+ comes with engine installed 
C Port for Windows and Android 
! 
?Performance testing showed JSC was basically native 
speed
Hyperloop code rewriting 
?Huge blocks of code will be optimized into pure native 
code generation 
?No penalty for JS bridge like in current Titanium 
?JS engine runs on main UI Thread: 
C No thread context switching / creation overhead 
C Will provide background worker for asynchronous non-blocking 
tasks
The proof is in the pudding! 
DEMO
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
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
Welcome aboard! 
c.svensson@cgi.com, @connysvensson

More Related Content

What's hot (20)

Rapid application development con titanium appcelerator
Rapid application development con titanium appceleratorRapid application development con titanium appcelerator
Rapid application development con titanium appcelerator
Giorgio Mandolini
?
Mule raml
Mule ramlMule raml
Mule raml
Ramakrishna Kapa
?
Introduction to xamarin
Introduction to xamarin  Introduction to xamarin
Introduction to xamarin
Sumantro Mukherjee
?
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013
Jeff Haynie
?
Cross platform development
Cross platform developmentCross platform development
Cross platform development
dftaiwo
?
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
Software Infrastructure
?
Nativescript
NativescriptNativescript
Nativescript
Software Infrastructure
?
Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0
joescars
?
Introduction to NativeScript - BuildTruly Native Apps using JavaScript
Introduction to NativeScript - BuildTruly Native Apps using JavaScriptIntroduction to NativeScript - BuildTruly Native Apps using JavaScript
Introduction to NativeScript - BuildTruly Native Apps using JavaScript
Lohith Goudagere Nagaraj
?
Dayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webeditionDayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webedition
Martin Davis III
?
ȴYbXamarin / Utilize existing assets as Xamarin library
ȴYbXamarin / Utilize existing assets as Xamarin libraryȴYbXamarin / Utilize existing assets as Xamarin library
ȴYbXamarin / Utilize existing assets as Xamarin library
Yusuke Yamada
?
Native Script by Sebastian Witalec
Native Script by Sebastian WitalecNative Script by Sebastian Witalec
Native Script by Sebastian Witalec
Simone Basso
?
.Net Core
.Net Core.Net Core
.Net Core
Software Infrastructure
?
Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016
Jad Salhani
?
.NET (r)evolution
.NET (r)evolution.NET (r)evolution
.NET (r)evolution
William S. Rodriguez
?
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHEREECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
European Collaboration Summit
?
OSGi on Android - Value Proposition
OSGi on Android - Value PropositionOSGi on Android - Value Proposition
OSGi on Android - Value Proposition
Joachim Ritter
?
Explore the new development instruments for Arduino with PlatformIO ecosystem
Explore the new development instruments for Arduino with PlatformIO ecosystemExplore the new development instruments for Arduino with PlatformIO ecosystem
Explore the new development instruments for Arduino with PlatformIO ecosystem
Ivan Kravets
?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
Clint Edmonson
?
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
James Pearce
?
Rapid application development con titanium appcelerator
Rapid application development con titanium appceleratorRapid application development con titanium appcelerator
Rapid application development con titanium appcelerator
Giorgio Mandolini
?
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013
Jeff Haynie
?
Cross platform development
Cross platform developmentCross platform development
Cross platform development
dftaiwo
?
Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0Getting Started with ASP.net Core 1.0
Getting Started with ASP.net Core 1.0
joescars
?
Introduction to NativeScript - BuildTruly Native Apps using JavaScript
Introduction to NativeScript - BuildTruly Native Apps using JavaScriptIntroduction to NativeScript - BuildTruly Native Apps using JavaScript
Introduction to NativeScript - BuildTruly Native Apps using JavaScript
Lohith Goudagere Nagaraj
?
Dayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webeditionDayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webedition
Martin Davis III
?
ȴYbXamarin / Utilize existing assets as Xamarin library
ȴYbXamarin / Utilize existing assets as Xamarin libraryȴYbXamarin / Utilize existing assets as Xamarin library
ȴYbXamarin / Utilize existing assets as Xamarin library
Yusuke Yamada
?
Native Script by Sebastian Witalec
Native Script by Sebastian WitalecNative Script by Sebastian Witalec
Native Script by Sebastian Witalec
Simone Basso
?
Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016
Jad Salhani
?
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHEREECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
European Collaboration Summit
?
OSGi on Android - Value Proposition
OSGi on Android - Value PropositionOSGi on Android - Value Proposition
OSGi on Android - Value Proposition
Joachim Ritter
?
Explore the new development instruments for Arduino with PlatformIO ecosystem
Explore the new development instruments for Arduino with PlatformIO ecosystemExplore the new development instruments for Arduino with PlatformIO ecosystem
Explore the new development instruments for Arduino with PlatformIO ecosystem
Ivan Kravets
?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
Clint Edmonson
?
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
James Pearce
?

Viewers also liked (7)

Autolayout
AutolayoutAutolayout
Autolayout
Jigar Maheshwari
?
Verb to be
Verb to beVerb to be
Verb to be
jmezh11
?
Summer
SummerSummer
Summer
Yanbu University College
?
Negative game
Negative gameNegative game
Negative game
jmezh11
?
Verb to be affirmative and negative forms
Verb to be  affirmative and negative formsVerb to be  affirmative and negative forms
Verb to be affirmative and negative forms
Snia Fernandes
?
Present simple
Present simplePresent simple
Present simple
MonaAlMenhali
?
Basic phonetics
Basic phoneticsBasic phonetics
Basic phonetics
jmezh11
?

Similar to Hyperloop (20)

Developing a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDeveloping a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&Cordova
Damir Beylkhanov
?
TiConf EU 2014
TiConf EU 2014TiConf EU 2014
TiConf EU 2014
Ingo Muschenetz
?
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
Adam Paxton
?
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
Fokke Zandbergen
?
Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript
Leonardo Farias
?
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
Techday7
?
Build Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilderBuild Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilder
Jeffrey T. Fritz
?
Monkey space 2013
Monkey space 2013Monkey space 2013
Monkey space 2013
Miguel de Icaza
?
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challenge
Bronco Oostermeyer
?
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
?
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
?
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Ermias Bayu
?
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
?
Venkata
VenkataVenkata
Venkata
Venkata Kumar
?
Introduction to Cross Platform Development with Xamarin/ Visual Studio
Introduction to Cross Platform Development with Xamarin/ Visual StudioIntroduction to Cross Platform Development with Xamarin/ Visual Studio
Introduction to Cross Platform Development with Xamarin/ Visual Studio
IndyMobileNetDev
?
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
?
The Future of Cross-Platform is Native
The Future of Cross-Platform is NativeThe Future of Cross-Platform is Native
The Future of Cross-Platform is Native
Justin Mancinelli
?
Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
Maulik Bamania
?
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
Syed Owais Ali Chishti
?
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststem
Sumit Kataria
?
Developing a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&CordovaDeveloping a native mobile apps using Ionic&Cordova
Developing a native mobile apps using Ionic&Cordova
Damir Beylkhanov
?
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
Adam Paxton
?
Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript
Leonardo Farias
?
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
Techday7
?
Build Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilderBuild Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilder
Jeffrey T. Fritz
?
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challenge
Bronco Oostermeyer
?
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
?
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
?
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Ermias Bayu
?
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
?
Introduction to Cross Platform Development with Xamarin/ Visual Studio
Introduction to Cross Platform Development with Xamarin/ Visual StudioIntroduction to Cross Platform Development with Xamarin/ Visual Studio
Introduction to Cross Platform Development with Xamarin/ Visual Studio
IndyMobileNetDev
?
The Future of Cross-Platform is Native
The Future of Cross-Platform is NativeThe Future of Cross-Platform is Native
The Future of Cross-Platform is Native
Justin Mancinelli
?
Hybrid mobile application with Ionic
Hybrid mobile application with IonicHybrid mobile application with Ionic
Hybrid mobile application with Ionic
Maulik Bamania
?
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststem
Sumit Kataria
?

More from Jigar Maheshwari (8)

Poster iphones
Poster iphonesPoster iphones
Poster iphones
Jigar Maheshwari
?
Xcode 6 release_notes
Xcode 6 release_notesXcode 6 release_notes
Xcode 6 release_notes
Jigar Maheshwari
?
Introducing collection views - Mark Pospesel
Introducing collection views - Mark PospeselIntroducing collection views - Mark Pospesel
Introducing collection views - Mark Pospesel
Jigar Maheshwari
?
Blocks and GCD(Grand Central Dispatch)
Blocks and GCD(Grand Central Dispatch)Blocks and GCD(Grand Central Dispatch)
Blocks and GCD(Grand Central Dispatch)
Jigar Maheshwari
?
Get step-by-step instructions on implementing notifications in your apps.
Get step-by-step instructions on implementing notifications in your apps.Get step-by-step instructions on implementing notifications in your apps.
Get step-by-step instructions on implementing notifications in your apps.
Jigar Maheshwari
?
iOS HIG
iOS HIGiOS HIG
iOS HIG
Jigar Maheshwari
?
UIKit User Interface Catalog ios7
UIKit  User Interface Catalog ios7UIKit  User Interface Catalog ios7
UIKit User Interface Catalog ios7
Jigar Maheshwari
?
iOS 7 Transition guide
iOS 7 Transition guideiOS 7 Transition guide
iOS 7 Transition guide
Jigar Maheshwari
?
Introducing collection views - Mark Pospesel
Introducing collection views - Mark PospeselIntroducing collection views - Mark Pospesel
Introducing collection views - Mark Pospesel
Jigar Maheshwari
?
Blocks and GCD(Grand Central Dispatch)
Blocks and GCD(Grand Central Dispatch)Blocks and GCD(Grand Central Dispatch)
Blocks and GCD(Grand Central Dispatch)
Jigar Maheshwari
?
Get step-by-step instructions on implementing notifications in your apps.
Get step-by-step instructions on implementing notifications in your apps.Get step-by-step instructions on implementing notifications in your apps.
Get step-by-step instructions on implementing notifications in your apps.
Jigar Maheshwari
?
UIKit User Interface Catalog ios7
UIKit  User Interface Catalog ios7UIKit  User Interface Catalog ios7
UIKit User Interface Catalog ios7
Jigar Maheshwari
?

Hyperloop

  • 1. Hyperloop - new frontiers c.svensson@cgi.com, @connysvensson dev:mobile 22 May 2014 Conny Svensson Managing Architect and Strategist Mobility
  • 4. Number of Cloud API calls 28 000 000 000
  • 5. Fortune 100 companies using Titanium 68% of F100
  • 7. Titanium Studio IDE ? Support for iOS, Android, BlackBerry, Tizen, Denso and mobile web with over 5,000 device and mobile OS APIs ? Single JavaScript codebase ? On-device debugger, live UI editor, code analyzer and performance profiler
  • 8. Analytics ? View the live health and availability of all the mobile apps in real-time ? Real-time activity reporting for mobile projects including pre-deployment readiness and post-deployment success ? Historical rolling timeframe reporting with trend analysis ? Monitor end-user exceptions and crashes as they happen
  • 9. API ? API SDK provides for rapid development of custom APIs to mobilize any backend data source ? Support for SAP, Oracle, Salesforce.com, Microsoft SharePoint and Microsoft Dynamics ? Connectors to popular applications like LinkedIn, Yammer, PayPal, DropBox, Google Calendar, Facebook, Twitter, and many others ? Ready access to common mobile services including push notification, photo storage, authentication and key value pair store
  • 11. Ti.Next (Titanium 4.0) ?Significant re-architecture of Titanium ?(Mostly) same API ?Incredible performance boost and reduction in app size ?Improved Extensibility ?Windows support
  • 12. 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 v2 ?http://github.com/appcelerator/hyperloop ?Over a year of R&D already on Hyperloop (4th generation compiler under development)
  • 13. Hyperloop integrations ?Titanium traditional (all-in) ?Titanium in Native ?Native in Titanium ?Titanium in other frameworks (PhoneGap, Xamarin) ?Pure Native (Hyperloop only)
  • 14. What is Hyperloop? ?Hyperloop turns JS code into native code by mapping the native APIs into JS syntax ?Hyperloop will be (mainly) used by Titanium platform developers to build Titanium APIs or modules ?A more traditional compiler architecture: C Front-end (parse and transform JS AST) C Back-end (generate native, platform specific code) C +Metabase (metadata about target platform)
  • 15. Hyperloop iOS example ! ! @import('Foundation'); @import('UIKit'); ! var view = new UIView(CGRectMake(100,100,50,50)); view.backgroundColor = UIColor.redColor(); var window = new UIWindow(); window.addSubview(view); window.makeKeyAndVisible()
  • 16. 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
  • 17. Example of Front-end translations ! Foo.bar = 1 Foo_set_bar(1) ! Foo.bar() Foo_bar() ! var foo = new Bar() Bar_constructor() ! foo.bar(1) Bar_bar(foo, 1)
  • 18. 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.)
  • 19. Hyperloop Metabase ?Defined platform APIs in JSON format ?Automatically generate for all platforms supported ?Large tree of all supported APIs (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
  • 22. Hyperloop JS engine ?Unified JS engine for all platforms based on JavaScriptCore C iOS 7.0+ comes with engine installed C Port for Windows and Android ! ?Performance testing showed JSC was basically native speed
  • 23. Hyperloop code rewriting ?Huge blocks of code will be optimized into pure native code generation ?No penalty for JS bridge like in current Titanium ?JS engine runs on main UI Thread: C No thread context switching / creation overhead C Will provide background worker for asynchronous non-blocking tasks
  • 24. The proof is in the pudding! DEMO
  • 25. 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
  • 26. 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