An
Short Note About Visual Programming
Some time ago, when windowed environments became available on computers,
it became possible to write programs in C and C++ that made windowed applications.
These applications had all of the usual things you see with windowed environments,
including buttons, text boxes, etc. The problem was, that if you
wanted a button you had to specify where you wanted the button (top left,
bottom right, stuff like that), the color of the button, the caption on
the button, etc. Every single property that you specified took a
line of code. Even worse, you couldn't see what your application
looked like until you could get code that compiled and you could run it.
Since then, a number of more convenient environments have been developed.
Starting with ToolBook, then Visual Basic (a descendant of ToolBook), we
now have many kinds of visual programming environments (Visual versions
of C/C++, and the very popular LabView which is used for measurement applications,
for a few examples) which offer the following advantages.
-
You draw
your GUI directly. If you want to
place a button somewhere, you draw the button using a tool that looks very
much like what you find in a drawing program. You do the same thing
for text boxes, etc. In some things (Borland Builder) you add a component
to your GUI, then you reshape it.
-
You think in terms of
objects.
A button is an object. As such, it has properties
and methods.
(Those are not always the names used, but the concepts work. Sometimes
the methods are called functions, etc.) Properties are things like
button location, color, caption, etc. Methods are the functions that
are executed when certain events occur. A button click (down and
up) is an example of an event.
-
The programming you
do responds to events. When the text in a text box changes, something
might happen, etc.
-
You can make executable
files that can be transported to other computers, and you don't have to
have the compiler on the other computer. Sometimes you will have
to transfer some associated files.
-
Click here to look at
some visual programming environments.