Creating cross-platform clients. Delphi. Lazarus. Linux, Windows, Mac. Creating a client
Creating cross-platform clients
The purpose of this article is to demonstrate the creation of a native application that uses the functionality of the Credits platform using Thrift. The demo application will be created for three OS:
Developing an application for mobile platforms is discussed in the next article.
Application development is made on Windows OS.
Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous languages. Link http://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.exe.
Description of Delphi
Delphi - Community Edition (v.10.2.3)
Full-Featured Free Delphi IDE for Creating Native Cross-Platform Apps
Description of Lazarus (v.1.8.4)
Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.
api.thrift file with description of Credits API
Source code generation (pascal)
thrift --gen delphi api.thrift
the result will be a generated api.pas file
Required files to include in the project
the files are in the CS-Node project (https://github.com/CreditsCOM/CS-Node) at the path below
these files and the api.pas file must be added to your project.
The following is an example connection and check in a form of a message that the connection succeeded.
The look of the test application: