What is a 4D Language?
The 4th Dimension language is not very different from the spoken language
we use every day. It is a form of communication used to express ideas,
inform, and instruct. Like a spoken language, 4th Dimension has its
own vocabulary, grammar, and syntax; you use it to tell 4th Dimension
how to manage your database and data.
You do not need to know everything in the language in order to work
effectively with 4th Dimension. In order to speak, you do not need to
know the entire English language; in fact, you can have a small vocabulary
and still be quite eloquent. The 4th Dimension language is much the
same you only need to know a small part of the language to become productive,
and you can learn the rest as the need arises.
Methods are the Gateway to the Language
A method is a series of instructions that causes 4th Dimension to perform
a task. Each line of instruction in a method is called a statement.
Each statement is composed of parts of the language.
Because you have already worked through the Quickstart tutorials (you
did go through Quickstart, didn't you?), you have already written and
used methods.
You can create five types of methods with 4th Dimension:
-Object Methods: Usually short methods used to control form objects.
-Form Methods: Manage the display or printing of a form.
-Table Methods/Triggers: Used to enforce the rules of your database.
-Project methods: Methods that are available for use throughout your
database. For example, methods that can be attached to menus.
-Database methods: Execute initializations or special actions when
a database is opened or closed, or when a Web browser connects to your
database published as a Web Server on Internet an Intranet.
Developing Your Database
Development is the process of customizing a database using the language
and other built-in tools.
By simply creating a database, you have already taken the first steps
to using the language. All the parts of your database the tables and
fields, the forms and their objects, and the menus—are tied to the language.
The 4th Dimension language "knows" about all of these parts
of your database.
Perhaps your first use of the language is to add a method to a form
object in order to control data entry. Later, you might add a form method
to control the display of your form. As the database becomes more complex,
you can add a menu bar with project methods to completely customize
your database.
As with other aspects of 4th Dimension, development is a very flexible
process. There is no formal path to take during development you can
develop in a manner with which you are comfortable. There are, of course,
some general patterns in the process.
-Implementation: Implement your design in the Design environment.
-Testing: You try out the design in the User environment and perhaps
stay there to use your customized database.
Usage: When your database is fully customized, you use it in the Custom
Menus environment.
-Corrections: If you find errors, you return to the Design environment
to fix them.
Special development support tools, hidden until needed, are built into
4th Dimension. As you use the language more frequently, you will find
that these tools facilitate the development process. For example, the
Method Editor catches typing errors and formats your work; the Interpreter
(the engine that runs the language) catches errors in syntax and shows
you where and what they are; and the Debugger lets you monitor the execution
of your methods to catch errors in design.