From different forums i have learned that directly connecting database over internet is not secure and fast. So i decided to use Xojo web app using handlespecialurl interface. but i have some doubts regarding this. Please answer the below points.
What is the best & fast method to transfer the data for a query like (select * from table). Is it using Jason / XML or raw data transfer the best
How to transfer picture / binary data stored in DB
Is there any other method that you recommend for connecting DB over internet
Check out the webinars from Paul LeFevbre (spelling?) about this topic. He recommends using a middlewere between the user and the server. This would use Json to transport the data with a REST API. For myself I’m planning to use Valentina Server for this which has a built-in REST service so that I hope to skip the middlewere.
The Valentina REST interface is similar to a traditional database plugin. You still have to provide connection details which means your application has a direct interface to the database. The reason for using middleware is to keep your database credentials secure and do any data sanitization before it hits the database. If you use the Valentina REST interface you might as well just connect directly using the plugin. It’s designed specifically for programming environments that do not have a native plugin.
JSON is not suitable for moving binary data. Probably easiest to base64 encode the picture before sending/receiving. Adds some computational and bandwidth overhead but keeps the payload simple.
JSON is more compact, so probably the better choice.
You can Base64 encode the binary data and embed in the JSON. Or you could provide a way to directly download the binary data separately, perhaps with another special URL supplied in the JSON.
In addition to what’s mentioned above, Luna might be worth looking at.