Auto Tables Logger REST Client And RAD Server Sample For Delphi 10.2 Tokyo On Android And IOS

Auto Tables for RAD Server is a client server solution which auto generates a REST API client/server/OpenAPI for your databases. The sample application and database that comes Auto Tables for RAD Server is called Logger and uses InterBase. You can swap out InterBase for any other database supported by FireDAC. I went ahead and generated the Logger sample project in the Auto Tables Editor and it is provided with this post. The client project should run on Android, IOS, OSX, Windows, and Linux (through FMXLinux). The server should run on Windows and Linux but has only been tested on Windows. I hooked up the LiveBindings in the client to some TStringGrids and some buttons to execute the REST API calls. There are three REST endpoints which are correspond to GET POST and DELETE. GetLogger for requesting the list of records from the Logger database table. PostLogger for posting a new record into the Logger database table. And finally DeleteLogger for deleting a recording out of the Logger database table. All of the REST API are made to the included RAD Server project. As you will see in the RAD Server project the endpoints are contained within a TFDMemTable. The Auto Tables Editor also generates a FireDAC JSON file which can be loaded into the TFDMemTable inside the sample RAD Server project. This allows you to make changes to the REST API endpoints without having to entirely re-generate the server project. As you will see in the sample the documentation for the REST API is provided via Swagger-UI in the Docs directory of the sample. Here is the entire source code that I added to the sample project after the auto generation of the client and server were complete.

Download the full source for the Auto Tables For RAD Server Sample Logger solution.

Browse and download the full source code for the Auto Tables For RAD Server Sample Logger solution on GitHub.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Auto Generate REST API Clients In FireMonkey With Delphi 10.2 Tokyo For Android And IOS

Auto Tables for RAD Server is a powerful automation solution that allows you to automatically generate a REST API in...

Close