Web Services
From Ajax Patterns
It's easy to think of Ajax as a browser-side technology, but don't forget that Web Remoting impacts on the design of server-side components. Specifically, it encourages the creation of Web Services: server-based services providing clients with tightly scoped functionality, such as "Give me the most recent blog entry" or "Register this user". In our case, the client is a Javascript application sitting in the browser, but it could equally be a standalone program running on someone's computer. Thus, Web Service design involves a balance between the needs of your own Ajax applications, the needs of external clients also using the service, and the ease of creating the service itself.
RESTful Service and RPC Service are the two dominant styles of Web Service design. The former suggests several simple - but powerful - conventions which help make Web Services consistent across the web, and is fundamental to the operation of many internet components function, such as web browsers, web servers, and proxies. RPC Service involves a more direct API, which can make implementation easier, and it's worth noting that RPC Services can still leverage concepts from RESTful Service.
The next two patterns are different response types arising from Web Services, the responses that Javascript will receive during Web Remoting. HTML Response is a snippet of HTML which can usually be injected directly onto the page. Semantic Response is some text representing a result, requiring Javascript interpretation in order to render on the page. A pattern is dedicated to each of the three common types of Semantic Response: Plain-Text Message, XML Message, and JSON Message.
Time your website with
WebWait - from the creator of AjaxPatterns.org
