Writing apps for the future

Valentin Goșu

valentin.gosu@gmail.com

Firsts are important

  • First time you used a computer
  • First application you used
  • First time you went online

Things change

  • Devices
  • APIs
  • Coding languages
  • Paradigms change (internet of things)

How do we write future-proof apps?

The web!

http://www.microsoft.com/en-us/discover/1994/

WebAPI

Battery

Orientation

Vibration

Alarm

Notification

Camera

SMS

Telephony

Bluetooth

Wifi

Firefox OS | Android | Desktop

Manifest

{
  "version": "0.2.0",
  "name": "demo",
  "description": "Does stuff",
  "launch_path": "/index.html",
  "icons": {
    "16": "/img/icons/icon16x16.png",
    "48": "/img/icons/icon48x48.png",
    "60": "/img/icons/icon60x60.png",
    "128": "/img/icons/icon128x128.png"
  },
  "developer": {
    "name": "Your name",
    "url": "http://example.com"
  },
  "type": "privileged",
  "permissions": {
    "systemXHR": {
      "description": "Required to load remote content"
    }
  }
}

What you get is an app:

Content

Manifest

Firefox OS

  • The web is native
  • It's here now
  • Apps run everywhere Firefox does
  • If you want performance try asm.js

It's that easy

function start() {
    navigator.mozTelephony.dial('07XXXXXXXX'); // Call the phone number
    setTimeout(stop, 63*1000); // Stop the call in 63 seconds
}

function stop() {
    navigator.mozTelephony.calls[0].hangUp(); // Hang up
    setTimeout(start, 3*1000); // Call back again in another 3 seconds
}

start();

Tools? What tools?

  • Files + manifest
  • Packaged apps
  • WebIDE and developer tools

Let's build an app

http://hacks.mozilla.org/

https://developer.mozilla.org/en-US/

valentin.gosu@gmail.com

Writing apps for the future

By Valentin Gosu

Writing apps for the future

  • 1,641