Also it may help to look at the Ripple Codebase: https://github.com/blackberry/Ripple-UI/
The overall architecture was inspired by Ripple and has also been also loosely influencing the next generation implementation of the webworks platform on BB10: https://github.com/blackberry-webworks/BB10-WebWorks-Framework On Tue, Feb 7, 2012 at 9:05 AM, Filip Maj <[email protected]> wrote: > Good call Pat. > > The exact repo I'll be going over is located at > https://github.com/callback/callback-js (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: > > https://github.com/filmaj/incubator-cordova-android/tree/unified-js > > Using github's handy compare feature, you can compare it to the master > branch here: > > https://github.com/filmaj/incubator-cordova-android/compare/master...unifie > d-js > > > 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: > https://github.com/filmaj/incubator-cordova-android/compare/master...unifie > d-js#L12L207 > - firing pause/resume events from native: > https://github.com/filmaj/incubator-cordova-android/compare/master...unifie > d-js#L15L850 > - invoking callback success/error handlers for different APIS: > https://github.com/filmaj/incubator-cordova-android/compare/master...unifie > d-js#L17L103 > > Other important things to highlight in Cordova-JS: > > - build/packager.js: > https://github.com/callback/callback-js/blob/master/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 > module. > - 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: > https://github.com/callback/callback-js/blob/master/lib/phonegap.js - does > the add/removeEventListener hijacking that is common to all platforms, and > exposes callbackSuccess/error handlers to native. > - lib/channel.js: > https://github.com/callback/callback-js/blob/master/lib/channel.js - event > emitter/listener that we use for all phonegap events such as nativeReady, > deviceReady, etc. > - lib/bootstrap.js: > https://github.com/callback/callback-js/blob/master/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" <[email protected]> wrote: > > >On Tue, Feb 7, 2012 at 04:17, Filip Maj <[email protected]> wrote: > > > >> Friendly reminder that I've set up the cordovajs show-n-tell for > >>TOMORROW > >> (Wednesday Feb 8th) for 9AM PST. > >> > > > >Great! > > > >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 > >show-n-tell. > > > >-- > >Patrick Mueller > >http://muellerware.org > > -- Gord Tanner Senior Developer / Code Poet tinyHippos Inc. @tinyhippos
