Had an interesting conversation the other day with Adam, our lead interface developer at Enomaly. He's been our key AJAX and API developer on the Enomaly ECP platform for several years. During our random afternoon chat he basically said that AJAX is quite possibly the worst way to consume a RESTful API. He pointed out the purpose of a RESTful approach to API development & implementation is in its similarities to HTTP and more generally uri/urls -- each of which is easily viewable both programmatic as well as visually. The problem is AJAX is kind of the opposite. Most of the things that make the web great, such as urls, hyperlinks and bookmarking are not easily done or seen in a AJAX application. All the benefits to a RESTful architecture are hidden by the AJAX itself making development longer, more difficult to debug and often harder to scale.
The conversation certainly got me thinking, not that I think we're going to abandon our AJAX interface and it could be worse, it could be flash based. I'm wondering what others think about the apparent dichotomy between AJAX and a RESTful API?