Show/Hide Toolbars

TMS XData Documentation

Navigation: » No topics above this level «

Design-Time Components

Scroll Prev Top Next More

TMS XData provides several components for design-time usage. The main purpose is to provide a RAD experience, by just dropping components in the form and configuring them, allowing setting up servers with almost no line of code.


Even though you can use the components at runtime, creating them from code, that would usually be not necessary, as the components are just wrappers for the existing non-component classes, like TXDataServerModule or IDBConnectionPool.


Since TMS XData is based on TMS Sparkle components, you might want to read about TMS Sparkle design-time component usage, to learn more details about the architecture, like the common features and middleware system usage.


General usage is:


1. Drop a dispatcher component in the form (for example, TSparkeHttpSysDispatcher)


2. Drop a TXDataServer component in the form


3. Associated the TXDataServer component to the dispatcher through the Dispatcher property


4. Specify the BaseUrl property of the server (for example, http://+:2001/tms/xdata)


5. Set Active property of dispatcher component to true


From now on you can already create server-side business logic using service operations.

If you want to use database connection and the automatic entity publishing feature, follow the next steps:


6. Drop a TAureliusConnection in the form and configure it to connect to your database (you might need to drop additional database-access components, like TFDConnection if you want to use FireDac).


7. Drop a TXDataConnectionPool component and associated it to TAureliusConnection through the Connection property


8. Associated the TXDataServer component to the pool through the Pool property


Now your XData server is able to publish database data automatically and you can also use the TXDataOperationContext to use Aurelius to retrieve data from database.


You can also use the TAureliusConnection component to automatically generate Aurelius classes from the database, right-clicking the component and choosing "Generate entities from the database".