views:

762

answers:

1

Can Someone show me a good example of one Adobe Air App (using Javascript) consuming a REST API?

+1  A: 

If you're planning to build the functionality using Javascript - as opposed to Flex - then AFAIK you don't need to examples that are AIR-specific; the JS code can and should be the same as if the application was running in a standard browser. Any general tutorial about using RESTful web services with Javascript (or AJAX) should suffice. While I don't know of any specific tutorial with that approach, there are probably a few out there.

Even if you don't find any tutorials or examples focused specifically on using RESTful web services with Javascript, you should still be able to get by just by understanding that the JS XMLHttpRequest object is essentially just a fairly standard HTTP client tool. Once you understand that, you can learn about REST and HTTP separately, and then combine the knowledge together to build your app.

I highly recommend the book RESTful Web Services; it has excellent explanations of RESTful Web Services and has the perfect balance between theory and practice. It even has a chapter entitled "Ajax Applications as REST Clients". So you may want to pick it up.

Avi Flax

related questions