for an ajax heavy web application which would be better SOAP or REST?
- by coder
I'm building an ajax heavy application (client-side strictly html/css/js) which will be getting all the data and using server business logic via webservices.
I know REST seems to be the hot topic but I can't find any good arguments. The main argument seems to be its "light-weight".
My impression so far is that wsdl/soap based services are more expressive and allow for more a more complex transfer of data. It appears that soap would be more useful in the application I'm building where the only code consuming the services will be the js downloaded in the client browser.
REST on the other hand seems to have a smaller entry barrier and so can be more useful for services like twitter in allowing other developers to consume these services easily. Also, REST seems to Te better suited for simple data transfers.
So in summary SOAP is useful for complex data transfer and REST is useful in simple data transfer.
I'm currently under the impression that using SOAP would be best due to the complexity of the messages but perhaps there's other factors. What are your thoughts on the pros/cons of soap/rest for a heavy ajax web app?