+ All Categories
Home > Technology > HTML5 Local Storrage Solutions [German]

HTML5 Local Storrage Solutions [German]

Date post: 14-Jan-2015
Category:
Upload: simon-jockers
View: 647 times
Download: 2 times
Share this document with a friend
Description:
Eine kurze Übersicht über verschiedene Möglichkeiten für persistente Datenhaltung im Browser. Video: http://youtu.be/3GbvxRPVrJE
13
OPEN TECH TALK #4 NOVEMBER 2011 Simon Jockers [email protected] HTML5 Storage Solutions
Transcript
Page 1: HTML5 Local Storrage Solutions [German]

OPEN TECH TALK #4 NOVEMBER 2011

Simon Jockers [email protected]

HTML5 Storage Solutions

Page 2: HTML5 Local Storrage Solutions [German]

Local Storage – Wofür?

Speichern von Nutzerdaten

Caching von Assets

Entwicklung von Offline-Anwendungen

Page 3: HTML5 Local Storrage Solutions [German]

Gmail Offline

Page 4: HTML5 Local Storrage Solutions [German]

Financial Times

Page 5: HTML5 Local Storrage Solutions [German]

chrome.angrybirds.com

Page 6: HTML5 Local Storrage Solutions [German]

Old School: Cookies

Nur geeignet für geringe Datenmengen:

4096 Bytes pro Cookie

20 Cookies pro Domain

Alle Cookies werden bei jedem Request zwischen Server und Client ausgetauscht.

Page 7: HTML5 Local Storrage Solutions [German]

Web Storage

Einfacher Key-Value-Store für Strings

Synchrone API

// Beispiel:localStorage["key"] = JSON.stringify(value); value = JSON.parse(localStorage["key"]);

Verfügbar in allen aktuellen Browsern

Alternative: "Session Storage" (nicht persistent)

Page 8: HTML5 Local Storrage Solutions [German]

Web SQL Database

SQLite im Browser

Vollwertige relationale Datenbank

Asynchrone API

Verfügbar in vielen Browsern

Chrome, Android

Safari, Safari Mobile

Opera

Achtung: Spezifiktion liegt auf Eis

Page 9: HTML5 Local Storrage Solutions [German]

IndexedDB

"NoSQL im Browser"

Key-Value-Store

Indizes, Cursor, Transaktionen

Asynchrone API

Verfügbarkeit Firefox und Chrome

Internet Explorer 10

Page 10: HTML5 Local Storrage Solutions [German]

FileSystem APIs

Virtuelles Filesystem in einer Sandbox

Geeignet für die Verwaltung von großen Mengen binärer Daten

Asynchrone API

Momentan nur verfügbar in Chrome

Page 11: HTML5 Local Storrage Solutions [German]

Herausforderungen

Synchroner Zugriff ("Blocking I/O")+Einfachere Programmierschnittstelle

– Anwendung ist nicht reaktionsfähig während I/O

Abhilfe: Web Workers (Threading)

Verwalten von binären Dateien FileSystem APIs oder Blobs in SQLite

Alternative: Base64-Encoding

Page 12: HTML5 Local Storrage Solutions [German]

Abstraktion!

Lawnchairhttps://github.com/brianleroux/lawnchair

Kizzyhttps://github.com/ded/kizzy


Recommended