Hi Colin,
I'm glad you enjoy BaseX, and the newly added http server.
I guess I'd go with 2 or 3 - where 3 maybe has the caveat that you have to have another server running. I made some good experiences using jQuery with jsonp, it's especially useful if you directly return json encoded results, our wiki [1] has some examples on serializing json.
Hope this helps, feel free to further discuss (or report your experiences on) this topic in our list.
Thanks
Michael
Am 18.10.2011 um 16:43 schrieb colin mcenearney:
Hi,
I just installed basex for the first time and I am very impressed and really looking forward to using it. Thanks for making such a great tool available for free!
I'm not really a developer so this might be an obvious question: using basex's http server, what is the best strategy for ajax-style communication between browser and db?
I am aware of a few approaches:
- direct httprequest to host:8984/my_db/somequery, but going across ports seems to violate "same origin policy"
- using jsonp
- calling from browser to server-script (like the php example in basex docs), which handles request to the db