Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 4.23 KB

README.md

File metadata and controls

32 lines (22 loc) · 4.23 KB

TMS XData Template: Demo Data

This repository contains a TMS XData project - a REST API server - that serves up a variety of endpoints and sample data. This may be useful for those first learning to use TMS XData in their own projects. Or as a template for starting a new TMS XData project, with many core features, like Swagger and a Login endpoint, already in place. This project originated as part of a series of blog posts about using TMS XData and TMS WEB Core with different kinds of templates, the first of which can be found here.

A second repository, TMS WEB Core Template Demo, contains the implementation of an example web client application that works specifically with this REST API. It was created using a pre-release build of the AdminLTE 4 admin template, which works with Bootstrap 5.

Getting Started

In order to get the most of this repository, you'll need Delphi version 10 or later, as well as a current version of TMS XData. Note that these are licensed commercial products, but trial versions of both are available on their respective websites. Please review The Unlicense that applies to this repository.

The contents of this repository consist of a fully funcitional TMS XData project. It can be compiled and run as-is without further modification, which will generate a Win64 REST API server application. Several endpoints, sample data, a SQLite database, and Swagger are already configured.

image XData Server Application Running

Not much to look at, honestly, but that's just the server application. All it is primarily used for is starting and stopping the REST API server, and as it starts automatically, there's usually not much need to use it directly, hence the lack of much of a UI. The recommended way to test its functions is through the use of its Swagger interface, which is already configured in this project.

image Testing with Swagger Interface

Usage Note: RandomDLL.DLL

This DLL needs to be included in the same folder as the project executable. It is needed by the SHA-256 hash function that is used in several places, that, in turn, comes from the TMS Cryptography Pack. A post-build event has been added to the project to do this automatically. This assumes that a Win64 project is being built. Please adjust accordingly.

Key Dependencies

As with any modern application, other libraries/dependencies have been used in this project.

Contributions

Initially, this example uses SQLite as its database, as well as a collection of include files for all of the SQL operations that have been implemented so far. Over time, this will be expanded to include support for more databases and more queries. If there's a database you'd like to see included in the template, by all means please post an Issue or, if you're able, make a Pull Request and we'll see that it gets added.

Sponsor / Donate / Support

If you find this work interesting, helpful, or useful, or that it has sved you time, money, or both, please consider direclty supporting these efforts financially via GitHub Sponsors or donating via Buy Me a Pizza. Also, be sure to check out these other GitHub Repositories that may be of interest to you.