Superturbocharging Firefox OS app development with node-firefox
πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€

Soledad PenadΓ©s

was: Apps Engineer
now: Tech Evangelism at Mozilla

WebIDE

WebIDE

But... what if you want to build more complex apps, using Browserify, Coffee Script, or...?

You need a build step

THIS IS NOT EFFICIENT

We are engineers, and

ENGINEERS OPTIMISE

How can we
make this efficient?

What could we
automate here?

Every Firefox runtime has a debugger server

Clients connect to the server to use its functionalities

WebIDE is a client

Each of these functionalities is provided by an actor

Example:

list the installed apps

Another example:

installing an app

We can do that too!

We just need to establish a TCP connection to the debugger port and we're done, just need to parse a few packets here and there \o/

EWWW PARSE PACKETS WHAT NO I WANT TO WRITE JAVASCRIPT

Us too!

node-firefox

node.js modules to interact with debugging servers
=== build and run your app without ever leaving the command line!

Starting a simulator?

var startSimulator
  = require('node-firefox-start-simulator');
  
startSimulator({ version: '2.2' })
  .then(function(simu) {
    console.log('Listening in port', simu.port);
  });
  

DEMO TIME

Example 1:

Starting a simulator, installing and launching an app

Example 2:

Building an app with Browserify, installing it and reloading on CSS changes, using Gulp as task runner

What works today?

Philosophy

Deliberately simple

Consistent

Dream ideas

(or: what we can't do yet)

Dream ideas

Sole's dream idea:

Firefox OS custom editions

Custom builds generated with a script!

How do we get there?

Contribute!

github.com/mozilla/node-firefox

Breaking news

As of this week you can have WebIDE run a pre-deploy script

But you still cannot do all that node-firefox can!

Please don't ask questions yet.

Play with the project first 😎

Thanks!

@supersole

soledadpenades.com