cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <>
Subject [DISCUSSION] standard layer to exec : regCommandProxy
Date Thu, 23 Feb 2012 08:51:07 GMT
I have been giving this some thought, and posted a gist for discussion.

I have not included any of the require/define wrapper api's, as I wanted
the API to be the talking point.  Ideally this would be implemented on ALL
platforms and allow us 100% consistency in APIs calling exec.

Dividing responsibilities, we would end up with something like the

PluginCode ( concrete example compass.js )
- exposes consistent API for ALL platforms
- performs parameter checking

- performs device specific implementation where native calls are not needed.

- de-couples API specific differences across devices, exec is focused on
being a device specific bridge ( or a bridge with an on-ramp ).

An added benefit to this aproach is that it will provide us a stub point
where we can simulate/hook tests, as currently it is difficult to test
failing cases ( especially cases that typically should not fail )

Some additional questions that this may bring up:
1. do we need lesser/greater granularity of the APIs we want to proxy? ie
should we be able to hook all of Compass with one call, or individually for
each method?
2. do we need to provide an un-register method?
3. is there a more descriptive name for this?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message