If you are thinking about writing an Ajax application with some server side part then
you should be thinking in SOA terms. Think of your server in terms of exposing services.
Pragmatically I would do the following:
1) Think of your business process.
2) Pick one simple process (eg add invoice)
3) Convert that simple process into a Web Service that is exposed using REST, and the protocol could be either XML, or JSON.
4) Using wget or curl (http command line tool) create a
test script to excercise and test your web service.
5) Create an HTML page that includes an XMLHttpRequest and convert the wget or curl script into JavaScript.
6) Write JavaScript to process the data from the XMLHttpRequest.
OK?
Christian
Author: Ajax
Patterns and Best Practices