Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesA Whole Other Galaxy


July 1995 / Reviews / A Whole Other Galaxy

It's big, expensive, and learning-intensive, but Visix's development environment is cross-platform and object-oriented without compromises

Barry Nance

Developing object-oriented applications to run natively on many hardware platforms requires a lot of code--and a lot of compromises. Visix Software dispenses with the compromises in Galaxy, a complex, high-end development environment.

Galaxy consists of several thousand object-oriented API functions. The APIs are embodied in link libraries, a visual screen-design tool, a help compiler, and a run-time service broker that supplies distributed services on a LAN. You use C or C++ compilers to produce the code you link with the Galaxy libraries.

Intended for vertical-market data processing in a distributed, LAN-based setting, Galaxy avoids the lowest-common-denomina tor approach to cross-platform development. For platforms that don't offer a particular feature (e.g., CUA [Common User Access] controls on the Macintosh), Galaxy supplies the behavior itself. Galaxy's consistent interfaces present high-level abstraction to the programmer while it tightly couples itself to or replaces the services of the native platform.

A Galaxy of Options

Cross-platform development has come a long way since Borland International's $49 Turbo Pascal compiler that came in DOS and CP/M versions. The current state of the art lets you produce computer programs that run equally well on Macintosh System 7, Windows 3.x, Windows 95, Windows NT, OpenVMS, Unix, and OS/2. Although most cross-platform environments concentrate almost completely on the management of the GUI screen, Galaxy goes a step further and offers file and directory management, memory management, and RPC (remote procedure call)-like distributed-processing services. Visix says a future edition of Galaxy- -in beta test at this writing--will add relational database access through a standardized SQL delivery system.

We evaluated Galaxy 2.5 on a PowerMac 6100 running System 7.5, a Twinhead 486/33 notebook running OS/2 Warp, and an IBM PS/ValuePoint running Windows 3.11. Before we could begin the evaluation, we had to go to school: Visix insists that its customers go through a 4 1/2-day training program before using Galaxy. The product's price includes the training (but not the travel and lodging). The training seminars are friendly, relaxed, comprehensive, and conducive to learning the complexities of Galaxy. Visix also supplies a wealth of sample programs. The samples are the same for all platforms. Only the make file varies for the different operating environments.

C Is the Word

You can develop Galaxy-based software using a variety of 32-bit compilers, including Borland's C/C++ 4.5, Symantec's Think C 6.0, Watcom's C/C++ 10.0, and IBM's C Set++ 2.0. Vi six supports only C and C++, but we had some success linking MicroFocus COBOL programs with the Galaxy libraries in an experiment we performed. Visix should consider supporting other computer languages in the future: C and C++ aren't always the best tools for developing business software.

