I’m looking at the best type of api to create for a particular
project. Although this isn’t really ruby/rails specific other then it
will be written in ruby, it’s probably an area that many people on
this list deal with.
The api is delivering information that will primarily be displayed in
report and list formats. Customers, orders, transaction histories,
etc… The end use is that the content for a web interface will be
fetched via this api. It will be integrated into many different
types of software in different languages.
My first thought was to use xml for the data format. Good points are
that it’s well known and it’s easy to represent nested data
structures. The bad side is that leaves quite a bit of work to
implement it on the end user side.
The other idea was to let users create html templates on the server
side using a simple language, or maybe even something like erb. This
would move a lot of the processing to the server end, but make things
a lot easier for end users that just want the easiest way to display a
list or report. Xml could always be an option for those that want it.
I’m also playing around with the idea of an activerecord adaptor
specific to the data set we will have available. There will also be
request types that can modify data in our system as well as retrieve
it, and an activerecord adaptor would make it easy for rails folks to
plug into their own rails apps.
Any other ideas are appreciated!