You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Julien Bouquillon <ju...@revolunet.com> on 2013/11/07 17:55:28 UTC
cordova remote proxy
Hi there,
Ive submitted the idea a while
ago<http://markmail.org/message/cqpy7f5wqba4emed> on
the cordova ML and now that the cordova codebase is much more sane and
promises-based API are on their way we can put the subject back the
discussion table ;)
Basically, it would be very handy and timesaving for developers to be able
to call the real devices APIs right from their dev environnement (chrome
desktop for me), using a kind of "proxy".
Both @gordtanner and i have prototyped something related a bit some time
ago :
https://github.com/gtanner/ripple-companion
https://github.com/revolunet/remote-cordova
Some ideas :
- implement a "remote" platform in cordova that would be configurable
using a custom host:post+password scheme.
- relay requests/responses using socket.io or similar; maybe @substack
dnode project could help here.
- create basic native apps with a webview and a "runner" that just execute
API calls and return responses.
I'm not sure if it can be done with a custom cordova "platform" only or if
this is more a ripple module.
This could allow developers to dev the whole app JS code in their desktop
directly. Only the UI will still need to be tested on real devices.
Thoughts ?
Thanks
Julien Bouquillon (@revolunet)
Re: cordova remote proxy
Posted by Andrew Grieve <ag...@chromium.org>.
Like it!
On Tue, Nov 12, 2013 at 6:14 PM, Julien Bouquillon [revolunet] <
julien@revolunet.com> wrote:
> Thanks Andrew
>
> Not "device-sensor-heavy" only imho. Imagine you're developing an app that
> needs access to the contact list; instead of creating a mock, you could
> request the contact list API remotely from your real device to your chrome
> while developing on your desktop, so you can experiment with the real
> cordova API.
>
> The goal is to make phonegap development easier when you use devices APIs
> (prevent the slow build/transfer/device testing phase)
>
> What about switching to a "proxy" mode when the app starts ?
>
> eg:
> cordova.setDevice('http://192.168.1.100:6767')
>
> Then all cordova calls would be proxified and relayed to the remote device
>
> (I dont have all the keys about cordova internals so this can sound
> crazy/silly.)
>
> Comments appreciated :)
>
>
> Julien
>
>
>
>
> [image: logo revolunet] *Julien BOUQUILLON - REVOLUNET *
> *web: *www.revolunet.com
> *mail: *julien@revolunet.com
> *phone: *+33 6 62 62 61 02
> *twitter: *@revolunet <http://twitter.com/revolunet>
>
>
> 2013/11/12 Andrew Grieve <ag...@chromium.org>
>
> > Very neat idea. My gut is that it would be useful only to a small set of
> > device-sensor-heavy apps, but probably will be quite useful to them. Also
> > useful would be a way to record & playback calls over the exec() bridge.
> >
> > How to implement it is a good question though. Seems like it might be
> > enough to have a custom app template that people could use to build their
> > "remote" apps (e.g. cordova create --template=remote-app).
> >
> > The hijacking of exec() could be done as a plugin you add to your project
> > maybe?
> >
> >
> >
> > On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <julien@revolunet.com
> > >wrote:
> >
> > > Hi there,
> > >
> > > Ive submitted the idea a while
> > > ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> > > the cordova ML and now that the cordova codebase is much more sane and
> > > promises-based API are on their way we can put the subject back the
> > > discussion table ;)
> > >
> > > Basically, it would be very handy and timesaving for developers to be
> > able
> > > to call the real devices APIs right from their dev environnement
> (chrome
> > > desktop for me), using a kind of "proxy".
> > >
> > > Both @gordtanner and i have prototyped something related a bit some
> time
> > > ago :
> > > https://github.com/gtanner/ripple-companion
> > > https://github.com/revolunet/remote-cordova
> > >
> > > Some ideas :
> > > - implement a "remote" platform in cordova that would be configurable
> > > using a custom host:post+password scheme.
> > > - relay requests/responses using socket.io or similar; maybe
> @substack
> > > dnode project could help here.
> > > - create basic native apps with a webview and a "runner" that just
> > execute
> > > API calls and return responses.
> > >
> > > I'm not sure if it can be done with a custom cordova "platform" only or
> > if
> > > this is more a ripple module.
> > >
> > > This could allow developers to dev the whole app JS code in their
> desktop
> > > directly. Only the UI will still need to be tested on real devices.
> > >
> > >
> > > Thoughts ?
> > >
> > >
> > > Thanks
> > >
> > >
> > > Julien Bouquillon (@revolunet)
> > >
> >
>
Re: cordova remote proxy
Posted by Marcel Kinard <cm...@gmail.com>.
This is definitely interesting. I do see the main use case as developing on your workstation but the APIs are actually proxied to the device.
This does add yet another workflow that can confuse users, unless the use case and usage is clearly explained. But it's not like we have a lot of debugging best practices in the docs yet anyway ;-)
Re: cordova remote proxy
Posted by Andrew Grieve <ag...@chromium.org>.
Like it!
On Tue, Nov 12, 2013 at 6:14 PM, Julien Bouquillon [revolunet] <
julien@revolunet.com> wrote:
> Thanks Andrew
>
> Not "device-sensor-heavy" only imho. Imagine you're developing an app that
> needs access to the contact list; instead of creating a mock, you could
> request the contact list API remotely from your real device to your chrome
> while developing on your desktop, so you can experiment with the real
> cordova API.
>
> The goal is to make phonegap development easier when you use devices APIs
> (prevent the slow build/transfer/device testing phase)
>
> What about switching to a "proxy" mode when the app starts ?
>
> eg:
> cordova.setDevice('http://192.168.1.100:6767')
>
> Then all cordova calls would be proxified and relayed to the remote device
>
> (I dont have all the keys about cordova internals so this can sound
> crazy/silly.)
>
> Comments appreciated :)
>
>
> Julien
>
>
>
>
> [image: logo revolunet] *Julien BOUQUILLON - REVOLUNET *
> *web: *www.revolunet.com
> *mail: *julien@revolunet.com
> *phone: *+33 6 62 62 61 02
> *twitter: *@revolunet <http://twitter.com/revolunet>
>
>
> 2013/11/12 Andrew Grieve <ag...@chromium.org>
>
> > Very neat idea. My gut is that it would be useful only to a small set of
> > device-sensor-heavy apps, but probably will be quite useful to them. Also
> > useful would be a way to record & playback calls over the exec() bridge.
> >
> > How to implement it is a good question though. Seems like it might be
> > enough to have a custom app template that people could use to build their
> > "remote" apps (e.g. cordova create --template=remote-app).
> >
> > The hijacking of exec() could be done as a plugin you add to your project
> > maybe?
> >
> >
> >
> > On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <julien@revolunet.com
> > >wrote:
> >
> > > Hi there,
> > >
> > > Ive submitted the idea a while
> > > ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> > > the cordova ML and now that the cordova codebase is much more sane and
> > > promises-based API are on their way we can put the subject back the
> > > discussion table ;)
> > >
> > > Basically, it would be very handy and timesaving for developers to be
> > able
> > > to call the real devices APIs right from their dev environnement
> (chrome
> > > desktop for me), using a kind of "proxy".
> > >
> > > Both @gordtanner and i have prototyped something related a bit some
> time
> > > ago :
> > > https://github.com/gtanner/ripple-companion
> > > https://github.com/revolunet/remote-cordova
> > >
> > > Some ideas :
> > > - implement a "remote" platform in cordova that would be configurable
> > > using a custom host:post+password scheme.
> > > - relay requests/responses using socket.io or similar; maybe
> @substack
> > > dnode project could help here.
> > > - create basic native apps with a webview and a "runner" that just
> > execute
> > > API calls and return responses.
> > >
> > > I'm not sure if it can be done with a custom cordova "platform" only or
> > if
> > > this is more a ripple module.
> > >
> > > This could allow developers to dev the whole app JS code in their
> desktop
> > > directly. Only the UI will still need to be tested on real devices.
> > >
> > >
> > > Thoughts ?
> > >
> > >
> > > Thanks
> > >
> > >
> > > Julien Bouquillon (@revolunet)
> > >
> >
>
Re: cordova remote proxy
Posted by "Julien Bouquillon [revolunet]" <ju...@revolunet.com>.
Thanks Andrew
Not "device-sensor-heavy" only imho. Imagine you're developing an app that
needs access to the contact list; instead of creating a mock, you could
request the contact list API remotely from your real device to your chrome
while developing on your desktop, so you can experiment with the real
cordova API.
The goal is to make phonegap development easier when you use devices APIs
(prevent the slow build/transfer/device testing phase)
What about switching to a "proxy" mode when the app starts ?
eg:
cordova.setDevice('http://192.168.1.100:6767')
Then all cordova calls would be proxified and relayed to the remote device
(I dont have all the keys about cordova internals so this can sound
crazy/silly.)
Comments appreciated :)
Julien
[image: logo revolunet] *Julien BOUQUILLON - REVOLUNET *
*web: *www.revolunet.com
*mail: *julien@revolunet.com
*phone: *+33 6 62 62 61 02
*twitter: *@revolunet <http://twitter.com/revolunet>
2013/11/12 Andrew Grieve <ag...@chromium.org>
> Very neat idea. My gut is that it would be useful only to a small set of
> device-sensor-heavy apps, but probably will be quite useful to them. Also
> useful would be a way to record & playback calls over the exec() bridge.
>
> How to implement it is a good question though. Seems like it might be
> enough to have a custom app template that people could use to build their
> "remote" apps (e.g. cordova create --template=remote-app).
>
> The hijacking of exec() could be done as a plugin you add to your project
> maybe?
>
>
>
> On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <julien@revolunet.com
> >wrote:
>
> > Hi there,
> >
> > Ive submitted the idea a while
> > ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> > the cordova ML and now that the cordova codebase is much more sane and
> > promises-based API are on their way we can put the subject back the
> > discussion table ;)
> >
> > Basically, it would be very handy and timesaving for developers to be
> able
> > to call the real devices APIs right from their dev environnement (chrome
> > desktop for me), using a kind of "proxy".
> >
> > Both @gordtanner and i have prototyped something related a bit some time
> > ago :
> > https://github.com/gtanner/ripple-companion
> > https://github.com/revolunet/remote-cordova
> >
> > Some ideas :
> > - implement a "remote" platform in cordova that would be configurable
> > using a custom host:post+password scheme.
> > - relay requests/responses using socket.io or similar; maybe @substack
> > dnode project could help here.
> > - create basic native apps with a webview and a "runner" that just
> execute
> > API calls and return responses.
> >
> > I'm not sure if it can be done with a custom cordova "platform" only or
> if
> > this is more a ripple module.
> >
> > This could allow developers to dev the whole app JS code in their desktop
> > directly. Only the UI will still need to be tested on real devices.
> >
> >
> > Thoughts ?
> >
> >
> > Thanks
> >
> >
> > Julien Bouquillon (@revolunet)
> >
>
Re: cordova remote proxy
Posted by "Julien Bouquillon [revolunet]" <ju...@revolunet.com>.
Thanks Andrew
Not "device-sensor-heavy" only imho. Imagine you're developing an app that
needs access to the contact list; instead of creating a mock, you could
request the contact list API remotely from your real device to your chrome
while developing on your desktop, so you can experiment with the real
cordova API.
The goal is to make phonegap development easier when you use devices APIs
(prevent the slow build/transfer/device testing phase)
What about switching to a "proxy" mode when the app starts ?
eg:
cordova.setDevice('http://192.168.1.100:6767')
Then all cordova calls would be proxified and relayed to the remote device
(I dont have all the keys about cordova internals so this can sound
crazy/silly.)
Comments appreciated :)
Julien
[image: logo revolunet] *Julien BOUQUILLON - REVOLUNET *
*web: *www.revolunet.com
*mail: *julien@revolunet.com
*phone: *+33 6 62 62 61 02
*twitter: *@revolunet <http://twitter.com/revolunet>
2013/11/12 Andrew Grieve <ag...@chromium.org>
> Very neat idea. My gut is that it would be useful only to a small set of
> device-sensor-heavy apps, but probably will be quite useful to them. Also
> useful would be a way to record & playback calls over the exec() bridge.
>
> How to implement it is a good question though. Seems like it might be
> enough to have a custom app template that people could use to build their
> "remote" apps (e.g. cordova create --template=remote-app).
>
> The hijacking of exec() could be done as a plugin you add to your project
> maybe?
>
>
>
> On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <julien@revolunet.com
> >wrote:
>
> > Hi there,
> >
> > Ive submitted the idea a while
> > ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> > the cordova ML and now that the cordova codebase is much more sane and
> > promises-based API are on their way we can put the subject back the
> > discussion table ;)
> >
> > Basically, it would be very handy and timesaving for developers to be
> able
> > to call the real devices APIs right from their dev environnement (chrome
> > desktop for me), using a kind of "proxy".
> >
> > Both @gordtanner and i have prototyped something related a bit some time
> > ago :
> > https://github.com/gtanner/ripple-companion
> > https://github.com/revolunet/remote-cordova
> >
> > Some ideas :
> > - implement a "remote" platform in cordova that would be configurable
> > using a custom host:post+password scheme.
> > - relay requests/responses using socket.io or similar; maybe @substack
> > dnode project could help here.
> > - create basic native apps with a webview and a "runner" that just
> execute
> > API calls and return responses.
> >
> > I'm not sure if it can be done with a custom cordova "platform" only or
> if
> > this is more a ripple module.
> >
> > This could allow developers to dev the whole app JS code in their desktop
> > directly. Only the UI will still need to be tested on real devices.
> >
> >
> > Thoughts ?
> >
> >
> > Thanks
> >
> >
> > Julien Bouquillon (@revolunet)
> >
>
Re: cordova remote proxy
Posted by Andrew Grieve <ag...@chromium.org>.
Very neat idea. My gut is that it would be useful only to a small set of
device-sensor-heavy apps, but probably will be quite useful to them. Also
useful would be a way to record & playback calls over the exec() bridge.
How to implement it is a good question though. Seems like it might be
enough to have a custom app template that people could use to build their
"remote" apps (e.g. cordova create --template=remote-app).
The hijacking of exec() could be done as a plugin you add to your project
maybe?
On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <ju...@revolunet.com>wrote:
> Hi there,
>
> Ive submitted the idea a while
> ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> the cordova ML and now that the cordova codebase is much more sane and
> promises-based API are on their way we can put the subject back the
> discussion table ;)
>
> Basically, it would be very handy and timesaving for developers to be able
> to call the real devices APIs right from their dev environnement (chrome
> desktop for me), using a kind of "proxy".
>
> Both @gordtanner and i have prototyped something related a bit some time
> ago :
> https://github.com/gtanner/ripple-companion
> https://github.com/revolunet/remote-cordova
>
> Some ideas :
> - implement a "remote" platform in cordova that would be configurable
> using a custom host:post+password scheme.
> - relay requests/responses using socket.io or similar; maybe @substack
> dnode project could help here.
> - create basic native apps with a webview and a "runner" that just execute
> API calls and return responses.
>
> I'm not sure if it can be done with a custom cordova "platform" only or if
> this is more a ripple module.
>
> This could allow developers to dev the whole app JS code in their desktop
> directly. Only the UI will still need to be tested on real devices.
>
>
> Thoughts ?
>
>
> Thanks
>
>
> Julien Bouquillon (@revolunet)
>
Re: cordova remote proxy
Posted by Andrew Grieve <ag...@chromium.org>.
Very neat idea. My gut is that it would be useful only to a small set of
device-sensor-heavy apps, but probably will be quite useful to them. Also
useful would be a way to record & playback calls over the exec() bridge.
How to implement it is a good question though. Seems like it might be
enough to have a custom app template that people could use to build their
"remote" apps (e.g. cordova create --template=remote-app).
The hijacking of exec() could be done as a plugin you add to your project
maybe?
On Thu, Nov 7, 2013 at 11:55 AM, Julien Bouquillon <ju...@revolunet.com>wrote:
> Hi there,
>
> Ive submitted the idea a while
> ago<http://markmail.org/message/cqpy7f5wqba4emed> on
> the cordova ML and now that the cordova codebase is much more sane and
> promises-based API are on their way we can put the subject back the
> discussion table ;)
>
> Basically, it would be very handy and timesaving for developers to be able
> to call the real devices APIs right from their dev environnement (chrome
> desktop for me), using a kind of "proxy".
>
> Both @gordtanner and i have prototyped something related a bit some time
> ago :
> https://github.com/gtanner/ripple-companion
> https://github.com/revolunet/remote-cordova
>
> Some ideas :
> - implement a "remote" platform in cordova that would be configurable
> using a custom host:post+password scheme.
> - relay requests/responses using socket.io or similar; maybe @substack
> dnode project could help here.
> - create basic native apps with a webview and a "runner" that just execute
> API calls and return responses.
>
> I'm not sure if it can be done with a custom cordova "platform" only or if
> this is more a ripple module.
>
> This could allow developers to dev the whole app JS code in their desktop
> directly. Only the UI will still need to be tested on real devices.
>
>
> Thoughts ?
>
>
> Thanks
>
>
> Julien Bouquillon (@revolunet)
>