Good day. There was a need to very quickly sort out this issue, in fact, I see several acceptable options - XML, JSON, SOAP. Interests the following - how it is удобнее to write and work with the server. The priority is not the speed of execution, but the speed and "ease" of writing and maintaining the code. In general, what do you think about this, and what would you choose?

thanks in advance...

  • what is being done and where to pass primerchik, if possible. // i.e. I sincerely hope that it is necessary to transfer not variables to the client during the execution of the php script, but still) - Sh4dow
  • What's the difference? The application data is generated on the basis of the input, the manipulation of this data, etc. etc. <br> In general, a typical RIA client-server, if I had already written examples, I wouldn’t have had this question :) <br> Before proceeding, I need to think carefully about everything, there is very little RIA writing experience (read no ), therefore I ask. <br> - Zowie
  • @ Sh4dow kagby variables can be transferred and not only it, moreover, you can directly call methods of a particular server class, etc. <br> If you are not in the subject, then do not be smart;) - Zowie
  • @AlexWindHope, of course I am not in the subject)) In general, I can generate movie clips on php, so I don’t need these formats ^ _ ^ But this is a commercial bun, so I won’t be able to shine it) - Sh4dow

1 answer 1

Theoretically, you can use any format, but I would dwell on XML or JSON , because SOAP is ideologically related to a slightly different field, and raising a SOAP service is supposedly shooting a gun at sparrows and is unlikely to be promote simplicity and readability of the code.

And further, since the built-in tools for working with XML and JSON in the flex are very good, the code should turn out to be quite trivial. The choice between these formats is quite holivar, I can advise an article from the habr - http://habrahabr.ru/blogs/webdev/31225/


At one time, this example came in handy for me (here the truth is the server part on jsp , but this slightly changes something) - http://www.infoq.com/articles/flex-xml-json

I note that in my case the interaction was trivial - php clings data from the database and generates xml in response to a request from the application in ActionScript . I must say that there were no problems and I can’t even suggest where they may arise here.

  • The problem is that with the theoretical part, and, a little, with the practical I am familiar, what can I do as I please :) :) I’m interested in real practical advice, which code will be easier to support and expand ... While I think about XML, JSON, though fast, but with sufficient code volume, it is not always so easy and quick to figure out what is where and why, unlike XML .. <br> Regarding SOAP, it’s you for nothing, let the code not be so short, but from experience it is to use the SOAP server melodiously ... <br> In general, it remained in thought, while I write something 100% sure of it - Zowi e
  • I ask about how best to do with the pledge for the future, I wrote somewhere about the problems of writing? - Zowie
  • @AlexWindHope I would not bother much about this. This is one of the few times to spend time writing code rather than thinking. In the case of a normal project architecture, refactor it and change, say, xml -> json should be quite trivial (while the good architecture of the project itself is exactly where you should spend time thinking) :) - Costantino Rupert