Skip to content

Learning from the Examples

DataFlex combines Windows, Web, and Web Service application development into one environment. Sample applications are provided with the product for each of these application types. The sample applications demonstrate many useful features and methods that developers want to incorporate into their applications.

We strongly recommend studying the samples and the development tools as a means of learning DataFlex. The samples also showcase specific techniques and solutions to common issues developers may find.

The best way to study the samples is to first just run them. Open the sample workspaces and press F5 (Debug | Run) without looking at any of the code. This will give you a chance to see all the features available and get a feel for what the samples do. Then, go back to the Studio and run the samples through the Debugger, using the debugger windows (Debugger | Windows menu options) to investigate the code and what is happening behind the scenes.

While exploring the samples, make sure to use the online Help, the Code Editor resources (like CodeSense, QuickInfo, Go To Definition, and so on), and the multiple Studio panels (like Table Editor, Data Dictionary Modeler, Properties, Code Explorer, DDO Explorer, Project Properties, and so on) to learn more about the samples, understand the concepts they demonstrate, and get familiar with what the Studio environment has to offer.

One more thing you might want to use: Find in Files (Text | Find | Find In Files). This will give you a chance to know even more about the samples and how their code is structured.

Examples

Order Entry System (Web Application)

A simple order entry system containing:

  • A web view (Order) that shows how to display order header and details in the same view using web forms and a web grid.
  • Pre-filled payment terms and shipping options (web combo forms using validation objects).
  • Web look-up dialogs that display extra information for indexed fields.
  • Order totals automatically updated as you enter order items.
  • Various reports using DataFlex Reports integration.
  • Links to live DataFlex Reports and DynamicAI sites.
  • A set of views and dialogs that demonstrate the various web controls and techniques (grids, treeviews, sliders, panels, cards, etc.).

Common Library

Library used by Order Entry and Contact Management samples. It contains common classes used in the samples. Some of those classes are:

  • cComCalendar
  • cComDbCalendar
  • cComMediaPlayer
  • cComWebBrowser

Order Entry System (Windows Application)

A simple order entry system containing:

  • A Windows application.
  • Various reports with sorting and output options using WinPrint (cWinReport2).
  • A Customer List report that uses BasicReport and can be previewed in Notepad.
  • A view (Order) that shows how to display order header and details in the same view using forms and a grid.
  • Pre-filled payment terms and shipping options (combo forms using validation objects).
  • Look-up dialogs that display extra information for indexed fields.
  • Order totals automatically updated as you enter order items.
  • Library usage.

Language Techniques

Various projects that demonstrate specific techniques that the language offers out-of-the-box, like:

  • Embedded SQL
  • RichEdit controls
  • Multi-media
  • Treeview
  • Email client
  • File Transfer
  • XML
  • Containers, including splitter and scrolling containers

Utilities

Code Validation Maintenance

Maintenance for standard code validation tables (CodeType/CodeMast tables). It contains a view to edit the codes and descriptions and a report to list all existing codes/descriptions.

Data Conversion Wizard

Wizard used to convert data between OEM and ANSI character formats. It contains a Wizard class and a wizard dialog that goes through multiple pages to gather the options to perform the table format conversion.

Web Services Examples

Various examples of client calls to web services, including:

  • Views demonstrating how to call and use web services to display data, transfer and update customer records (using arrays/structs and XML), calculate totals, and so on.
  • A helper view that displays details on the web service request and response.
  • Web service classes generated from selected WSDL files.