Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to ActiveResource/ActiveRecord with a Delphi client

I've been looking for some way to let a Delphi program communicate with a RoR service. I could use any of the SOAP libraries out there e.g.: ActionWebService to offer a SOAP service, which I could then use in the Delphi program.

However, this requires one to reimplement all the ActiveRecord methods (such as find) over and over again. This is a hassle even if they are only delegation methods.

Who knows of a simpler / easier / cleaner way?

like image 521
Alessandro Vermeulen Avatar asked Nov 13 '22 12:11

Alessandro Vermeulen


1 Answers

There is no such bindings, REST isn't a protocol but just convention over http. I know about activeresource port for Java http://jactiveresource.org/ , but there is no such one for delphi. But you can watch sources of jactiveresource and try develop your own functionality. But you also can create rest client and wrap it with methods you need and unserialize responses into objects. Here is a short example http://dn.embarcadero.com/article/40449

like image 159
Fivell Avatar answered Jan 11 '23 01:01

Fivell