I work with a large site written in Ruby on Rails. Thanks to REST support in Rails 2, site business logic is accessible through a consistent XML API. Now I want to be able to easily write one or more JavaScript interfaces to a site that interacts with the created Rails XML interface.
Ideally, an automatic wrapper for an API can be created in JavaScript, as this minimizes the effort required to write XML processing code for more than 500 API functions. How then can I automatically generate a wrapper around this XML-API in JavaScript to make it more enjoyable to work? I have worked with Java solutions that generate classes and methods for porting the API, so my current thinking is that I want something like this for JavaScript. However, I would be ready for an alternative solution to the problem.
source share