Macromedia Flash with Ruby on rails

Hello everybody,

I have been given the thankless task of implementing a Flash GUI with
a ruby back-end. Naturally I argued for the merits of HTML (of RHTML)
but to no avail, and so here I am a prodding and a poking around FLASH
and XML sockets. Firewalls aside, this looks like my best approach,
and the plugin known as juggernaut as the best implementation of this
sort of work. Has anyone implemented a similar solution using a
different approach or set of tools?

Any suggestions before the-off would be greatly appreciated…

John

Why not expose your back-end with web services? You can more easily
test them, Flash can use them, and if you needed to drop the flash
front end you wouldn’t have to touch a line of code.

XML sockets in flash are for more immediate data like chat rooms,
multiplayer games, etc.

-Shawn

Cheers Shawn,

I want to retain state throughout the one swf. It is a game with
tasks, and every time a user completes a task both the score and state
are stored in a database. The user can finish the game at any time
and return to their last completed task. I thought of XML sockets
because they allow the client and server communicate without
submitting a new HTTP request. This is really what I am aiming for.

john

Ahh, well you could also retain state much the same way state is
retained in HTTP, use a session identifer (one that you send with each
request, through the SOAP header perhaps). Then you can associate the
information in the database (or wherever) with that session.

I haven’t played around with it, but you might be able to pass the RoR
session ID into flash through the HTML embed, pass it through to the
web services, and retrieve the RoR session?

Either way you decide to go, good luck!

-Shawn