Till Vollmer Geschäftsführer MindMeister

Similar documents
Developing Offline Web Application

Client-side Web Engineering From HTML to AJAX

A WOLF IN SHEEP'S CLOTHING The Dangers of Persistent Web Browser Storage

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

LabStats 5 System Requirements

Web Programming Step by Step

Neues in SQL Server Evaluierung SQL Server 2016 CTP 3 für den BI Stack. Sascha Götz Inovex GmbH

Release Notes. VidyoWeb Version (16) December, 2014 Doc. Rev A

What is AJAX? Ajax. Traditional Client-Server Interaction. What is Ajax? (cont.) Ajax Client-Server Interaction. What is Ajax? (cont.

Web based collaborative editor for L A TEX documents

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Programming IoT Gateways With macchina.io

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Load Testing Ajax Apps using head-less browser tools. NoVaTAIG April 13, 2011 Gopal Addada and Frank Hurley Cigital Inc.

Introduction to Ajax

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Web application Architecture

Abusing HTML5. DEF CON 19 Ming Chow Lecturer, Department of Computer Science TuCs University Medford, MA

quick documentation Die Parameter der Installation sind in diesem Artikel zu finden:

IAC-BOX Network Integration. IAC-BOX Network Integration IACBOX.COM. Version English

Ajax Development with ASP.NET 2.0

1. User Guide API overview addon - xml Definition addon.background addon.background.script

Created by Johannes Hoppe. Security

Semantic Web. Semantic Web: Resource Description Framework (RDF) cont. Resource Description Framework (RDF) W3C Definition:

FreeConference SharePlus TM. Desktop Sharing User Guide. SharePlus TM Desktop Sharing User Guide

HTML5 Offline Data. INF5750/ Lecture 6 (Part II)

Accessing External Databases from Mobile Applications

J2EE-Application Server

AnyWeb AG

Windows HPC Server 2008 Deployment

Open Source Telemedicine Android Client Development Introduction

AUTOMATED CONFERENCE CD-ROM BUILDER AN OPEN SOURCE APPROACH Stefan Karastanev

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Web Browser Settings for MOGADOC Version

WEB DEVELOPMENT COURSE (PHP/ MYSQL)

WebSocket Server. To understand the Wakanda Server side WebSocket support, it is important to identify the different parts and how they interact:

Wildix Web API. Quick Guide

Adding HTML5 to your Android applications. Martin Gunnarsson & Pär Sikö

1Copyright 2013, Oracle and/or its affiliates. All rights reserved.

SizmekFeatures. HTML5JSSyncFeature

Lecture 9 Chrome Extensions

How To Use Mugeda Content

Native v HTML5 An Event Planner s Primer

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

aspwebcalendar FREE / Quick Start Guide 1

CommVault Simpana 7.0 Software Suite. und ORACLE Momentaufnahme. Robert Romanski Channel SE

Eloquence Training What s new in Eloquence B.08.00

Web Development. How the Web Works 3/3/2015. Clients / Server

Tidspunkt : : :59 (49 dag(e)) Operativsystem (OS) fordelt på browsere Total: Safari9 ios %

XSS Cross Site Scripting

QML and JavaScript for Native App Development

CSE598i - Web 2.0 Security OWASP Top 10: The Ten Most Critical Web Application Security Vulnerabilities

Some Issues on Ajax Invocation

Receptionist Console Quick Reference Guide

O Reilly Ebooks Your bookshelf on your devices!

Tutorial básico del método AJAX con PHP y MySQL

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

Kurz-Einführung Python

Ajax Performance Tuning and Best Practice

ADOBE AIR. Working with Data in AIR. David Tucker

The HTTP Plug-in. Table of contents

Microsoft Windows Apple Mac OS X

1. Was ist das? II. Wie funktioniert das? III. Wo funktioniert das nicht?

QAS DEBUG - User und Computer

Drupal CMS for marketing sites

Communication Motivation

Core Ideas CHAPTER 1 PART. CHAPTER 2 Pre-Ajax JavaScript Communications Techniques CHAPTER 3 XMLHttpRequest Object CHAPTER 4 Data Formats

Safe Harbor Statement

Performance Testing for Ajax Applications

3DHOP Local Setup. Lezione 14 Maggio 2015

Developer Tutorial Version 1. 0 February 2015

Mobile Push Architectures

Browser Performance Tests We put the latest web browsers head-to-head to try to find out which one is best!

Quick Reference / Install Guide v1.3

EMC Greenplum. Big Data meets Big Integration. Wolfgang Disselhoff Sr. Technology Architect, Greenplum. André Münger Sr. Account Manager, Greenplum

Credits: Some of the slides are based on material adapted from

Brauche neues Power Supply

Progressive Enhancement With GQuery and GWT. Ray Cromwell

Using the VMRC Plug-In: Startup, Invoking Methods, and Shutdown on page 4

Webapps Vulnerability Report

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Search Engines Chapter 2 Architecture Felix Naumann

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

Using the FDO Remote Access Portal

Grant Management. System Requirements

Smartphone Application Development using HTML5-based Cross- Platform Framework

Programming Autodesk PLM 360 Using REST. Doug Redmond Software Engineer, Autodesk

TJHSST Zeus Database Proxy Handbook

Transcription:

Till Vollmer Geschäftsführer MindMeister

Was ist Google Gears? Browser Plugin Lokale Datenbank Lokaler Store (urls) Tools Klassen JavaScript Library Aktuelle Version (1.6.08 : V 0.3.X)

Plugin für? Windows Windows XP/Vista Firefox 1.5+ and Internet Explorer 6.0+ Mac OS X Mac OS X 10.4+ Firefox 1.5+ Linux Linux Firefox 1.5+ 32-bit processor (64-bit not supported)

Klassenarchitektur JS Factory Daten Database URL Inhalte LocalServer Tools Timer ResultSet ManagedResourceStore WorkerPool ResourceStore Desktop FileSubmitter HTTPRequest

Initialisierung/Instanz <script src="gears_init.js"></script> <script> if (!window.google!google.gears) { location.href = "http://gears.google.com/? action=install&message=<your welcome message>" + "&return=<your website url>"; } </script>

gears_init.js (function() { if (window.google && google.gears) { return; } var factory = null; if (typeof GearsFactory!= 'undefined') { factory = new GearsFactory(); } else { try { factory = new ActiveXObject('Gears.Factory'); if (factory.getbuildinfo().indexof('ie_mobile')!= -1) { factory.privatesetglobalobject(this); } } catch (e) { if ((typeof navigator.mimetypes!= 'undefined') && navigator.mimetypes["application/x-googlegears"]) { factory = document.createelement("object"); factory.style.display = "none"; factory.width = 0; factory.height = 0; factory.type = "application/x-googlegears"; document.documentelement.appendchild(factory); } } } if (!factory) { return; } if (!window.google) { google = {}; } if (!google.gears) { google.gears = {factory: factory}; } })();

Factory Factory class Object create(classname, classversion) string getbuildinfo() readonly attribute string version Beispiel: var db = google.gears.factory.create('beta.database'); db.open('database-test'); classname beta.database beta.httprequest beta.localserver beta.timer beta.workerpool Google Gears class created Database HttpRequest LocalServer Timer WorkerPool

Database Database class void open([name]) ResultSet execute(sqlstatement, [argarray]) void close() readonly attribute int lastinsertrowid ResultSet class boolean isvalidrow() void next() void close() int fieldcount() string fieldname(int fieldindex) variant field(int fieldindex) variant fieldbyname(string fieldname)

Database Beispiel var db = google.gears.factory.create('beta.database'); db.open('database-test'); db.execute('create table if not exists Test' + ' (Phrase text, Timestamp int)'); db.execute('insert into Test values (?,?)', ['Monkey!', new Date().getTime()]); var rs = db.execute('select * from Test order by Timestamp desc'); while (rs.isvalidrow()) { alert(rs.field(0) + '@' + rs.field(1)); rs.next(); } rs.close();

Database Bemerkungen SQLite Volltext Suche Transaktionen (begin, commit) Execute can fail (retry?) db.execute('begin'); db.execute('insert INTO recipe_aux (dish, rating) VALUES (?,?)', ['soup', 3]); db.execute('insert INTO recipe (rowid, dish, ingredients) ' + 'VALUES (last_insert_rowid(),?,?)', ['soup', 'meat carrots celery noodles']); db.execute('commit');

Stores ManagedResourceStore URL zu einem Manifest Manifest sagt was geholt wird ResourceStore On the fly store Dynamische Sachen Achtung: ist ein Store "enabled" so liefert Gears auch bei aktivem Netzwerk alles aus dem Store

LocalServer LocalServer class boolean canservelocally(string url) ResourceStore createstore(string name,...) ResourceStore openstore(string name,...) void removestore(string name,...) ManagedResourceStore createmanagedstore(string name,...) ManagedResourceStore openmanagedstore(string name,...) void removemanagedstore(string name,...)

ManagedResourceStore ManagedResourceStore class readonly attribute string name readonly attribute string requiredcookie readwrite attribute boolean enabled readwrite attribute string manifesturl readonly attribute int lastupdatechecktime readonly attribute int updatestatus readonly attribute string lasterrormessage readonly attribute string currentversion event void oncomplete(object details) event void onerror(error error) event void onprogress(object details) void checkforupdate()

ResourceStore ResourceStore class readonly attribute string name readonly attribute string requiredcookie readwrite attribute boolean enabled int capture(string urlorurlarray,completioncallback) void abortcapture(int captureid) void remove(string url) void rename(string srcurl, string desturl) void copy(string srcurl, string desturl) boolean iscaptured(string url) void capturefile(fileinputelement, url) string getcapturedfilename(url) string getheader(string url, string name) string getallheaders(string url) FileSubmitter createfilesubmitter()

Manifest Beispiel { // version of the manifest file format "betamanifestversion": 1, // version of the set of resources described in this manifest file "version": "my_version_string", // optional // If the store specifies a requiredcookie, when a request would hit // an entry contained in the manifest except the requiredcookie is // not present, the local server responds with a redirect to this URL. "redirecturl": "login.html", } // URLs to be cached (URLs are given relative to the manifest URL) "entries": [ { "url": "main.html", "src": "main_offline.html" }, { "url": ".", "redirect": "main.html" }, { "url": "main.js" } { "url": "formhandler.html", "ignorequery": true }, ]

Beispiel Store var localserver=google.gears.factory.create('beta.localserver'); var store=localserver.createmanagedstore('test-store'); store.manifesturl='site-manifest.txt'; store.checkforupdate(); // site-manifest.txt { "betamanifestversion": 1, "version": "site_version_string", "entries": [ { "url": "site.html" }, { "url": "gears_init.js" } ] }

WorkerPool Eigener "Thread" UI Thread wird nicht gestört (längere Tasks) Kein DOM im Worker (window, document) Kein XMLHttpRequest, settimeout Extra Klassen Code isolation, aber Parent/Child Messaging Same origin policy (kann überschrieben werden)

Workerpool WorkerPool class callback onmessage(messagetext, senderid, [messageobject: {text,sender,origin}]) callback onerror(errorobject:{message}) int createworker(scripttext) int createworkerfromurl(scripturl) void sendmessage(messagetext, destworkerid) void allowcrossorigin()

WorkerPool Beispiel // main.js var workerpool = google.gears.factory.create('beta.workerpool'); workerpool.onmessage = function(a, b, message) { alert('received message from worker ' + message.sender + ': ' + message.text); }; var childworkerid = workerpool.createworkerfromurl('worker.js'); workerpool.sendmessage('hello, world!', childworkerid); // worker.js var wp = google.gears.workerpool; wp.onmessage = function(a, b, message) { wp.sendmessage('received: ' + message.text, message.sender); }

HTTPRequest HttpRequest class void open(method, url) void setrequestheader(name, value) void send([postdata]) void abort() string getresponseheader(name) string getallresponseheaders() callback onreadystatechange readonly attribute int readystate readonly attribute string responsetext readonly attribute int status readonly attribute string statustext var request = google.gears.factory.create('beta.httprequest'); request.open('get', '/index.html'); request.onreadystatechange = function() { if (request.readystate == 4) { console.write(request.responsetext); }}; request.send();

Timer Timer class int settimeout(fullscript, msecdelay) int settimeout(function, msecdelay) int setinterval(fullscript, msecdelay) int setinterval(function, msecdelay) void cleartimeout(timerid) void clearinterval(timerid) var timer = google.gears.factory.create('beta.timer'); timer.settimeout(function() { alert('hello, from the future!'); }, 1000);

Desktop Desktop class bool createshortcut(name, url, icons, [description]) var desktop = google.gears.factory.create('beta.desktop'); desktop.createshortcut("test Application", "http://example.com/index.html", {"128x128": "http://example.com/icon128x128.png", "48x48": "http://example.com/icon48x48.png", "32x32": "http://example.com/icon32x32.png", "16x16": "http://example.com/icon16x16.png"}, "An application at http://example.com/index.html");

Applikationsarchitektur Source: Google

Applikationsarchitektur Source: Google

Applikationsarchitektur Source: Google

Applikationsarchitektur Source: Google

Applikationsarchitektur Source: Google

Modal vs. modeless Modal Benutzer "switched" zwischen online/ offline Plötzlicher Ausfall des Netzes, geht nicht Modeless Komplexer zu implementieren Hintergrundsynchronisation CPU Zeit?

Gears on Rails Einfaches Plugin Transformation von controller actions -> JS JSON responses http://code.google.com/p/gearsonrails

Bemerkungen SQL Injection Stores (enabled?) https/http

Zukunft Firefox 3 Safari Internet Explorer? HTML 5 spec

Infos http://code.google.com/apis/gears http://code.google.com/p/gearsonrails BTW: We are hiring!!!! See http://www.mindmeister.com/home/jobs

Vielen Dank!