amber with Cordova anyone?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

amber with Cordova anyone?

NorbertHartl
I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.

Any hints appreciated,

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

Manfred Kröhnert
Hi Norbert,

there is an entry in the Amber wiki:


However, I am not sure how up to date this is.

Best,
Manfred

On Wed, Jan 9, 2013 at 9:41 PM, Norbert Hartl <[hidden email]> wrote:
I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.

Any hints appreciated,

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

Nicolas Petton
In reply to this post by NorbertHartl

I successfully used websockets with Amber and Zinc with Pharo. What
issues are you facing? Maybe I can be of some help.

Nico

Norbert Hartl <[hidden email]> writes:

> I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.
>
> Any hints appreciated,
>
> Norbert
--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

NorbertHartl

Am 10.01.2013 um 10:59 schrieb Nicolas Petton <[hidden email]>:

>
> I successfully used websockets with Amber and Zinc with Pharo. What
> issues are you facing? Maybe I can be of some help.
>
The issues are android related. The client works exactly your way amber+zinc+pharo on desktop browser. The problem I'm facing is that it doesn't work on android with Cordova. The WebView in android is not yet chrome. And there is no WebSocket support. You can extend the WebView for the WebSocket support but I didn't get it running until now. I think it should work but I started fresh with less experience in android, none in Cordova, none in extending WebView and little in amber. So just too much balls in the air and I lost confidence where to look next. So any experience would have been helpful.
Next time I just start fresh and try to figure out a way how to do it.

Norbert

>
> Norbert Hartl <[hidden email]> writes:
>
>> I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.
>>
>> Any hints appreciated,
>>
>> Norbert
> --
> Nicolas Petton
> http://nicolas-petton.fr

Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

sebastianconcept
In reply to this post by NorbertHartl
be skeptic about this but I'd try to use stuff like Socket.IO intead of directly dealing with WebSockets

also, I'd give a shot to Trigger.IO instead of phonegap

sebastian

o/

On 09/01/2013, at 18:41, Norbert Hartl <[hidden email]> wrote:

> I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.
>
> Any hints appreciated,
>
> Norbert
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

Paul DeBruicker
In reply to this post by NorbertHartl
On 01/10/2013 02:10 AM, Norbert Hartl wrote:
> Am 10.01.2013 um 10:59 schrieb Nicolas Petton <[hidden email]>:
>
>> >
>> > I successfully used websockets with Amber and Zinc with Pharo. What
>> > issues are you facing? Maybe I can be of some help.
>> >
> The issues are android related. The client works exactly your way amber+zinc+pharo on desktop browser. The problem I'm facing is that it doesn't work on android with Cordova. The WebView in android is not yet chrome. And there is no WebSocket support. You can extend the WebView for the WebSocket support but I didn't get it running until now. I think it should work but I started fresh with less experience in android, none in Cordova, none in extending WebView and little in amber. So just too much balls in the air and I lost confidence where to look next. So any experience would have been helpful.
> Next time I just start fresh and try to figure out a way how to do it.


Could you use modernizr to detect support for websockets in the brower
and if its not there just use server polling?
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

NorbertHartl
In reply to this post by sebastianconcept

Am 10.01.2013 um 16:47 schrieb sebastian <[hidden email]>:

> be skeptic about this but I'd try to use stuff like Socket.IO intead of directly dealing with WebSockets

That would generally be a good idea in normal scenario. But at the moment it would just put yet another layer between me and success. I don't think it would solve anything right now. Why I'm not using Socket.IO is that I know my clients. It's all Nexus Tablets so no need to go for the fallback route.

> also, I'd give a shot to Trigger.IO instead of phonegap
>
why?

Norbert

> On 09/01/2013, at 18:41, Norbert Hartl <[hidden email]> wrote:
>
>> I was playing to use amber with websockets in Cordova (former name phonegap). I wasn't successful, yet (WebSockets do not work for me). Anyone tried amber + Cordova or even WebSockets in the same scenario.
>>
>> Any hints appreciated,
>>
>> Norbert

Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

NorbertHartl
In reply to this post by Paul DeBruicker

Am 10.01.2013 um 17:29 schrieb Paul DeBruicker <[hidden email]>:

> On 01/10/2013 02:10 AM, Norbert Hartl wrote:
>> Am 10.01.2013 um 10:59 schrieb Nicolas Petton <[hidden email]>:
>>
>>>>
>>>> I successfully used websockets with Amber and Zinc with Pharo. What
>>>> issues are you facing? Maybe I can be of some help.
>>>>
>> The issues are android related. The client works exactly your way amber+zinc+pharo on desktop browser. The problem I'm facing is that it doesn't work on android with Cordova. The WebView in android is not yet chrome. And there is no WebSocket support. You can extend the WebView for the WebSocket support but I didn't get it running until now. I think it should work but I started fresh with less experience in android, none in Cordova, none in extending WebView and little in amber. So just too much balls in the air and I lost confidence where to look next. So any experience would have been helpful.
>> Next time I just start fresh and try to figure out a way how to do it.
>
>
> Could you use modernizr to detect support for websockets in the brower
> and if its not there just use server polling?

