cross-platform development frameworks

28
MILANO 1863 POLITECNICO Cross-Platform Development Frameworks REASONS AND COMPARISONS Carlo Bernaschina [email protected]

Upload: carlo-bernaschina

Post on 13-Jan-2017

278 views

Category:

Mobile


0 download

TRANSCRIPT

Page 1: Cross-platform development frameworks

MILANO 1863 POLITECNICO

Cross-Platform Development Frameworks

REASONS AND COMPARISONS

Carlo Bernaschina – [email protected]

Page 2: Cross-platform development frameworks

There is an increasing number of mobile platforms available on smartphones and tablets:

• Android

• iOS

• Windows Phone

• Symbian

• BlackBerry

• Meamo > MeeGO > Tizen / Sailfish

• Ubuntu Touch

• Firefox OS

• …

Background MOBILE PLATFORMS

Page 3: Cross-platform development frameworks

Android and iOS lead the market with more than 90%

of the share.

Is it worthy to take explicitly into account other

platforms?

Background MARKET SHARE 2015

Page 4: Cross-platform development frameworks

The major platforms support different programming

languages:

• iOS (Swift, Objective-C, C/C++)

• Android (Java, C/C++)

• Windows Phone (.Net (C# VB.NET), C++)

• Ubuntu Touch (QML/JavaScript, C++)

• Firefox OS (JavaScript)

• …

Background OFFICIAL PLATFORM SUPPORT TO PROGRAMMING LANGUAGES

Page 5: Cross-platform development frameworks

The major platforms support different UI Frameworks,

some of them are even custom built for those

platforms:

• iOS (Custom)

• Android (Custom)

• Windows Phone (WPF/XAML)

• Ubuntu Touch (QML)

• Firefox OS (HTML+CSS)

• …

Background OFFICIAL PLATFORM SUPPORT TO UI FRAMEWORKS

Page 6: Cross-platform development frameworks

Is it possible to develop applications that with small or

no effort can run on the major Mobile Platforms?

How?

The Question

Page 7: Cross-platform development frameworks

The most common cross-platform development

framework are:

• Qt Mobile

• Xamarin

• Flutter

• Appcelerator Titanium

• Apache Cordova

Cross-Platform Frameworks THE MOST COMMON CROSS-PLATFORM FRAMEWORKS

Page 8: Cross-platform development frameworks

Qt is a C/C++ cross-platform application framework

that is widely used in desktop and embedded

environments.

In version 5.1 (July 2013) an experimental support for

Android and iOS has been introduced with a new set of

APIs devoted to the management of mobile devices.

Qt-Mobile

Page 9: Cross-platform development frameworks

Qt Mobile is mainly based on the new QML UI

language.

QML allows to define the UI of the application

declaratively and to use JavaScript for the definition of

scripts that respond to events related to UI

components.

It is possible to expose APIs developed in C/C++ to the

JavaScript code.

Qt-Mobile HOW IT WORKS

Page 10: Cross-platform development frameworks

• SUPPORTED PLATFORMS Android, iOS, Windows Phone, Windows RT, BlackBerry10 and Sailfish

• PROGRAMMING LANGUAGES JavaScript, C/C++

• UI Framework Qt Quick (QML)

• NATIVE UI No, but native look and feel can be reached with themes

• PERFORMANCE Native (It is native C/C++ code)

• WORA? (Write Once Run Anywhere) Yes

Qt-Mobile FEATURES

Page 11: Cross-platform development frameworks

• You do not require access to native UI Components,

but want a native look and feel

• Your application requires high levels of performance

• You already have QML based UI components to use

• You already have Qt C/C++ code that can be easily

reused in your application

Qt-Mobile WHEN TO USE IT

Page 12: Cross-platform development frameworks

Xamarin is a cross-platform application framework

based on C#.

It has been presented in 2011 with initial support for

Android and iOS.

Xamarin

Page 13: Cross-platform development frameworks

Xamarin applications use a C# JIT compiler to allow

the code to run on the different platforms.

The C# classes can be easily shared without

modifications.

It is possible to access UI Native components and

Native APIs but that part of the application need to be

adapted for each target platform.

Xamarin HOW IT WORKS

Page 14: Cross-platform development frameworks

• SUPPORTED PLATFORMS Android, iOS, Windows Phone

• PROGRAMMING LANGUAGES C#, VB.net (just for libraries)

• UI Framework Custom Framework (Native Wrapper)

• NATIVE UI Yes

• PERFORMANCE Native (the JIT compiler generates native binaries)

• WORA? (Write Once Run Anywhere) No* (but majority of the code can be shared)

Xamarin FEATURES

* It is under development a XAML cross-platform library that allows to share application views

Page 15: Cross-platform development frameworks

• You do require access to native UI Components

• Your application requires high levels of performance

• You already have C# code that can be used in your

application

• Business logic code is much more than the UI one.

Xamarin WHEN TO USE IT

Page 16: Cross-platform development frameworks

Flutter is a cross-platform application framework

based on Dart.

It has been presented at Google I/O 2016 with support

for Android and iOS.

Flutter

Page 17: Cross-platform development frameworks

Flutter applications the Dart VM to allow precompiled

code to run on the different platforms.

Flutter has some interesting new features:

• Integrated profiler/debugger (Observatory)

• Hot Reload of applications reload the code without loosing the current state.

Flutter HOW IT WORKS

Page 18: Cross-platform development frameworks

• SUPPORTED PLATFORMS Android, iOS

• PROGRAMMING LANGUAGES Dart

• UI Framework Custom Widget Based Framework

• NATIVE UI No (Material Design)

• PERFORMANCE The AOT compiler generates native code

• WORA? (Write Once Run Anywhere) Yes

Flutter FEATURES

Page 19: Cross-platform development frameworks

• You do plan to develop a Material Design app

• Your application requires high levels of performance

Flutter WHEN TO USE IT

Page 20: Cross-platform development frameworks

Appcelerator is a cross-platform application

framework based on JavaScript.

It has been presented in December 2008 as an

alternative to adobe air for desktop applications.

In June 2009 it added first support for iOS and Android.

Appcelerator Titanium

Page 21: Cross-platform development frameworks

Appcelerator Titanium uses a JavaScript VM to allow

code portability between platforms.

It is possible to access UI Native components and

Native APIs but that part of the application need to be

defined for each target platform.

Appcelerator Titanium HOW IT WORKS

Page 22: Cross-platform development frameworks

• SUPPORTED PLATFORMS Android, iOS, Windows Phone

• PROGRAMMING LANGUAGES JavaScript

• UI Framework Custom Framework (Native Wrapper)

• NATIVE UI Yes

• PERFORMANCE Not at native level (JavaScript is interpreted)

• WORA? (Write Once Run Anywhere) No (write once, adapt everywhere)

Appcelerator Titanium FEATURES

Page 23: Cross-platform development frameworks

• You do require access to native UI Components

• Your application does not require high levels of

performance

• You already have JavaScript code that can be used

in your application

• Business logic code is much more than the UI one.

Appcelerator Titanium WHEN TO USE IT

Page 24: Cross-platform development frameworks

Cordova is a cross-platform mobile application

framework based on Web Technologies.

It has been presented in 2011 while officially graduated

in October 2012 as a top level project within the

Apache Software Foundation (ASF).

It is the base framework for other projects like

PhoneGap or Intel XDK

Apache Cordova

Page 25: Cross-platform development frameworks

Cordova instantiate a WebView, a component

common to all the platforms that allows to incorporate

a Web Browser inside an application, and loads inside

it static HTML, CSS and JavaScript assets.

It is not possible to access UI Native components,

while it is possible to access Native APIs via plugins

that expose a common interface regardless to the

underling platform.

Cordova HOW IT WORKS

Page 26: Cross-platform development frameworks

• SUPPORTED PLATFORMS Android, iOS, Windows Phone, BlackBerry OS, Ubuntu OS, Firefox OS, WebOS, FireOS

• PROGRAMMING LANGUAGES JavaScript

• UI Framework Web UI Frameworks (HTML / CSS, …)

• NATIVE UI No (There are some CSS frameworks that mimic the native components)

• PERFORMANCE Not at native level (JavaScript is interpreted)

• WORA? (Write Once Run Anywhere) Yes

Cordova FEATURES

Page 27: Cross-platform development frameworks

• You do not require access to native UI Components

• Your application does not require high levels of

performance

• You already have HTML / CSS templates and

JavaScript code that can be used in your application

Cordova WHEN TO USE IT

Page 28: Cross-platform development frameworks

• https://www.netmarketshare.com/operating-system-market-share.aspx?qprid=8&qpcustomd=1

• https://developer.apple.com/library/prerelease/watchos/documentation/Swift/Conceptual/Swift_Programming_Language/

• https://developer.android.com/ndk/guides/concepts.html

• https://msdn.microsoft.com/en-us/library/windows/apps/ff626516(v=vs.105).aspx

• https://developer.ubuntu.com/en/apps/qml/

• https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS

• http://www.qt.io/mobile-app-development/

• https://xamarin.com/platform

• https://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/portable_visual_basic_net/

• https://github.com/flutter/flutter/wiki/Early-Access:-Hot-Reload

• https://flutter.io

• http://docs.appcelerator.com/platform/latest/#!/guide/Titanium_Platform_Overview

• https://cordova.apache.org/docs/en/5.1.1/guide/overview/

Reference