which browsers are compatible with ajax API

Post here all your questions related with beta SmartFoxServer API, such as Shockwave, Ajax ...

Moderators: Lapo, Bax

Post Reply
brice
Posts: 3
Joined: 05 Apr 2011, 13:53

which browsers are compatible with ajax API

Post by brice »

Hello

I would like to use the ajax API for a mobile web application (in the browser)
can you tell me which browsers is compatible with the API ?

thanks
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Actually we don't have this information. The AJAX API were experimental and they are not supported anymore, due to almost no interest coming from developers.
Anyway if you need them, you can get the source code and maintain them.
Paolo Bax
The SmartFoxServer Team
brice
Posts: 3
Joined: 05 Apr 2011, 13:53

Post by brice »

I'm sorry to heard this API is no longer supported
maybe I have to go with orbiter : http://www.unionplatform.com/?page_id=1587
stringa
Posts: 1
Joined: 05 Jan 2012, 05:46

Post by stringa »

we are using this API too, and I'm sad that I wasn't around during the decision to use this Client Api. The disadvantages out-way the advantages here, to put Java generated Javascript file smack dab in the middle of a HTML5 game.

I am disappointed that SmartFox hasn't created a better solution than this for Javascript. As Javascript and social gaming is becoming more and more prevalent in the marketplace as a way to develop cross-platform code, SFS provides this.

1) If I was around for the original development and we were forced to use SmartFox, I would develop my own client
2) If I had a purely Javascript front-end and we were determining what server middleware to use, this would be a deal-breaker for me.

For right now, we have to live with this solution until we have a week to just rewrite this library in Javascript.

Also, the GWT outputted code uses underscores. This most likely interfere's with the underscore library too.

stringa

PS. There might be more interest in the solution if it didn't use GWT. It can't take more than 1 or 2 weeks for an experienced developer at SmartFox to provide a decent solution in Javascript.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

The Ajax API for SFS 1.x were created way before HTML5 saw the light, we're talking about 2008, and it was experimental. The interest at the time was minimal and we didn't invest any more energies into it.

As regards HTML5 we're following closely the web-sockets technology and we'll be able to tell you more during 2012. The current implementation is in its infancy (no support for binary protocols) and there's a second draft already in the works.
Once we get a clearer picture of the plans for this 2nd implementation we'll be able to arrange the support for this technology.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

For right now, we have to live with this solution until we have a week to just rewrite this library in Javascript.
I think I can suggest something here for a quick workaround.

If you take the Actionscript 2 API we provide for Flash you would have 90% of the job already done.
Actionscript 2 is nothing else that good old plain Javascript with additional type notation.
Where in Javascript you have this:

Code: Select all

var hello = "Hello world"
var num = 123
In AS2 you have also an extra type declaration

Code: Select all

var hello:String = "Hello world"
var num:Number = 123
If you take the API and strip the type notation you get a pure Javascript code. This should probably take 15 minutes or less with any decent text editor. If you know your RegExp it might take 30 seconds :)

There's one more thing left. The Flash API uses a class called XMLSocket which takes care of the socket connection providing 3 basic events:

> onConnect: fired when the connection is established
> onClose: fired when the connection is shut down
> onData: fired when a message is received (a message can be any String terminate by a 0x00 byte)

All you need to do is create your own Javascript XMLSocket class that wraps the web-socket API and exposes these 3 events an a few more methods ( connect(), close(), send() ) and you should have a fully working API for SFS 1.6.x

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re:

Post by Bax »

stringa wrote:we are using this API too, and I'm sad that I wasn't around during the decision to use this Client Api. The disadvantages out-way the advantages here, to put Java generated Javascript file smack dab in the middle of a HTML5 game.

I am disappointed that SmartFox hasn't created a better solution than this for Javascript. As Javascript and social gaming is becoming more and more prevalent in the marketplace as a way to develop cross-platform code, SFS provides this.

1) If I was around for the original development and we were forced to use SmartFox, I would develop my own client
2) If I had a purely Javascript front-end and we were determining what server middleware to use, this would be a deal-breaker for me.

For right now, we have to live with this solution until we have a week to just rewrite this library in Javascript.

Also, the GWT outputted code uses underscores. This most likely interfere's with the underscore library too.

stringa

PS. There might be more interest in the solution if it didn't use GWT. It can't take more than 1 or 2 weeks for an experienced developer at SmartFox to provide a decent solution in Javascript.
SmartFoxServer 2X now supports HTML5 with a brand new set of JavaScript API.
You can read more here: http://docs2x.smartfoxserver.com/Gettin ... eb-sockets
Paolo Bax
The SmartFoxServer Team
Post Reply