I am very new to Ruby technology. In my current Project the Backend application is develooping ruby and Fortend is developing Flex with HTTPServices. I try to find any where how the Flex will call to Ruby. Please any one haing sample code, please send me asap.
Actually i have a httpService in my applcation like..
And i could not find the url for this HttpService any where?
Please help me on the same.
Reg开发者_StackOverflowards,
Ravi
Generally the best communication technology between flash/flex and a server is the Adobe Message Format. AMF is a communications specification created by adobe specifically for this purpose. In ruby you can use the open source RubyAMF.
https://github.com/victorcoder/rubyamf_plugin
http://blog.rubyamf.org/
a good tutorial for all of this can be found at : http://natureandtech.blogspot.com/2007/10/beginners-tutorial-to-rubyamf-with.html
its really quite simple and fast once you get the hang of it.
See Greg's answer for a good option. In my case, I preferred to use a JSON interface between client and server so that any client can access the same server as long as it's capable of processing JSON.
To do this, we just use standard REST (just GET/POST ) calls via HTTPRequest on the Flex side. The URL is typical: /controller/function/id.js ("js" to tell it to use JSON format). You might to to add a JSON gem to your ruby install.
This keeps the API simple and portable, but I'm told AMF is faster.
精彩评论