Visix implements Galaxy as a set of class libraries. The naming convention for the API functions is v< prefix >< verb >< noun >. Prefix identifies the Galaxy manager module for that API. Verb is typically set, get, load, init, destroy, open, or close. And noun indicates the target on which the function operates. vdialogOpen() is an example of a Galaxy function (one that doesn't need a noun, because the noun is the same as the prefix). vbuttonSetBackground() is another.

The Galaxy class libraries give C programmers an object-oriented perspective on software development through class hierarchies and functions the programmer can use to dynamically m odify the Galaxy environment. Through Galaxy "metafunctions" (our term), you can customize a number of Galaxy functions to add new behavior. The effect is similar to using C++ inheritance to customize the methods of an existing class. The result is superb parallelism and consistency between APIs, which brings Galaxy's complexity down to a manageable level.

Managers, Managers Everywhere

Galaxy's architecture consists of more than 50 managers, with each manager handling some functional classification (see the table "Selected Function Class Managers" ). These include abstractions for distributed computing, the GUI, OS services, structural matters, and the windowing system.

The distributed-computing services let you target some of the logic of your application to run on different computers. The GUI abstractions build and manage the individual graphical controls (e.g., buttons, list boxes, and menus). The OS managers handle memory, file-system, and t imer issues. The structural managers provide the framework for the entire Galaxy environment and supply interprocess communications between Galaxy components. And the windowing-system managers abstract such window services as the clipboard, cursor shape, font selection, image rendering, printing (PostScript), and drag and drop. Also included are services that support internationalization. If you wish to use native services in your program, you can do so. However, you forgo the platform-independence that Galaxy offers.

The Galaxy API itself consists of about 3500 functions (you will need the training), but the consistent naming and design of the functions within each manager group make it possible for you to learn and use Galaxy without constantly referring to the extensive printed documentation.

Visix designed a sophisticated relationship manager in Galaxy, called the Command Manager, that separates operating-environment events (e.g., a mouse-click) from the code that you want to execut e when the event happens. With the Command Manager, you give each event a name and specify which chunk of code Galaxy should run for that name. You can thus perform some program maintenance on the graphical behavior of your program simply by changing the design of a dialog box or window in the resource file and modifying the name table to indicate which existing program-logic modules should handle the changed window objects. At run time, Galaxy quickly finds, in a context dictionary, the name and the associated code that should execute for that named event.

For example, suppose a push button labeled CANCEL has a tag (a Galaxy internal name you specify) of QUIT. When someone clicks the push button, Galaxy issues a "notify" for the button as well as a command bound to the tag that the Command Manager will dispatch. If you haven't registered a command for the QUIT tag, Galaxy traverses the class and instance hierarchy looking for a command bound to the tag. Each object (i.e., instance) and class has its o wn command space.

The Visual Resource Editor

Galaxy resource files don't typically become part of executable program files. The resource file is a platform-independent binary representation of the specifics of the Galaxy components that your program uses. Each resource file is a hierarchically linked collection of Galaxy objects--a nested dictionary of resources akin to Macintosh res and Next nib files. Different members of a LAN-based development team can share a common resource file; you don't have to maintain a separate copy for each programmer. Visix supplies utilities that convert resource files to and from ASCII files, but you'll almost always use VRE ( Visual Resource Editor ) to manage and update the resource file. VRE itself is a Galaxy application.

To distribute a Galaxy application, you bundle your executable file, the VRE-generated resource file (which has a .VR extension), and the global Galaxy resource file VGALAXY.VR. You c an optionally configure your program to use Galaxy DLLs (on those platforms that support DLLs). Visix does not impose run-time fees for Galaxy-based applications.

VRE doesn't write Galaxy programs for you and is not a CASE tool. Rather, VRE lets you visually create and maintain the GUI aspects of your program. The screen shows the list of objects that you can add to your screens via VRE. Visix doesn't include a class browser with Galaxy, but you'll find Galaxy works with the class browsers available in most C/C++ development environments. Through VRE, you can configure how your Galaxy-based application should react to resizing on your target platforms. You can also specify that Galaxy automatically resize dialog-box items to suit target platforms.

The distributed-services component of Galaxy works on TCP/IP, DECnet, and AppleTalk transports. Visix says it could easily expand this list to include NetBEUI (NetBIOS), IPX, or LU 6.2 if customers want them. We think it would be better if support for those protocols came standard with Galaxy.

In addition to telephone, BBS, and fax-based support, Visix maintains a site on the Internet for its customers. You can ask questions and get answers from other Visix customers as well as from Visix support staff, and you can download sample code and bug fixes via FTP.

Galaxy at Work

To exercise Galaxy, we developed a personal stocks-and-funds investment-tracking application for use on Windows, OS/2, or Macintosh systems. We easily modified the standard File menu and File Open dialog box (Visix calls it the File Chooser) to use the term Portfolio in place of File . Our application used DB2/2, IBM's OS/2-based relational database manager, to store stocks, quotes, and transactions.

Because Galaxy doesn't yet provide a standard, consistent interface to relational databases, we coded the SQL delivery mechanism to run as a background task on OS/2 and used Galaxy's distributed-services feature, over TCP/IP, to route database requests to and from the database server. (At this writing, Galaxy was working on an upgrade that would add access to such relational database managers as Oracle and Sybase but probably not for other important products like Watcom SQL or Ingres, which several other development tools support.) Macintosh, OS/2, and Windows clients could all access the database with equal ease. The performance of the resulting software is certainly satisfactory.

Galaxy's control over and management of the underlying GUI is extensive. You probably wouldn't do this in a real multiplatform environment because you'd confuse users, but you can even set a look-and-feel flag within Galaxy to make Galaxy use something other than the native windowing system. On a Macintosh, for instance, you can make your application appear to be running on X Windows or Presentation Manager. (For legal reasons, you can't make the Macintosh look-and-feel appear on other platforms.)

