Can anybody give me any hints on that? I’m able to display xml content on my swf file but how can I send the changed xml file back to my rails Server?
Thanks in advance!
Markus
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
RestfulX is by far the best way to do this with Rails :).
Check out their cool examples to get running, it takes 5 minutes. You can generate an application based on models (like Page/Post/Comment/Category…) that’ll look like this:
(source: github.com)
You basically run 3 commands and you have a full CMS. And, by default, everything happens via XML, but that’s converted (serialized and deserialized) to and from xml, so you can use class objects in ActionScript. You can easily change that to AMF/JSON if you needed to, which is very powerful. Then you can customize everything from there: create a class (MyVideo), add properties (title, url, description, comments), manipulate them in ActionScript, then just do create/update/destroy/save/show, and it handles all the xml requests to/from Rails.
They’ve solved hardcore things like authentication and session management, file uploading, nested sets and list, etc, which you’ve probably already run into or will. It’s very cool.
Everything works via REST (and CRUD operations), which Rails takes full advantage of. If you just want to use ruby (and not Rails), you can do that no problem. Or if you just wanted to use Flex and no backend, but still wanted to read/write XML without having to create a whole library to handle that, same thing; they handle it all.
You just do:
Rx.models.index(Project)(if you had amy.package.Projectclass), and it’d return:Then if you wanted to save it (or delete it), you’d just do something like:
// then later, maybe onClick for a Button with label "Delete Project"...
project.delete();
This is by far the best library for XML processing. And they have a very active group which is a plus.
I saw you asked this question about writing xml via Flex. You’ll run into lots of edge cases. Try out RestfulX, it’s super sick.
Hope that helps.