The Server Project

Overview

Server application project optionally created by the New Project wizard is a fully functional Data Abstract server application. Generated project contains all necessary components and can be used as is, without any adjustments, or be used as a basis for more advanced server application.

Note: For this article was used "VCL" template because created application can be started as Windows service.

Right after being generated server application provides following features:

  • Fully functional Data Abstract server
  • Optional OData and Business Rules Scripting support.
  • 2 application run modes - GUI mode or Windows Service
  • Windows Service management (installation/deinstallation)

Server based applications recognizes following command-line arguments (not case-sensitive):

Parameters
Description
/install Install service
/uninstall Uninstall service

This article describes server application components.

Project Contents

Project Overview

Server application project is a VCL application that can be run as ordinal GUI application or as Windows Service.

Newly generated server application project contains following components:

File
Description
RODL file Contains definitions of all remote services exposed by this Data Abstract server.
This file is used to generate Invoker and Interface code files.
_Intf and _Invk files Invoker and Interface code files generated based on the server RODL file.
Note: these files will be created/updated automatically after each compilation of project.
DataService_Impl.pas Auto-generated implementation of the Data Abstract data access service
fServerDataModule.pas This datamodule contains all server components needed for an Data Abstract server
LoginService_Impl.pas Auto-generated implementation of the Data Abstract user authentication service
fServerForm.pas Main server form.

Most important application components are described in more details below

RODL file and Invoker and interface files

RODL file can be edited using Service Builder.

For this, launch Service Builder via Tools->Remoting SDK & Data Abstract->Edit Service Library from IDE menu. Invoker and Interface files will be regenerated automatically to reflect all changes made to the RODL.

By other hand, Invoker and Interface files can be regenerated via Tools->Remoting SDK & Data Abstract->Regenerate Units from RODL.

Note: in most cases there is no need to add any custom methods to the DataService and LoginService definitions.

fServerDataModule.pas

This datamodule contains some important components of the Data Abstract server:

Sub-component
Description
Server Server Channel that performs low-level communications with the client.
Message Message component that performs protocol-specific data serialization and deserialization
SessionManager Optional Session Management component that stores session data.
AESEncryptionEnvelope Optional AES Encryption Envelope component that encrypts data sent over the wire
DriverManager The TDADriverManager component manages the database drivers available in a server application
ConnectionManager The TDAConnectionManager component maintains the list of connections.
DataDictionary The TDADataDictionary component is used to store a number of predefined field configurations.
ODataSchemaDispatcher Optional TDAODataSchemaDispatcher component exposes DataAbstract service with all associated business logic as OData service, giving possibility a cross platform way for accessing its data.

Data Access Service and Login Service implementations

Data Access Service implementation is generated automatically and can be used AS IS except cases when service schema should be changed. For this select Edit Schema from popup menu of Schema component.

At the same time one has to re-implement the Login event of the Login Service.

This event should call code that checks user credentials and performs authentication procedure. Authentication code generated by default is very simple and accepts any user credentials where user name and password match.

Summary

The New Project Wizard creates fully functional and easily extensible Data Abstract server application.

See Also