4th Dimension Learning Basics
Key Takeaways
- 4D (4th Dimension) is a relational database and low-code application platform from 4D SAS, used for decades to build custom business apps without a large engineering team.
- Unlike FileMaker Pro, which historically shipped without a true compiler, 4D offers a compilation step that can dramatically speed up execution and protect your design from casual inspection.
- Compilation in 4D is a separate product concern: the compiler is not part of the base Standard Edition and must be obtained through the Advanced Kit or the Developer Edition.
- Compiling produces a runtime application by embedding the 4D Engine, yielding a double-clickable, distributable program.
- The core trade-off is between development convenience (interpreted mode) and deployment performance/protection (compiled mode).
Introduction: What “4th Dimension Learning Basics” Covers
This page is part of a broader learning series on 4D, the fourth-generation relational database and rapid application development environment. The series walks through the foundational topics a new 4D developer needs: system requirements, program structures, networking differences, runtime differences, the compiler, web hosting, data charting, plug-ins, tools and utilities, and where to find further resources.
The topic on this page — the compiler — is one of the most consequential decisions you will make as a 4D developer, because it sits at the boundary between building an application and shipping one. Understanding what compilation does, when you need it, and what it costs in both money and workflow is essential before you commit to a deployment strategy.
A Brief History and Context
4D was originally developed by Laurent Ribardière and first released in the mid-1980s, making it one of the longest-lived database development platforms still in active use. It grew out of the same era that produced other fourth-generation languages and relational systems, and it has continuously evolved — through the classic 4D structure/compiler model, into 4D Server, and more recently into the ORDA (Object Relational Data Access) architecture and 4D’s modern low-code tooling.
That long history matters for a practical reason: much of the documentation, tutorials, and community knowledge you will encounter — including this series — reflects the classic model where you design a structure file, build forms and methods, and then optionally compile for deployment. Even as 4D modernizes, the conceptual building blocks (structures, methods, forms, value lists, runtimes) remain the mental model you need.
For background on the broader category of fourth-generation languages and relational databases, see the Wikipedia overview of fourth-generation programming languages and the relational database article.
The Compiler: 4D vs. FileMaker Pro
The original comparison on this page is worth restating clearly, because it captures a genuine architectural difference between two platforms that are often mentioned in the same breath.
FileMaker Pro (FMP) historically had no compiler. You built and ran your solution in an interpreted fashion, and FileMaker handled the runtime for you. This is convenient — there is no separate compile step, no separate compiler product to buy — but it means the design is inherently more open and execution is interpreted.
4D, by contrast, lets you compile your program. Compilation is an explicit step you choose to take, and it is not free: it requires the 4D Compiler, which is a separate product from the base Standard Edition of 4D.
This distinction is the heart of the page. If you are coming from FileMaker, the very idea of a compile step may be unfamiliar, and the licensing structure around it may surprise you.
What Compilation Actually Buys You
The original text lists two advantages of compiling a 4D structure file, and both deserve unpacking because they reflect real engineering trade-offs.
1. Performance. Some functions will work up to 1,000 times faster when compiled. The reason is fundamental to how interpreters and compilers differ: in interpreted mode, the 4D engine reads and evaluates your methods at runtime, translating each instruction as it goes. In compiled mode, your methods are translated ahead of time into a form the machine can execute directly, eliminating the per-instruction interpretation overhead. Loops, calculations, and tight data-processing routines — the places where interpreted overhead compounds — are exactly where the gains are largest. Not every operation speeds up by the same factor; the “up to 1,000 times” figure reflects best-case scenarios for compute-heavy code, not a uniform multiplier across your whole application.
2. Design protection. Compiling safeguards your design efforts from view. In interpreted mode, the structure and methods are more readily inspectable. When you compile, the resulting code is not human-readable in the same way, which protects your intellectual property — your business logic, your carefully tuned methods, your data model — from being copied or casually reverse-engineered by anyone who has the deployed application.
There is a third, often-overlooked benefit: deployment as a standalone runtime. When you compile a 4D structure file, you can embed another product called 4D Engine (purchased in addition to the 4D Compiler). Upon completion of compiling, this yields a double-clickable, compiled, runtime application. In other words, compilation is the mechanism by which a 4D solution becomes a distributable product that end users can launch without a full 4D development environment.
Licensing and Editions: How to Decide
The original page lays out the purchasing structure plainly, and it is worth presenting as a decision framework because the choice depends on where you are in your journey.
| Situation | What you need | Notes |
|---|---|---|
| Learning 4D, building prototypes | Standard Edition of 4D | No compiler included; interpreted development |
| Already own Standard Edition, now need to compile | Advanced Kit | Includes 4D Compiler and several other programs |
| Starting fresh and know you will compile | Developer Edition | Includes everything in both Standard Edition and Advanced Kit |
| Distributing a standalone app to end users | 4D Compiler plus 4D Engine | Engine is purchased in addition to the Compiler |
The original figures: the Advanced Kit can be purchased for $549 if you already have the Standard Edition, and the Developer Edition can be purchased for $799 as an initial purchase, including everything in both the Standard Edition and the Advanced Kit.
How to decide:
- If you are purely in learning and prototyping mode, the Standard Edition is sufficient. You can develop, test, and refine your structure and methods without ever compiling.
- If you have already invested in the Standard Edition and have now reached the point where you need performance or design protection, the Advanced Kit is the incremental upgrade path.
- If you are starting from scratch and already know you will ship a compiled application, buying the Developer Edition up front is the more economical route, since it bundles both.
- If your goal is to hand a double-clickable application to end users, budget for the 4D Engine as well — it is a separate purchase on top of the Compiler.
Note that these prices reflect the era in which this material was written (the copyright line reads 1994–2000). Current 4D pricing and edition names have evolved, so always confirm against 4D SAS’s official current offerings before purchasing. The structure of the decision — base edition, compiler add-on, engine for distribution — remains the useful mental model.
Interpreted vs. Compiled: A Practical Comparison
Understanding the trade-offs helps you choose the right mode for each phase of a project.
- Development speed: Interpreted mode wins. You can change a method and re-run immediately, with no compile cycle interrupting your flow.
- Runtime speed: Compiled mode wins, dramatically for compute-heavy code.
- Debugging: Interpreted mode is generally easier to step through and inspect, because the running code maps closely to what you wrote.
- Design confidentiality: Compiled mode wins; interpreted structures are more exposed.
- Distribution: Only compiled mode (with the 4D Engine) produces a standalone, double-clickable runtime application.
- Cost: Interpreted development needs only the base edition; compiled deployment requires the Compiler and, for distribution, the Engine.
A common and sensible workflow is to develop interpreted and deploy compiled. You iterate quickly during development, then compile once the solution is stable and ready to ship. This mirrors how developers work in many compiled languages: use the fast feedback loop while building, and pay the compile cost at release time.
Compilation in the Broader 4D Toolchain
The compiler does not exist in isolation. It sits alongside the other topics in this learning series, and understanding how they connect helps you plan a real project:
- Program structures define your tables, fields, relations, forms, and methods — the raw material the compiler processes.
- Networking differences and runtime differences determine how your application behaves when deployed across 4D Server and client machines versus a single-user setup.
- Web hosting capabilities let you expose 4D data and logic over the web, which changes your deployment and performance profile.
- Data charting and plug-ins extend what your application can do, and plug-ins in particular can affect compilation, since compiled code and plug-ins must be compatible.
- Tools and utilities help you manage, maintain, and troubleshoot the compiled result.
In short, the compiler is the bridge between the design-time world of structures and methods and the run-time world of a deployed application. Everything else in the series feeds into it.
Practical Guidance for New 4D Developers
If you are learning 4D today, here is a pragmatic path:
- Start interpreted. Build your structure, forms, and methods in the base edition. Focus on getting the data model and business logic right before worrying about performance.
- Learn the structure/method model thoroughly. The compiler rewards clean, well-organized methods; it does not rescue sloppy design.
- Identify performance-critical code. When you eventually compile, the biggest wins come from loops, calculations, and data-processing routines — know where they are in your application.
- Plan your deployment target early. If you will distribute a standalone app, factor in the Compiler and the 4D Engine from the start, both in budget and in your build process.
- Confirm current editions and pricing. The edition names and figures in classic documentation may differ from what 4D SAS offers now; verify before you buy.
For authoritative, current information, consult the official 4D developer documentation and the 4D SAS website directly, and lean on the active 4D developer community for platform-specific questions.
Frequently Asked Questions
Does FileMaker Pro have a compiler?
Historically, no — FileMaker Pro did not include a compiler, and solutions ran in an interpreted fashion with FileMaker handling the runtime. This is a key architectural difference from 4D, which offers an explicit compilation step. If you are migrating from FileMaker, expect the compile concept to be new to you.
Is the 4D Compiler included with the Standard Edition of 4D?
No. The 4D Compiler is not included with the Standard Edition of 4D. To compile, you need to obtain it separately — either by purchasing the Advanced Kit if you already own the Standard Edition, or by purchasing the Developer Edition, which bundles both the Standard Edition and the Advanced Kit.
How much faster is compiled 4D code?
The original guidance states that some functions will work up to 1,000 times faster when compiled. This is a best-case figure for compute-heavy code, not a uniform speedup across your entire application. Loops, calculations, and data-processing routines benefit most, because compilation removes the per-instruction interpretation overhead that compounds in tight code.
What is the 4D Engine, and do I need it?
The 4D Engine is a separate product that you can embed when compiling a 4D structure file. It must be purchased in addition to the 4D Compiler. Upon completion of compiling, embedding the Engine yields a double-clickable, compiled, runtime application — which is what you need if you intend to distribute a standalone program to end users.
Does compiling protect my source code?
Yes — one of the two main advantages of compiling is that your design efforts are safeguarded from view. Interpreted structures and methods are more readily inspectable, whereas compiled code is not human-readable in the same way. This protects your business logic and data model from being copied or casually reverse-engineered.
Should I develop in interpreted or compiled mode?
A common and effective approach is to develop interpreted and deploy compiled. Interpreted mode gives you a fast edit-and-run feedback loop with easier debugging, while compiled mode delivers the performance and design protection you want in a shipped product. Compile once your solution is stable and ready for release.
Frequently asked questions
Does FileMaker Pro have a compiler?
Historically, no — FileMaker Pro did not include a compiler, and solutions ran in an interpreted fashion with FileMaker handling the runtime. This is a key architectural difference from 4D, which offers an explicit compilation step. If you are migrating from FileMaker, expect the compile concept to be new to you.
Is the 4D Compiler included with the Standard Edition of 4D?
No. The 4D Compiler is not included with the Standard Edition of 4D. To compile, you need to obtain it separately — either by purchasing the Advanced Kit if you already own the Standard Edition, or by purchasing the Developer Edition, which bundles both the Standard Edition and the Advanced Kit.
How much faster is compiled 4D code?
The original guidance states that some functions will work up to 1,000 times faster when compiled. This is a best-case figure for compute-heavy code, not a uniform speedup across your entire application. Loops, calculations, and data-processing routines benefit most, because compilation removes the per-instruction interpretation overhead that compounds in tight code.
What is the 4D Engine, and do I need it?
The 4D Engine is a separate product that you can embed when compiling a 4D structure file. It must be purchased in addition to the 4D Compiler. Upon completion of compiling, embedding the Engine yields a double-clickable, compiled, runtime application — which is what you need if you intend to distribute a standalone program to end users.
Does compiling protect my source code?
Yes — one of the two main advantages of compiling is that your design efforts are safeguarded from view. Interpreted structures and methods are more readily inspectable, whereas compiled code is not human-readable in the same way. This protects your business logic and data model from being copied or casually reverse-engineered.
Should I develop in interpreted or compiled mode?
A common and effective approach is to develop interpreted and deploy compiled. Interpreted mode gives you a fast edit-and-run feedback loop with easier debugging, while compiled mode delivers the performance and design protection you want in a shipped product. Compile once your solution is stable and ready for release.
More on 4D (4th Dimension) database & low code app development tutorials
Browse our latest guides and reviews.
Read more →