While using visual objects as programming building blocks is often criticized as being exceptionally demanding of system resources, more and more programmers are taking advantage of reusable objects to quickly assemble user interfaces and reduce the complexity of many programming tasks. Most programmers have at least tried Microsoft's Visual Basic, whose screen components and VBX modules accomplish both of these goals.
Visual programming strongly implies graphics, since manipulating program components using a mouse is at the heart of the visual model. It also implies an object-oriented, or at least object-like, view of a program. There is nothing like representing every program activity as a screen object to reinforce object-oriented principles, even if that component is not an "object" in the strictest sense. Both graphics and objects have only recently entered the computing mainstream. As a result, there are an increasing number of different tools that offer either, or both, and have consequently acquired the visual label.
Interface builders are the most common implement of visual programming available today. These tools typically let developers assemble a user interface (UI) from predefined components. They hook that interface into some event-handling code and from there to the underlying computational engine. This is still the primary use of Visual Basic. However, the most sophisticated visual programming languages go beyond the interface builder to complete applications development. Not only is the UI a set of objects, but the computational engine can also be assembled in the same manner.
The object revolution has forced many programmers to turn, willingly or unwillingly, to languages such as C++ or Smalltalk to tackle some of the most complex and difficult software-development tasks they have attempted. Objects are supposed to ease the burden on programmers, but many of the concepts in the popular object-oriented languages today can be difficult to understand.
One tool that combines the benefits of objects with those of a visual language is PARTS from Digitalk (Santa Ana, CA), a longtime Smalltalk vendor that's turned its object-oriented expertise to an innovative software-development environment on the PC. PARTS is an object-oriented, visual programming language that eases the development of object-oriented applications while providing powerful tools for integrating existing applications. Both the OS/2 and 32-bit Windows versions of PARTS require a minimum of 8 Mbytes of memory, along with at least an equal amount of virtual memory, but these resource needs are a small price to pay for its programming power.
PARTS combines a sophisticated, visual interface builder with object-oriented operations. PARTS, based on Smalltalk/V, is truly object oriented. You construct your UI out of predefined screen objects (menus, dialog boxes, and other components), then connect them to other objects that define the activities of the UI. For example, the multiplication button on a calculator UI can be connected to a multiplication object that actually performs the work. This is what programming with PARTS is all about.
PARTS also gives you the ability to create your own visual components and to inherit characteristics from existing components. You can develop these components in a traditional structured language or using the PARTS scripting language, which is a derivative of Smalltalk/V. This makes it possible for PARTS to work with existing programs.
An older object-oriented visual programming environment is NextStep's Inter-
face Builder (Next, Redwood City, CA), which has progressed from being radical at its 1988 introduction, to merely innovative today. Screen objects available from a class library can be picked and placed on the display and connected to one another and to other objects.
An application starts with the Project Builder. Here, you can select and manage project files, objects, resources, and makefiles. Files can be managed across networks, and applications can be made up of multiple subprojects and bundles. These features support team development efforts as well as the ability to bundle and reuse code across applications.
The Interface Builder gives you a workspace to place windows, menus, buttons, images, and even sounds into a UI. These components are true objects, and their characteristics and behaviors can be modified, inherited, or used as is. As in PARTS, events are intercepted by the object and passed to handler code. This is done programmatically by connecting the interface object with the computational engine, simply by drawing a line between the two objects. The Interface Builder also includes a comprehensive set of debugging tools, including an object and class inspector, application stepper, and stack browser.
Behind the Interface Builder is Objective-C and the NextStep class library, a comprehensive collection of UI components arranged in a class hierarchy. While it appears that the object-oriented C wars have been won by C++, many programmers think that Objective-C has a more elegant environment. Still, you can work in C++ or even C, and wrap the code in C-function wrappers to be recognized by the Interface Builder as an object. For some simple applications, there's no need to write any code--the necessary objects already exist in the class library. Such applications, however, rely almost entirely on UI operations. For anything beyond trivial applications, expect to turn to Objective-C or another C-based language.
These are not the only two tools that let you write programs visually. Novell's Visual AppBuilder provides components for transparently running a server application locally or across a network. Prograph, from Prograph International(Halifax, Nova Scotia), was among the first visual programming languages and is useful for database access.
The question remains as to whether use of visual languages can progress beyond simple demonstration applications to large-scale software-development efforts. The snappy demonstrations that come with the software may not be readily scalable to more complicated tasks. One developer told me that the tool he was using "fell apart" with applications using more than 300 objects.
Tools that interact with existing technologies may turn out to be the most useful. For example, PARTS lets you encapsulate existing traditional C or Cobol code as a PARTS object, allowing you to abstract an existing engine and visually extend it to include a GUI and other functions. NextStep's Interface Builder does the same thing with different dialects of C. However, visual languages are improving, and it may only be a matter of time before virtually all end-user applications are pieced together rather than coded.