Build Your Own Application with 4GL and the VDC¶
Welcome. This guide teaches you how to write your own business applications using the Aubit 4GL language together with the VDC desktop client (currently VDC5, a modern Qt-based GUI).
You do not need any prior 4GL experience. We start from a single line of code, build up to real forms and database access, and finish with the commands you use to compile and ship a complete program.
What is this stack?¶
You write your program once, in a compact business-oriented language, and it runs behind a rich graphical client — without writing a single line of GUI code by hand.
| Layer | What it is | Your job |
|---|---|---|
| Aubit 4GL | A 4th-generation language for data-driven business apps | Write the logic and the screens |
Form (.per) |
A plain-text description of a screen and its fields | Lay out fields, pick widgets |
| VDC client | The graphical front-end the user actually sees and clicks | Nothing — it renders your forms |
The client / server model¶
The key idea: your program and the screen run in two different places.
+------------------------+ XML protocol +---------------------+
| Your 4GL program | <------------------------------> | VDC client (GUI) |
| (logic + SQL + forms) | over a TCP connection | windows, buttons, |
| runs on the server | | fields, the mouse |
+------------------------+ +---------------------+
Your compiled program contains the business logic and the database access. It does not draw anything itself. Instead it sends a description of each window to the VDC client, and the client draws it, collects what the user types, and sends the results back. This is why the same program works on a desktop client and a mobile client without any code change.
You will set up this connection in Getting Started.
How this guide is organized¶
Read it in order the first time — each chapter builds on the previous one. Later, use it as a reference.
| # | Chapter | You will learn |
|---|---|---|
| 1 | Getting Started | Set up the tools, connect to the client, run your first program |
| 2 | Language Basics | Variables, control flow, functions, arrays, the gotchas |
| 3 | Forms and Widgets | Write a .per form; every field type and its attributes |
| 4 | Screens, Input and Menus | Display data, collect input, drive a window with a menu |
| 5 | Working with Arrays | Show and edit lists with DISPLAY ARRAY / INPUT ARRAY |
| 6 | Talking to the Database | SELECT, cursors, INSERT/UPDATE/DELETE, transactions |
| 7 | Talking to the VDC Client | Themes, hiding fields, toast notifications, modern features |
| 8 | Building and Running | Compile single files, multi-file programs, forms, libraries |
| 9 | Quick Reference | Data types, operators, built-in functions, environment vars |
| 10 | UI Function Reference | Every ui.* call: titles, fields, combos, toasts, progress, documents |
| 11 | Language Reference | Every statement and built-in function, with syntax |
| 12 | Command-line Tools | 4glc, 4glpc, fcompile, database & analysis tools |
What you will build¶
By the end you will be able to write a small but complete application: a window with a form, fields the user can edit, a scrollable list of records, full database read/write, and the commands to compile and run it.
A note on style. The examples here are deliberately neutral and self-contained. Type them in, compile them, run them, and change them. That is the fastest way to learn 4GL.
Ready? Start with Getting Started.