First steps with Ripple

A few months ago, I discovered a really cool plugin for chrome. It’s Ripple, an open source project hosted by Apache to emulate mobile devices into you browser (Chrome actually …). But I’ve never really had the time (or the project) to test it.

So here it is !

Installation

First, you have to install the chrome plugin.

Now, create a new phonegap project :

1
create /path/to/dir/MyProject com.you.myproject MyProject

Create your application (or just test with the default Phonegap app) :

1
2
3
4
5
6
7
8
9
class Main {
    static function main() {
         js.Browser.document.addEventListener( "deviceready", function(e) {
              new JQuery(function() {
                  trace("hello world");
              });
         });
    }
}

Go to your working directory and start the server :

1
2
cd /path/to/dir/MyProject
nekotools server

Go to http://emulate.phonegap.com?url=localhost:2000&platform=phonegap and enable the plugin if it isn’t.

browserRipple

It can really save you time, because deploy to a real device is much longer, and more difficult to debug. So if you use the chrome developer tools… you will not let go this plugin! But it sure doesn’t replace a real device for testing ;)