RemObjects SDK Beginners Guide, OData, REST

Hi, I am trying to choose the best Delphi framework to create a REST server. Ideally with OData support. I found DataAbstract which can create OData and I found Remote SDK HttpApi which can create REST api with swagger.

I have a few questions:

  1. Is there an updated version of the “SDK Beginners Guide” (RemObjects SDK Beginners Guide)?

  2. In the DataAbstract demos, the DAServer produces XML OData as output. Could it produce output in JSON format?

  3. Is there a demo that shows how to configure TDASchema in code (without using the Data Abstract Schema Modeler in the Delphi IDE)?

Thank you for the answers.

Sincerely,
Pavel Sala

Hi,

We have two documentation sites

I can recommend to check articles on these sites

OData supports XML and JSON output.

you can specify format

  • with $format=json (query parameter)

or

  • with accept: application/json (HTTP header)

We haven’t such demo, but you can fill it manually with code like:

var
    sc: TDASchema;
begin
    sc := TDASchema.Create(nil);
    sc.ConnectionManager := ConnectionManager;
    with sc.Datasets.Add do begin
      Name := 'table1';
      with Fields.Add do begin
        Name := 'fld1';
        DataType := datAutoInc;
      end;
    end;