Copy link to clipboard
Copied
Hi All,
This is probably answered elsewhere in the forums but I'm having a difficult time finding it or knowing what to search for. Does Business Catalyst allow for me to access data in a database using javascript AJAX calls?
I don't suppose it's possible to host a third party database in BC like MySQL or CouchDB, is there?
Thanks!
Copy link to clipboard
Copied
You do not have access to the server side code so you can not put in 3rd party databases etc. You do not have many AJAX calls to BC, you can submit a web form with JSON and a few things like that but your 3rd party access comes through the SOAP API.
Copy link to clipboard
Copied
Ok, so essentially if I have an application that relies on a third party database then I need to host it externally, correct?
Copy link to clipboard
Copied
Yep and API sync that information with BC.
Copy link to clipboard
Copied
You can pull the data via a standard GET request but because BC outputs HTML embed in javascript rather than JSON or JSONP hosting anything external you run into cross site browser sandboxes and it wont work.
I don't recommend this because you are re-inventing the wheel but if you wanted to call BC remotely and pull in content you would have to do it on an externally hosted solution server side and setup your BC (hosted) templates to only output the data you requested (rather than a full HTML page).
You could also use the API, but it is not build for real time events and it is slow and cumbersome, more build for syncing and queries that don't require a quick reply.