69
HTML5 vs. native Apps

HTML5 vs. native Apps

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: HTML5 vs. native Apps

HTML5 vs.native Apps

Page 2: HTML5 vs. native Apps

2

Page 3: HTML5 vs. native Apps
Page 4: HTML5 vs. native Apps

• 3D Casual Game

• 200.000 Players world-wide

• critically acclaimed

• average rating of 4-5 stars

• featured on Apple‘s App Stores

Page 5: HTML5 vs. native Apps

evolution of the menu

PAPEO

Page 6: HTML5 vs. native Apps

6

Page 7: HTML5 vs. native Apps

Apps

7

Page 8: HTML5 vs. native Apps

Apps

8

iOSAndroid

Page 9: HTML5 vs. native Apps

Apps

9

iOS

AndroidSymbian

Windows Phone 7webOS

BlackberrySamsung Smart TV

Google TV

PS3

Xbox

Page 10: HTML5 vs. native Apps

Native Apps

10

Objective-C

JavaC / C++

C# iOS

Android

Symbian

Windows Phone 7

webOS

Blackberry

Samsung Smart TV

Google TV

PS3Xbox

HTML / JS

Page 11: HTML5 vs. native Apps

Native Apps

11

Page 12: HTML5 vs. native Apps

12

Code schreiben

kompilieren

native App

Page 13: HTML5 vs. native Apps

Yay!13

Page 14: HTML5 vs. native Apps

14

Objective-C

kompilieren

iOS App

Page 15: HTML5 vs. native Apps

15

Objective-C

kompilieren

iOS App

Java

kompilieren

Android App

Page 16: HTML5 vs. native Apps

16

Objective-C

kompilieren

iOS App

Java

kompilieren

Android App

C#

kompilieren

WP7 App

Page 17: HTML5 vs. native Apps

17

#import <stdio.h>

int main( int argc, const char *argv[] ) { printf( "hello world\n" ); return 0;}

Page 18: HTML5 vs. native Apps

18

public class HelloWorld{ public static void main(String[] args) { System.out.println("HelloWorld"); }}

Page 19: HTML5 vs. native Apps

19

using System;namespace HelloWorld{ class Hello { static void Main() { System.Console.WriteLine("Hello World!"); } }}

Page 20: HTML5 vs. native Apps

Vorteile von nativen Apps

20

•bessere Performance

• längere Akku-Laufzeit

•Zugriff auf die gesamte API des Gerätes

•native User Interfaces

Page 21: HTML5 vs. native Apps

Nachteile von nativen Apps

21

• auf jeweils eine Plattform beschränkt

• Memory Mangement Probleme

• Kompilieren ist zeitaufwändig

• hoher Aufwand bei der Portierung auf verschiedene Plattformen

• hoher Wartungsaufwand über die Lebenszeit der App

• hoher Lernaufwand für Neueinsteiger(insbesondere Objective-C)

Page 22: HTML5 vs. native Apps

22

Page 23: HTML5 vs. native Apps

Eine Alternative

23

Page 24: HTML5 vs. native Apps

24

Objective-C

kompilieren

iOS App

Java

kompilieren

Android App

C#

kompilieren

WP7 App

Page 25: HTML5 vs. native Apps

25

kompilieren

iOS App

Generic Code

kompilieren

Android App

kompilieren

WP7 App

Page 26: HTML5 vs. native Apps

26

iOS App

Generic Code

Android App WP7 App

Page 27: HTML5 vs. native Apps

27

iOS App

HTML

Android App WP7 App

Page 28: HTML5 vs. native Apps

28

iOS App

HTML5

Android App WP7 App

+ JavaScript+ CSS3

Page 29: HTML5 vs. native Apps

29HTML5 Logo by W3C

+ CSS3 + JavaScript

Page 30: HTML5 vs. native Apps

HTML5 / CSS3 / JavaScript

30

HTML5•Struktur• Inhalte

CSS3•Gestaltung

JavaScript•Logik

Page 31: HTML5 vs. native Apps

Wichtige Neuerungen in HTML5

31

• Erweiterung der Formularelemente(Date, Time, URL, E-Mail, Farbe etc.)

• Audio- und Video-Elemente• Canvas-Element• SVG-Support• Manipulation der History• Offline Support• Local Storage• Web Sockets

Page 32: HTML5 vs. native Apps

32

<!DOCTYPE html><html>!<head>!! <meta

http-equiv="Content-type" content="text/html; charset=utf-8">

!! <title>Hello World!</title>!</head>!<body>!! <p>Hello World!</p>!</body></html>

Page 33: HTML5 vs. native Apps

Wichtige Neuerungen in CSS3

33

•Transparenz / Transparente Farben•Ränder (Radius, Bilder etc.)•Schatten•Eigene Schriften (@font-face)•Transformationen / 3D Transformationen•Animationen

Page 34: HTML5 vs. native Apps

34

p { font-size: 10px; font-weight: bold; color: red; background: green;}

Page 35: HTML5 vs. native Apps

35

