Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Appcelerator Hyperloop: Overview & Architecture

Hans Knoechel
February 03, 2016
130

Appcelerator Hyperloop: Overview & Architecture

Hans Knoechel

February 03, 2016
Tweet

Transcript

  1. About Me Hans Knoechel 24 years old Studying Software Engineering

    (Osnabrueck, Germany) Titanium developer since 2011 45+ Apps built with Titanium Mobile iOS-Developer at Appcelerator since July 2015 Member of the Hyperloop working-group
  2. Agenda Current Situation Hyperloop Overview Introduction Requirements Functionality Hyperloop Architecture

    Native Wrapper Metabase CLI Hyperloop Module Development Architecture (CSPEC) Possibilities (Current) Limits Demo
  3. Current Situation Mobile applications using Titanium Mobile Powerful cross-plaform framework

    Native modules using Objective-C & Java 2 required environments for module development (Advanced) knowledge in Java/Objective-C required Core API based on Proxy system Limited API coverage Possible delay after native OS releases because of missing wrappers
  4. Hyperloop Overview - Introduction Use native APIs in JavaScript No

    Objective-C (iOS) / Java (Android) required No proxy backend programming required Combine Titanium Mobile and Hyperloop Add a native view to a Ti.UI.* view (and vice versa) Use 3rd-Party libraries including CocoaPods (iOS) Improved dependency management Extend with Objective-C and Swift source 3rd-Party libraries on Android using AAR‘s and JAR‘s
  5. Hyperloop Overview - Requirements Project requirements Titanium Mobile SDK 5.2.0+

    Hyperloop 1.x module & plugin <run-on-main-thread> enabled <use-jscore-framework> enabled Other requirements iOS: 9.x SDK (or later) Android: API level 23 (or later) JavaScript knowledge
  6. Hyperloop Architecture – Native Wrapper Native Titanium Mobile module Handle

    Objective-C / Java objects Manage new/existing contexts Receive wrapper (using the memory address) Map data types Protect current Hyperloop context from GC Unit testing
  7. Hyperloop Architecture – Metabase Used for Hyperloop iOS & Android

    Parse native classes Compute native classes, properties etc. in AST Generate JS objects to be called from the frontend Also used to parse 3rd-Party libraries CocoaPods, local libraries
  8. Hyperloop Architecture – CLI Validate Hyperloop requirements Generate metabase Look

    for local resoures (Libraries, XIB‘s, etc.) Compile resources Inject in Xcode project Hook into titanium build system
  9. Hyperloop Module Development - Possibilities Extend existing Titanium apps without

    modification Extend the Titanium Mobile SDK without proxies Cross-platform without multiple native projects Write CommonJS modules to expose a public API Use drop-in native libraries CocoaPods (iOS) AAR‘s, JAR‘s (Android)
  10. Hyperloop Module Development - Architecture Hyperloop CSPEC on GitHub (http://is.gd/Z7OccS)

    New configuration file (very similar to appc.js) Versioning platform-based Module ID, author, guid, etc. New module project structure Combining multiple module projects in one
  11. Hyperloop Module Development - Limits Still need to know about

    the iOS/Android frameworks CocoaTouch API Android API Currently: Import of Hyperloop in Titanium Mobile project required to use Hyperloop modules Open issue with embedded local third-party libraries on iOS You found a bug? File a JIRA-ticket! J