I have a project, which has a server listening on port 9999. Originally the client is a flash program, which uses XML to communicate with the server. Now I want to write a web client to it(html). I want to make the modification as little as possible in the server side.
I am thinking using pure html + ajax. The problem I am facing is:
1) Can I send xml from the client side and wait for the response? If so, which is the most efficient way to develop it?
2) I think all the xml sent from client is embedded in HTTP request but my server didn’t know HTTP at all. Do I need to modify my server to be a CGI program?
Is there any good framework for me to start with?
Because it is no clear what kind your server is (probably it is based on java or C/C++ sockets), if it is true you can adapt it to use the HTTP protocol, then you can use javascript code on the client side for requesting the server, by means of JSON (you should prefer JSON over XML firstly because it is simpler and is in the core of the JavaScript language). Particularly I have found the Prototype.js library very efficient and simple:
For knowing more about prototype refer to: http://www.prototypejs.org/learn/introduction-to-ajax