Apps nativas VERSUS Web apps

Offline vs Online
Independentes vs dentro do browser
Poder total vs sandbox
Alto risco vs ambiente seguro

Teste: 20 top apps do Android

Web apps: Online first

AppCache?

Apps nativas: OFFLINE first

Como?!?!? XHR
Você abre o NAVEGADOR para executar uma app offline ???!!?!?
Apps nativas: executam fora do navegador!

Chrome Apps!!!!

Estimulam a pensar offline
Rodam fora do browser
APIs poderosas (janelas, sync filesystem, rede, hardware)
Seguras: CSP, sandboxed, permissões upfront, código nativo

Show me the code

{
  "manifest_version": 2,
  "name": "Hello World",
  "version": "1",
  "icons": { "16": "icon_16.png" },
  "app": {
    "background": {
      "scripts": ["main.js"]
    }
  }
}

Show me the code

chrome.app.runtime.onLaunched.addListener(function() {
  chrome.app.window.create('index.html',
    {width: 500, height: 300, 
     left: 200, top: 200, 
     frame: 'none'
    }
  );
});

DEMO time

BREAKING NEWS:

Para saber mais:

developer.chrome.com/apps

github.com/GoogleChrome

chromium-apps@chromium.org