Skip to content
Home » Company » Sample applications and example code

Sample applications and example code

Working with the latest Internet and Web technologies, such as JavaScript, JSON, JSONP and Ajax, to name but a few, we are always finding solutions to software problems that we feel may also benefit others. So, rather than keep valuable knowledge to ourselves, we have dedicated this part of our website to publishing some of our sample applications and example code here.

Sample code

In addition to the sample applications and example code here, you may also like to view our blog articles, white papers and presentations available from the Company menu heading. If you are specifically searching for DataFlex related code examples, we also recommend that you visit DataFlex.wiki, refer to the DataFlex Online help or use our “DataFlex world” search.


DataFlex client for ChatGPT

Just for fun – some sample code for using ChatGPT API with DataFlex. See github.com/DataFlexCode/ChatGPTAPI.


RESTGen – a DataFlex utility

As the name suggests, this is a DataFlex program which will generate DataFlex struct packages, including handling code) from sample JSON.

It is really just a small utility to save (huge amounts of) time when building clients for REST APIs (especially for the Microsoft Office 365 API).  When DF 19.0 came out with JSON Objects, it was almost entirely rewritten to be used for a course.  Now it is full of stuff, and generates code full of stuff, which improvements in DF19.1 now render unneeded.

Bottom line: at the time (DF 18.x-19.0) it was very much needed, and it still works, but much of that functionality is now redundant.  The only thing it still usefully does is to build the structs to match the JSON required for and returned by REST APIs, which isn’t trivial. It could probably be improved with a rewrite. 

Get the RESTGen utility from GitHub


Binary File Converter sample view for DataFlex

Prompted by a question on the DataFlex forums about converting a binary file, we have created a sample view that you can download and use for free.

Read the post Working with binary files in DataFlex


Demo showing effects of process pooling

When asked the question ‘what can I use to replace the windows popup “Yes/No” confirmation?‘ by a developer getting to grips with WebApp programming (we’ve all been there and it isn’t the easiest), as well as answering the question, I wrote a small web view to illustrate the mechanism. After doing that I enhanced it a bit for anybody who might find it useful (either for learning or for instruction).

Read the post DataFlex WebApp Process Pooling Demo


Basic example of Google Charts with DataFlex WebApp

A DataFlex wrapper component for the Google Charts component.

A wrapper consists of multiple parts working together, so that you can use the control directly from your DataFlex web application. The first two elements are the client-side JavaScript part (actually a JavaScript pseudo-class) and the server-side DataFlex class, which together make up the new component…

Read the full article about how to display a Google Chart from a DataFlex WebApp View


WebQuery for Visual DataFlex – Open Source Reporting

WebQuery is a view you can include in your own Visual DataFlex 17.1 (or higher) WebApp programs to provide users with an ad hoc reporting capability. Note, WebQuery is a reimplementation of Sture Andersen’s VDFQuery Windows utility as a VDF 17.1 WebApp Framework.

Read about WebQuery for Visual DataFlex – Open Source Reporting


Visual DataFlex 17.0 AjaxWeb sample customer data

A Customer information maintenance application using web services to access the Visual DataFlex 17.0 AjaxWeb sample customer data.


Creating a Customer Location Map Javascript Example

Illustrates a way of creating a map that displays customer locations and key details, such as names and addresses with the ability to filter the map results to show only certain categories of customers…

Read about Creating a Customer Location Map with Javascript


VDF Ajax JSON Interface Example

An example intended to demonstrate how you can interact with the Visual DataFlex (VDF) Ajax interface using JSON as the communication protocol…

Read about the VDF Ajax JSON Interface Example


Image attribution Business vector created by macrovector_official – www.freepik.com