incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: Work Items for 1.5.0 - unified JS
Date Tue, 07 Feb 2012 14:05:38 GMT
Good call Pat.

The exact repo I'll be going over is located at (still waiting on a git home at
Apache, INFRA ticket filed).

I've got a branch of the incubator-cordova-android repository with all
changes necessary to get cordova-js integrated into the android
implementation here:

Using github's handy compare feature, you can compare it to the master
branch here:

For the above "comparison" view, ignore most of the Media-related code.
Essentially we need to stop referencing JavaScript globals from native.
Examples of these sorts of changes:

- firing nativeready:
- firing pause/resume events from native:
- invoking callback success/error handlers for different APIS:

Other important things to highlight in Cordova-JS:

- build/packager.js: -
this module handles reading and compiling the various .js files in the
cordova-js repo together into cordova.<platform>.js files. When you run
"jake" from the repo root, that invokes the "bundle" function from this
- lib/platform: .js files in here define the global objects that will be
dropped once phonegap is ready to boot. Most are platform-specific
definitions and are quite small. There is one, called common.js, common to
all platforms, that is the biggest. Basically all the globla namespaces ->
JS module mappings are defined here.
- lib/phonegap.js: - does
the add/removeEventListener hijacking that is common to all platforms, and
exposes callbackSuccess/error handlers to native.
- lib/channel.js: - event
emitter/listener that we use for all phonegap events such as nativeReady,
deviceReady, etc.
- lib/bootstrap.js: -
"boot" function defined here is what initializes phonegap. It'll run
through the platform definitions (lib/platform) and drop the modules
referenced in there into the appropriate name spaces in JS.

That's more than enough for you guys to chew on I think :)

Let me know if there's anything else I can provide!

On 12-02-07 2:44 PM, "Patrick Mueller" <> wrote:

>On Tue, Feb 7, 2012 at 04:17, Filip Maj <> wrote:
>> Friendly reminder that I've set up the cordovajs show-n-tell for
>> (Wednesday Feb 8th) for 9AM PST.
>Could you post some links to relevant projects floating out there in the
>ether?  I'd like to be able to see look over the code before the
>Patrick Mueller

View raw message