p { font-size: 10px; font-weight: bold; color: red; background: green; border-radius: 15px; box-shadow: 10px 10px 5px #888;}

Page 36: HTML5 vs. native Apps

JavaScript

36

•Scriptsprache•Objektorientiert• funktionale / prozedurale

Programmierung ebenso möglich•sehr flexible Programmiersprache

Page 37: HTML5 vs. native Apps

37

alert("Hello World!");

Page 38: HTML5 vs. native Apps

38

var world = {!hello: "Hello World!"}

alert(world.hello);

Page 39: HTML5 vs. native Apps

39

var world = {!hello: function() {!return "Hello World!"

!}}

alert(world.hello());

Page 40: HTML5 vs. native Apps

40

var World = function(){!return {!! hello: function() {!! !return "Hello World!"!! }!}}

var w = new World()alert(w.hello());

Page 41: HTML5 vs. native Apps

41HTML5 Logo by W3C

Apps

Page 42: HTML5 vs. native Apps

HTML5 Mobile Frameworks

42

•Sencha Touch• jQuery Mobile• jQTouch•etc.

Page 43: HTML5 vs. native Apps

Sencha Touch 1

43

• Android, iOS, Blackberry• nativ aussehende UIs• schnell auf iOS• langsam auf Android

und Blackberry• MVC-Architektur• großer Funktionsumfang

• Sencha Touch 2 viel schneller auf allen Geräten(noch Beta)

Quelle: http://www.sencha.com/products/touch/

Page 44: HTML5 vs. native Apps

44

Page 45: HTML5 vs. native Apps

45

Page 46: HTML5 vs. native Apps

jQuery Mobile

46

• viele Plattformen

• einheitliches UI, das nichtversucht nativ zu wirken

• nur Darstellung

• keine AnwendungslogikQuelle: http://jquerymobile.com/

Page 47: HTML5 vs. native Apps

Mobile Web Frameworks

47

•Backbone.js•SproutCore / Ember.js• jQuery•Zepto.js•XUI•etc.

Page 48: HTML5 vs. native Apps

48

iCloud.com by Apple

Page 49: HTML5 vs. native Apps

49

Google Docs by Google

Page 50: HTML5 vs. native Apps

50

Basecamp Mobile. Quelle: http://basecamphq.com/mobile

Page 51: HTML5 vs. native Apps

51

Browser / WebView

HTML5 + CSS3 + JavaScript

Page 52: HTML5 vs. native Apps

Vorteile von reinen HTML5-Apps

52

•viele Plattformen gleichzeitig möglich•einfachere Gestaltungsmöglichkeiten•Web-Anwendung direkt mit dabei•Geringer Wartungsaufwand bei

unterschiedlichen Plattformen•einfacher für Neueinsteiger•während der Entwicklung Live-Vorschau

im Browser ohne kompilieren

Page 53: HTML5 vs. native Apps

Nachteile von reinen HTML5-Apps

53

• schlechtere Performance• nur Zugriff auf eine geringe Anzahl nativer

Features• keine Installation über die App-Stores

möglich -> App wird nicht im Store gefunden

• kürzere Akku-Laufzeit• bei rechenintensiven Apps kaum einsetzbar

Page 54: HTML5 vs. native Apps

Hybride Lösungen

54

Page 55: HTML5 vs. native Apps

Reine HTML5-App

55

Browser / WebView

HTML5 + CSS3 + JavaScript

Page 56: HTML5 vs. native Apps

Phonegap-App

56

WebView

HTML5 + CSS3 + JavaScript

Phonegap Container

JS + native Plugins

Page 57: HTML5 vs. native Apps

Phonegap-App

57

•Zugriff auf viele native Features möglich

•Plugin-Architektur erlaubt einfache Erweiterung

•viele mobile Plattformen werden unterstützt

• rechenintensive Codeabschnitte müssen für jede Plattform nativ als Plugin erstellt werden

Page 58: HTML5 vs. native Apps

58

Page 59: HTML5 vs. native Apps

Rhodes-App

59

lokaler Webserver

HTML5 + CSS3 + JavaScript

Rhodes Container

Ruby VM native Plugins

WebView

Ruby App

Page 60: HTML5 vs. native Apps

Rhodes-App

60

Vorteile wie Phonegap und• rechenintensive Codeabschnitte müssen NICHT

für jede Plattform als Plugin erstellt werden (Ruby Bytecode)

• bessere Performance für Applikationslogik(Darstellungs-Performance unverändert)

Nachteil• höher Lernaufwand

Page 61: HTML5 vs. native Apps

Titanium-App

61

HTML5 + JavaScript

Compiler

iOS App Android App

Page 62: HTML5 vs. native Apps

Titanium-App

62

HTML5 + JavaScript

„Black Magic“

iOS App Android App

Page 63: HTML5 vs. native Apps

Titanium-App

63

Vorteile

• HTML + JavaScript wird zu nativem Code kompiliert

• Performance und Aussehen sehr ähnlich einer nativen App

Nachteile

• Debugging-Hölle

• Nur iOS und Android

• Keine Browser-App

Page 64: HTML5 vs. native Apps

Eigene Mischformen

64

WebViews

HTML5 + CSS3 + JavaScript

Eigener nativer Container

native Komponenten

Page 67: HTML5 vs. native Apps

67Quelle: http://itunes.apple.com/us/app/netflix/id363590051?mt=8

Page 68: HTML5 vs. native Apps

Zusammenfassung

68

Page 69: HTML5 vs. native Apps

? doPanic GmbHNeupfarrplatz 1693047 Regensburg

Telefon +49 (0) 941 280 461 10Telefax +49 (0) 941 280 461 11

Vortrag Daniel Dengler

E-Mail [email protected] Web www.dopanic.com