Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Using EDB as a web / cloud - based back-end
Fri, Dec 8 2017 10:14 AMPermanent Link

Adam Brett

Orixa Systems

I have Delphi apps which access EDB data via remote IP addresses, with the data stored on the cloud.

However, I am getting requests for (controlled) access to the data from others for instance Web-dev's who want to stick some lists from my data onto pages (i.e. customer statements, stock-levels etc.)

Are other EDB users doing similar stuff & if so how?

I would ideally like to write something using Delphi which can surface the data in a form other developers will be happy with, and in response to requests which they can easily generate.

I am obviously thinking about WebBroker, DataSnap ... but there are plenty of options, and I would love to hear experiences, recommendations, gotchas etc.
Fri, Dec 8 2017 11:00 AMPermanent Link

Matthew Jones

Adam Brett wrote:

> and in response to requests which they can easily generate.

You can create a REST interface in various ways in Delphi, making a Windows service that provides access. You can also make one in C#/.Net if you want. I've used RemObjects a lot, and that is based on an "Remote Procedure Call" design, but they recently added REST capability, and it works fine.

Anyway, my main thought is that you really must not allow direct SQL access. They should put in a request for a list of customers, and your code would make the SQL (parameterising and filters to protect against injection), and return the results as JSON. Never allow SQL from the web.

Oh, and be careful on the JSON. Delphi has an object to JSON function which is designed to allow you to recreate the object later. But it adds meta-data which is not "good JSON", so makes a mess for web people.

Good luck - ask specifics if you have to. There has been discussion of options for this in the WebBuilder topics, and that might be worth looking for. (Search for RemObjects and you'll find mine and others' detailed info.)

--

Matthew Jones
Tue, Dec 12 2017 11:59 AMPermanent Link

Adam Brett

Orixa Systems

Thanks Matthew,

Sorry, I was using short-hand when I used the term "SQL", I didn't really mean trying to surface a full SQL interface, rather having a framework which created the ability to access data via a reasonably clear "SQL-Like" interface.

I will search the user-groups with the terms you suggest, and look at REMObjects, which I have heard of, but don't use. That is really helpful.

I have been warned about native Delphi JSON code, that is "messes things up" by other people, which was part of the reason for my query. Trying to find a reliable technology people use and that is reasonably well designed.

I did wonder whether anyone had used TMS's XData components too ... ??

As I use a few TMS components already and they are pretty decent.
Image