4th Dimension
Volume Number: 16
Issue Number: 4
Column Tag: Tools of the Trade
Looking into the 4th Dimension
by William Porter, Ph.D.
Jumping Right In
The idea for this article arose when I was writing my review of FileMaker Pro 5
(MacTECH, February 2000). I observed that FileMaker is great for end users but not
such a good tool for serious application development (in spite of the fact that clever
developers have made money using it that way). I had been working with 4D for a few
months when I wrote that review and naturally, I found myself thinking of 4D quite a
bit as I wrote. It occurred to me then that it might be useful to write an introduction to
4D for FileMaker Pro developers.
This article is that introduction. It's not meant as a review of 4D and it certainly does
not attempt to even mention all of the things 4D can do. It is simply a discussion of how
one might go about writing a simple database in 4D. This article presumes no prior
knowledge of 4D whatever, but you will get more out of the article if you have
downloaded the free demo of 4D from the ACI US web site and
spent an hour working through the tutorial that comes with it.
Unlike the tutorial that comes with 4D, this article focuses on writing basic 4D code.
And while I expect that anyone interested in learning how to get started with 4D will
find the article useful, I am speaking particularly to FileMaker Pro developers.
FileMaker thinks one way, and 4D thinks very differently. This article tries to
emphasize the conceptual differences between the two development environments. Once
you "get" 4D, that is, once you start to think the way it thinks, all that is left is the
details.
4th Dimension or 4D (the latter appears more common nowadays) is a relational
database management system (RDBMS), with a procedural programming language at
its core. Yes, it has a rich graphical user interface that allows users to define tables
and fields, create records and enter data, and do reports, all without writing a single
line of code. And yes, 4D has an http server built in so you can easily put your database
on the Web. But the real strength of 4D is the language. If you work with 4D, you will
start programming. The possibilities that the language provides are simply too
enticing to resist.
It is tempting to dwell in a general way upon the gross differences between 4D and
FileMaker, like 4D's lack of calculation and summary fields, 4D's ability to provide
custom menus, or its separation of data tables from the file containing forms and
programming elements. To be sure, these are very important differences. But a list of
abstract comparisons to FileMaker will actually tell you very little about what it is
like actually to work in 4D. Instead, I propose to jump right in and build a database.
The project we will work on is a simple checkbook management application. You can
download the database from the Polytrope Data Solutions web site:
. You will also find there, for comparison, a
FileMaker Pro version of essentially the same application. Since you have the ability
to download the database and take it apart, I'm only going to describe how certain parts
of it work, starting with some of the simpler parts and moving towards the parts that
require some programming.