cross-platform native apps in java (budapest.mobile)

Post on 16-Apr-2017

215 Views

Category:

Software

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

MIGERAN - SMART SOFTWARE SOLUTIONS

CROSS-PLATFORM NATIVE APPS IN JAVAAn Introduction to the Intel Multi-OS Engine

Dr. Annamária Mattasits CEO / Co-Founder

Gergely Kis CTO / Co-Founder

MIGERAN - SMART SOFTWARE SOLUTIONS

A TASTE OF MOEGraffiti VR - Cross-Platform Virtual Reality App In Java

2

MIGERAN - SMART SOFTWARE SOLUTIONS

INTRODUCTION

• We started at Siemens - C65 and X75 generations • Started our company in 2007

• Outsourced Software Development • Diverse Projects

• Mobile App & Platform Development • Android, iOS, BB10, BB Classic, J2ME

• Embedded Linux: C/C++, Asm on ARM, MIPS • Web / Server: Java EE

• Built on Teleworking

Mobile Development since 2004

3

MIGERAN - SMART SOFTWARE SOLUTIONS

THE MOBILE CHALLENGETarget multiple platforms

4

Source: Vision Mobile

MIGERAN - SMART SOFTWARE SOLUTIONS

THE MOBILE CHALLENGEDeploy the same app on multiple platforms

5

Rewrite from Scratch Go Cross-Platform

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript

Web App in a Box

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript

Web App in a Box Native UI

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript

Web App in a Box Native UI

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET)

Web App in a Box Native UI

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET)

Web App in a Box Native UI

Xamarin

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin RoboVM

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin RoboVM

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin RoboVM Codename One

React Native Titanium

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin RoboVM Codename One

React Native TitaniumIntel MOE

MIGERAN - SMART SOFTWARE SOLUTIONS

GO CROSS-PLATFORMThe Quest for the ONE TRUE Platform

6

JavaScript C# (.NET) Java

Web App in a Box Native UI

Xamarin RoboVM Codename One

React Native TitaniumIntel MOE

Intel XDK

MIGERAN - SMART SOFTWARE SOLUTIONS

OUR CHOICE: USE JAVA

• Most of our codebase was in Java • J2ME, Classic BlackBerry, Android

• Java is native on Android • Don't like reinventing the wheel...and debugging

it all over again • Native UI

• Customers did not like Cross-Platform UIs • Great development tools

• Debugger, IDEs, Native API access, UI Designer

And design apps The Right WayTM

7

Business Logic (Model)

View Model

User Interface

Platform Dependent

Native View

MIGERAN - SMART SOFTWARE SOLUTIONS

THE BIRTH OF MIGERAN FOR IOSMigeran for iOS was our first own Product

8

Migeran for iOS

• Since 2009, we used XMLVM • Migeran Development started in 2013

• Runtime based on Android ART • Nat/J

• Java to native bindings with automated generator • Full iOS API mapping

• Eclipse and later Android Studio / IDEA integration • First public release at the end of 2014 • In 2015 Intel acquired Migeran for iOS and it is now part

of the Intel Multi-OS Engine

MIGERAN - SMART SOFTWARE SOLUTIONS

THE BIRTH OF MIGERAN FOR IOSMigeran for iOS was our first own Product

8

Migeran for iOS

• Since 2009, we used XMLVM • Migeran Development started in 2013

• Runtime based on Android ART • Nat/J

• Java to native bindings with automated generator • Full iOS API mapping

• Eclipse and later Android Studio / IDEA integration • First public release at the end of 2014 • In 2015 Intel acquired Migeran for iOS and it is now part

of the Intel Multi-OS Engine

Migeran is now

Intel Partner

MIGERAN - SMART SOFTWARE SOLUTIONS

INTEL MULTI-OS ENGINEEnd to End Solution for Cross-Platform Java Development

9

Java runtime based on Android ART Mac and Windows Host Support with On Device Debugging

Nat/J Java to native bindings with automated binding generator 100% Objective-C API Access

Use Xcode Storyboard Integration or iOS Designer in Android Studio

MIGERAN - SMART SOFTWARE SOLUTIONS

TIME SAVINGS WITH INTEL MOETop 25 Non-Game Apps in Google Play - Bubble Size Relative to Lines-of-Code

10

0

1

2

3

4

5

6

7

8

0% 10% 20% 30% 40% 50% 60% 70% 80% 90%

Deve

loper-

Years

of E

ffort

Portable - Directly Reusable Code (full app)

Potential to save years of

development effort

MIGERAN - SMART SOFTWARE SOLUTIONS

INTEL MOE PERFORMANCEIntel MOE vs. Objective-C

12

Intel MOE Objective-CTime: 16 sec Memory: 781 MB

Time: 40 sec Memory: 1 GB

Allocates array of 10M elements, each element is a 10 letter random string

MIGERAN - SMART SOFTWARE SOLUTIONS

INTEL MOE PERFORMANCEJava Performance Comparison

13

Execution time (ms)

iPad 2 iPad mini (1st generation, 32-bit Apple A5)

Robo VM Intel MOE CodeName One Robo VM Intel MOE

Average Average Average Average Averagebinarytrees 60 150 463 407 157chameneosredux 5911 763 27123 7024 1162fasta 263 455 1906 530 651fannkuchredux 2425 2157 10233 4351 4080mandelbrot 426 450 4981 811 1127meteor 2365 2497 15705 4530 4278nbody 1616 1342 12752 2799 2715pidigits 275 685 1712 1161 990

