Hyperloop
-
Upload
jigar-maheshwari -
Category
Mobile
-
view
128 -
download
2
description
Transcript of Hyperloop
![Page 1: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/1.jpg)
[email protected], @connysvensson
dev:mobile 22 May 2014Conny Svensson Managing Architect and Strategist Mobility
Hyperloop - new frontiers
![Page 2: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/2.jpg)
![Page 3: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/3.jpg)
Number of developers
580 000
![Page 4: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/4.jpg)
Number of Cloud API calls
28 000 000 000
![Page 5: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/5.jpg)
Fortune 100 companies using Titanium
68% of F100
![Page 6: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/6.jpg)
Appcelerator offerings
![Page 7: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/7.jpg)
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
![Page 8: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/8.jpg)
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
![Page 9: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/9.jpg)
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
![Page 10: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/10.jpg)
What’s next?
![Page 11: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/11.jpg)
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
![Page 12: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/12.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 v2
•http://github.com/appcelerator/hyperloop
•Over a year of R&D already on Hyperloop (4th generation compiler under development)
![Page 13: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/13.jpg)
Hyperloop integrations•Titanium traditional (all-in)
•Titanium in Native
•Native in Titanium
•Titanium in other frameworks (PhoneGap, Xamarin)
•Pure Native (Hyperloop only)
![Page 14: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/14.jpg)
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: – Front-end (parse and transform JS AST) – Back-end (generate native, platform specific code) – +Metabase (metadata about target platform)
![Page 15: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/15.jpg)
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()
![Page 16: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/16.jpg)
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
![Page 17: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/17.jpg)
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)
![Page 18: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/18.jpg)
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.)
![Page 19: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/19.jpg)
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
![Page 20: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/20.jpg)
Hyperloop Metabase iOS example
![Page 21: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/21.jpg)
Hyperloop Metabase Android example
![Page 22: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/22.jpg)
Hyperloop JS engine•Unified JS engine for all platforms based on JavaScriptCore – iOS 7.0+ comes with engine installed – Port for Windows and Android
!
•Performance testing showed JSC was basically native speed
![Page 23: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/23.jpg)
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: – No thread context switching / creation overhead – Will provide background worker for asynchronous non-
blocking tasks
![Page 24: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/24.jpg)
The proof is in the pudding!
DEMO
![Page 25: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/25.jpg)
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
![Page 26: Hyperloop](https://reader033.fdocuments.in/reader033/viewer/2022060116/55813fb0d8b42a9b098b4d2a/html5/thumbnails/26.jpg)
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