I think that would be the wrong thing to do. As long as I think WebSockets can work in this environment I like to make it. Anything that fallbacks to something different would it make even harder to get it going. If not I would do like Sebastian and use Socket.IO. It does all of these things. Maybe in the next project.

Honestly it's a pet project. I'm just going for the native option because I don't like having a tab bar and a url bar wasting space of the screen while providing controls that may interrupt the workflow. In the meantime I've found the button to do lock rotate. So I don't want the native app but I feel the need it would make the environment for the web app a bit more cozy.

thanks,

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

Darius Clarke
I don't know your network setup, but WebSocket can have problems with some ProxyServers. 

- Darius 
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

NorbertHartl

Am 10.01.2013 um 23:18 schrieb Darius Clarke <[hidden email]>:

> I don't know your network setup, but WebSocket can have problems with some ProxyServers.

Thanks. But my setup is just inside a wireless network.

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

Esteban A. Maringolo
In reply to this post by NorbertHartl
I would stay with PhoneGap, I'm using it, and in the long run I think it is the best "vendor free" project (it is backed by Apache Corodova after all).  The plugin architecture is really good. I haven't used WS there. And I'm targetting Android 2.3.3 (API 10).

Someday the'll be able to use Chromium as its WebView.
For Android you have to deal with Ant, Eclipse and some other Java related tools, which can be awkward, but after some struggling and google searching they work.

Trigger.io claims to be up to 5x faster, and with a faster build process, and with "native" components (just toolbar and tabbar for iOS, no Android there). And it is proprietary.  And doesn't seem to be updated either.

Adobe by means of PhoneGap is backing Cordova. Adobe needs something that places it where Flash put it  when they acquired Macromedia :)

Back to WebSockets...
Socket.io client requires Socket.io from the server too, which is on node.js
Maybe wrapping socket.io on Amber Node is worthwhile, but not for a pet project.

In the latest JSConf.ar I talked with Socket.io creator about wrapping it with Amber Smalltalk, and he said it wouldn't be hard, but that I'll have to wrap also its dependencies. So it is not an easy quest.

Regards!
Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

NorbertHartl

Am 11.01.2013 um 15:07 schrieb Esteban A. Maringolo <[hidden email]>:

> I would stay with PhoneGap, I'm using it, and in the long run I think it is
> the best "vendor free" project (it is backed by Apache Corodova after all).
> The plugin architecture is really good. I haven't used WS there. And I'm
> targetting Android 2.3.3 (API 10).
>
> Someday the'll be able to use Chromium as its WebView.
> For Android you have to deal with Ant, Eclipse and some other Java related
> tools, which can be awkward, but after some struggling and google searching
> they work.
>
> Trigger.io claims to be up to 5x faster, and with a faster build process,
> and with "native" components (just toolbar and tabbar for iOS, no Android
> there). And it is proprietary.  And doesn't seem to be updated either.
>
> Adobe by means of PhoneGap is backing Cordova. Adobe needs something that
> places it where Flash put it  when they acquired Macromedia :)
>
> Back to WebSockets...
> Socket.io client requires Socket.io from the server too, which is on node.js
> Maybe wrapping socket.io on Amber Node is worthwhile, but not for a pet
> project.
>
> In the latest JSConf.ar I talked with Socket.io creator about wrapping it
> with Amber Smalltalk, and he said it wouldn't be hard, but that I'll have to
> wrap also its dependencies. So it is not an easy quest.
>
I agree to everything you said. I matches my opinion fully. I use pharo as server backend and don't know what it would need on the server side to be Socket.IO compliant. As I said the device will be the Nexus 7 tablet and WebSockets are working there. The project is planned as a web page. I just think about the native shell because of the fullscreen possibility and maybe for discovery of the server.

thanks,

Norbert


Reply | Threaded
Open this post in threaded view
|

Re: amber with Cordova anyone?

sebastianconcept
In reply to this post by Esteban A. Maringolo

On Jan 11, 2013, at 12:07 PM, Esteban A. Maringolo wrote:

In the latest JSConf.ar I talked with Socket.io creator about wrapping it
with Amber Smalltalk, and he said it wouldn't be hard, but that I'll have to
wrap also its dependencies. So it is not an easy quest.

just to add some value to this chat...

I agree that might be a little early to go for Sockets.IO for us because you don't have (big yet here) a good Amber at the server side.

By "good Amber" I mean a nicely smalltalkishly-debuggable-node.js server framework that could use Sockets.IO (and everything else that's popping around everywhere)

That's going to change with the real debugger + Helios

Once we have that, we will NOT have the need to wrap anything for using it because you just evoke the stuff and use it via the js proxy as with any other js stuff you use from Amber in the frontend today

and about why bothering using Socket.IO at all it's because it's designed to go try WebSockets but gently fallback to do the transport with other features when it isn't available. That without loading the developer with the burden of network stuff

If you can live with WebSocket-guaranteed-only devices then, go for it, your life just got is easier