MIGERAN - SMART SOFTWARE SOLUTIONS

INTEL MOE PERFORMANCEPerformance and Heap Memory Comparison

14

Performance Memory

Intel MOE 58,76 fps 4,85 M

RoboVM 56,90 fps 7,23 M

Difference % 3,2% 61%

LibGDX RoboMission game on iPad Mini 32 bit

MIGERAN - SMART SOFTWARE SOLUTIONS

NAT/J - JAVA TO NATIVE BINDING

• Java to native bindings defined using Java annotations • C and Objective-C runtimes supported • Manages Objective-C object lifecycle • Dynamically links Java and native functions

• Automatic binding generator • The full iOS API is automatically generated • Bind Objective-C ViewController stubs to Java • Generate bindings for 3rd party Objective-C and Swift libraries

• Works on any JNI compatible Java VM (Oracle, ART ...)

Never use JNI Again!

15

MIGERAN - SMART SOFTWARE SOLUTIONS

NAT/J - JAVA TO NATIVE BINDINGBinding Generator in Action

16

MIGERAN - SMART SOFTWARE SOLUTIONS

NAT/J - JAVA TO NATIVE BINDINGBinding Generator in Action

16

MIGERAN - SMART SOFTWARE SOLUTIONS

NAT/J - JAVA TO NATIVE BINDINGBinding Generator in Action

16

MIGERAN - SMART SOFTWARE SOLUTIONS

XCODE STORYBOARD INTEGRATIONDesign in Xcode, Develop in Java

17

Generated user interface binding methods

MIGERAN - SMART SOFTWARE SOLUTIONS

DESIGN IOS UI IN ANDROID STUDIOGenerates iOS Storyboard during build

18

MIGERAN - SMART SOFTWARE SOLUTIONS

ADVANCED JAVA & NATIVE INTEGRATION

• Use any JVM language (Scala, Kotlin, Clojure ... etc.) • Use Java libraries from Objective-C and Swift code

through simple Objective-C wrappers • Implement Objective-C protocols in Java • Extend Objective-C classes in Java

• Build your UI in Swift or Objective-C • Automatically generate bindings with Nat/J

• Use Xcode or Android Studio as required

Use the tools best suited for the task

19

Java Class

Objective-C Protocol

Objective-C Class

<<extends>> <<implements>>

Native UI

Objective-C Class

<<uses>>

MIGERAN - SMART SOFTWARE SOLUTIONS

ADVANCED JAVA & NATIVE INTEGRATION

• Use any JVM language (Scala, Kotlin, Clojure ... etc.) • Use Java libraries from Objective-C and Swift code

through simple Objective-C wrappers • Implement Objective-C protocols in Java • Extend Objective-C classes in Java

• Build your UI in Swift or Objective-C • Automatically generate bindings with Nat/J

• Use Xcode or Android Studio as required

Use the tools best suited for the task

19

Java Class

Objective-C Protocol

Objective-C Class

<<extends>> <<implements>>

Native UI

Objective-C Class

<<uses>>Debug Java & Native

code at the same time

MIGERAN - SMART SOFTWARE SOLUTIONS

DEVELOP IOS APPS ON WINDOWSCloud Build Service

20

AppCenter

Storage

DB Java iOS Build Server

(Mac OS X, Xcode)

Java Android Build Server(Linux, Android SDK)

Upload source codeDownload app

Request buildPoll for build status

Record build transactionMaintain build status

Java Android Build Server(Linux, Android SDK)

Java iOS Build Server

(Mac OS X, Xcode)

Download sourceUpload app

Build request

Build status(s)

Compilationusing native tools

Intel SSO

Authenticate user

Uses the Intel XDK Cloud Build Infrastructure

MIGERAN - SMART SOFTWARE SOLUTIONS

MIGRATING FROM ROBOVM

• LibGDX already announced that they are switching to MOE • Their experimental MOE based backend is already available

• RoboVM's features are available on Intel MOE • e.g. RoboVM's Bro can be easily replaced through Nat/J

RoboVM was shut down by Microsoft

21

MIGERAN - SMART SOFTWARE SOLUTIONS

MIGRATING FROM ROBOVM

• LibGDX already announced that they are switching to MOE • Their experimental MOE based backend is already available

• RoboVM's features are available on Intel MOE • e.g. RoboVM's Bro can be easily replaced through Nat/J

RoboVM was shut down by Microsoft

21

DEMO TIME

MIGERAN - SMART SOFTWARE SOLUTIONS

RESOURCES

• Website: https://software.intel.com/multi-os-engine • Sample applications:

• Java to native samples: https://github.com/migeran/moe-objc-java-samples • Java: https://github.com/moe-java-samples/moe-java-samples • Kotlin: https://github.com/moe-java-samples/moe-kotlin-samples

• Tech forum: https://software.intel.com/en-us/forums/multi-os-engine • Tutorials and getting started guides:

• https://software.intel.com/en-us/blogs/2015/08/27/tutorials-and-quick-start-guides-for-multi-os-engine • Video and Webinars:

• https://software.intel.com/en-us/articles/videos-and-webinars-multi-os-engine

Get Started Today

22

MIGERAN - SMART SOFTWARE SOLUTIONS

Q & AThank you for your attention!

23

TRAINING PREMIUM SUPPORT DEVELOPMENT

WE ARE HIRING! INTERNS WELCOME!

migeran.com

GET INTEL MULTI-OS ENGINE https://software.intel.com/multi-os-engine

top related