Client/Server Solution

Galaxy isn't for building shrink-wrapped software, such as games or word processors, but it is an excellent cross-platform development environment for large-scale , client/server-based business automation. Galaxy supplies a wealth of functionality. Our only serious complaint is with Galaxy's limited database access and network-transport compatibility.

The most impressive thing about Galaxy is that its developers managed to achieve object-oriented and cross-platform operation without compromising either. It would have been easy to cut corners if a mouse control in the class hierarchy, for example, didn't layer itself correctly across the Windows and Mac platforms. The result could have been some decidedly un-Mac-like GUI conventions creeping into the Mac version of Galaxy applications. But Visix went the extra mile to write the code that avoids such a compromise. The result is impressive.


PRODUCT INFORMATION


Galaxy 2.5
  C version...........$9600 per seat
  C++ version.........$12,100 per seat


Visix Software, Inc.
Reston, VA
(800) 832-8668
(703) 758-8230
fax: (703) 758-0233
galaxy@visix.com


SELECTED FUNCTION CLASS MANAGERS

Functionally, Galaxy can be broken down into 48 class-oriented
managers, each a relatively self-contained group of functions and
data types. Following are 11 of the most important ones.

APPLICATION MANAGER      Manages multiple instances of Galaxy
                           clients, stores application-wide attributes,
                           and manipulates global state information

B-TREE MANAGER           A key-oriented file access method

CLASS MANAGER            Gives C programmers an object-oriented
                           view of Galaxy through subclassing, overloading,
                           inheritance, polymorphism, and class identification

CLIPBOARD MANAGER
        APIs that access native clipboard mechanisms

COMMAND MANAGER          Allows access to GUI events and OS features
                           via name relationships established by programmer

COMMUNICATION MANAGER    A transport-oriented message-sending mechanism

DATATAG MANAGER          A platform-independent representationof data
                           items provided via object-oriented attributes

FILE SYSTEM MANAGER      File services (open, create, read, write,
                           and record locking) and directory
                           services (creation, deletion, and lookup)

LOOK-AND-FEEL MANAGER    The heart of Galaxy's GUI screen management

MEMORY MANAGER           APIs for allocating and freeing memory

SESSION MANAGER          APIs that applications can use to become consumers
                           or providers of distributed services on a LAN



A Power Toolkit for Large-Scale Applications

illustration_link (14 Kbytes)

The Galaxy Application Environment lets developers use both Galaxy and third-party tools and libraries to write large applications. Galaxy's own object-oriented libraries can replace thousands of lines of C or C++ code and help avoid redundant coding for shared resources. Among the key components is the DAS (Distributed Application Services) API, shown in the lower right, which lets you develop applications that communicate across different platforms. DAS consists of eight object-oriented components that provide high-level, platform-independent communication services.


VRE is a Very Resourceful Editor

screen_link (33 Kbytes)

Galaxy's VRE (Visual Resource Editor) lets you create and maintain resource files, the GUI-oriented components used by applications.


One Planet in the Galaxy

screen_link (32 Kbytes)

One of the many sample Galaxy programs, VMDEMO, demonstrates the List Manager while illustrating parts of the Galaxy hierarchy. The right side is the spreadshe et object. The left side shows a small section of the class hierarchy.


Barry Nance is a BYTE contributing editor and has been a programmer for 20 years. He is the author of Using OS/2 Warp (Que, 1994), Introduction to Networking (Que, 1994), and Client/Server LAN Programming (Que, 1994). You can reach him on the Internet or BIX at barryn@bix.com .

Up to the Reviews section contentsGo to previous article: Color and a Pentium To GoGo to next article: A Less Wobbly WabiSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network