DBMS, April 1996
Desktop DBMS By Tom Spitzer

A 4th Dimension for Windows

ACI US Inc. Brings Its Veteran Macintosh RDBMS and Application Development Environment to Windows.

As I have mentioned in these pages before, I did much of my early application development work for Macintosh users. When I was most active in the Mac application development business, there was a limited number of tools from which to choose. The leaders were Omnis 3+ from Blythe Software (which was my tool of choice in 1986 and 1987) and ACI US Inc.'s 4th Dimension. Since my departure from the Macintosh world,4th Dimension has become the market leader. ACI claims to hold over 50 percent of the Macintosh RDBMS market in the U.S. and significant market share in international markets as well. ACI is an international company headquartered in Paris, with major subsidiaries in the United States, Hong Kong, Germany, Italy, Sweden, and the United Kingdom. Dist ributors in over 30 countries carry the 4D product line, which is localized in 15 languages. ACI claims the largest worldwide population of solution providers for any relational database vendor.

In January, I visited the annual MacWorld show in San Francisco to get reacquainted with the product and learn how application developers have solved client problems with the 4D family of products. This year, increasing concerns about Apple's continuing viability as an independent computer manufacturer cast a pall over the usually rabid throngs of Mac devotees. Ironically, the trigger for my interest in catching up on ACI was the company's release of Windows versions of its products in 1995, and the pot ential for deployment of a community of sophisticated developers into the Windows database marketplace.

In 1984, the initial 4th Dimension product introduced was a relational database that included a data-oriented application development environment. The product line evolved over the past decade and now provides a scalable family of solutions that starts w ith 4D First, an entry-level end-user database tool; 4th Dimension, a standalone database and development environment; and 4D Server, a multiuser database server and application development platform that supports workgroups of up to 150 users and include s 4D Client software. For larger user loads, 4D applications can connect to an Oracle or Sybase RDBMS via the 4D Enterprise toolkit, which facilitates migrating 4D data structures to a back-end server, automatically generating the required tables, column s, and indexes.

ACI developed these products for the Macintosh platform, so they are inherently 32 bit. ACI introduced versions that run on Windows 3.1, Windows 95 and Windows NT during 1995, and is now working on Unix support. Under Windows 95 and Windows NT 3.51, 4D f unctions as an OLE client, supporting insertion, storage, and in-place editing of OLE objects, including documents created by applications with OLE server capabilities. With the increasing concern about the Macintosh's viability in the information system s marketplace, a strong Windows story is essential for a database company with roots in the Mac world. The big challenge facing ACI will be convincing developers and users to build, support, and use new 4D-based solutions on their Windows workstations.

4D Fundamentals

4th Dimension, the core product in ACI's suite, offers user, design, and runtime environments. The user environment offers stock forms for maintaining data, searching and sorting, and generating reports. The design environment provides developers with a sophisticated set of tools including the structure editor, layout editor, procedure editor, menu editor, password access editor, list editor, and process list editor. The structure editor presents an entity-relationship diagram workspace for defining the tables and relationships that an application will manage. 4th Dimension does not adhere to a purely relational model, and it does not support SQL as a data manipulation language. One unusual feature that it offers is subfiles, or detail tables that are associated with and only accessible through their parents. Another is a predefined structure for defining entries in relatively static lists such as salespeople, states, or sales territories that are typically used for populating drop-down lists.

4D supports persistent relationships and field-level rules that ensure that fields are unique, populated with data from a list, or not empty; but it does not support procedure-based field-level validation rules, table-level triggers, or stored procedures . Key concepts in the implementation of a 4D application are the current record and current selection. Each table (4D calls them files) has a currently selected record that is buffered locally, and a current selection, which is the set of records that me et the current search and sort criteria. Data operations in 4D affect the current record or the current selection, depending on the nature of the operation.

After defining data structures for an application, 4D developers perform most of their application work designing entry forms with the layout editor. Because 4D has been a GUI product since its inception over 10 years ago, the layout editor has a fairly mature set of tools for designing graphical applications. In addition to the typical push button, checkbox, and radio button type objects, the editor also supports thermometer, dial, and graph objects. Layouts are explicitly associated with files, and th ey encapsulate the bulk of an application's business rules. Each object that you can present on a layout has a library of built-in behaviors from which to choose. You can assign default values, range rules, and selection lists to entry objects.

In addition to default behaviors, developers can assign procedures, which 4D calls scripts, to any object. The 4D scripting language is a very extensive Pascal-like language with a rich library of functions and control structures. You can use the procedu re editor to write global routines that can be used as common subroutines, application control routines, or event handlers for top-level menu choices, as well as routines specific to a layout or object. 4D supports code reusability by making it easy to c opy controls into common library modules. Controls copied into libraries carry any code the developer assigned to them.

The openness of the 4D programming language has been a boon to 4D developers. You can add external libraries written in Pascal, C, or C++ to the 4D development environment by dragging them into a folder. Inside 4D, the library functions appear on the lis ts of functions available for developing scripts and building expressions. Wayne Carlson, president of PractiCom Inc., develops sophisticated route sales and distribution applications using 4D to build application servers that interface between Apple New ton PDAs and Oracle database servers. Carlson told me that he developed 4D applications without external libraries for three years, and that after he started to use libraries he realized an order-of-magnitude increase in developer productivity.

ACI's Cross-Platform Strategy

ACI is building its cross-platform strategy on a platform- independent set of source code. This enables the company to deliver new versions for multiple platforms at about the same time. It also promises several important benefits to users and developers. For one, organizations can mix and match Windows and Maci ntosh servers and workstations: Companies can use Windows-based server hardware in conjunction with Mac workstations and Mac-based server hardware in conjunction with Windows workstations, and can even mix multiple Windows- and Macintosh-based servers wi th both kinds of client machines.

With a common engine, ACI has been able to build in multiple-GUI support so that developers can offer a Windows look to their Windows users and a Mac look to their Mac users. Alternatively, they can offer a Mac look to users moving from Macintosh workstations to Windows workstations. 4D automatically maps fonts between platforms, changes the background and foreground colors of objects on forms, maps user interface controls such as list and combo boxes, reads different Windows and Macintosh picture formats, and converts different diacritical (accented) ch aracter values between Windows and Macintosh. Indeed, developers working on Macintoshes for users with Windows machines can preview the look-and-feel of either Windows 3.x or Windows 95 from their Macintosh development workstation. Likewise, Windows deve lopers can preview the Macintosh look of an application.

4D Server

In addition to the PC version of 4th Dimension, 1995 saw ACI introduce the cross-platform 4D Server 1.5, which will be a key element in the company's bid to become a significant player in the RDBMS marketplace. 4D Server 1.5 distinguishes itself by incor porating both client and server components into a single set of executables that includes its own connectivity layer and multi-tasking engine. As an integrated client and server with a common language and data-processing engine, the communications layer can be very thin and there is no translation overhead between the client and server.

The division of labor between the client and the server is transparent. The server controls interactions between itself and its clients, which are structured so that one request yields one response. To formulate the requests that the 4D Client presents t o 4D Server, you can use the built-in editors, such as the search and sort editors, or code the requests as procedural scripts. 4D Client provides the same set of user and developer tools as the full 4th Dimension product, including layout editors develo pers can use to design screens and to create and maintain procedures. When applications execute, the 4D Client manages the execution cycle for each form that the users interact with, as well as the allocation of memory and assignment of values to variabl es and arrays. In addition to sending requests, 4D Client receives responses from 4D Server and updates users through the user interface (different records are displayed in a layout, and so on). For instance, if 4D Client requests all records with the la st name "Smith," 4D Client receives the records from 4D Server and displays them in a layout.

4D Server discharges a series of operating responsibilities. Its most fundamental role is to store and manage all data and structure objects, including fields, records, layouts, procedures, menus, and lists. When responding to client requests, 4D Server performs low-level database operations, such as searches and sorts, that involve using the index tables and accessing records at their physical location on the disk. During operations, 4D Server caches records and data objects specific to particular clie nts such as selections and sets. When a 4D Client makes requests, 4D Server tries to service the request from the cache rather than from the relatively slower disk. Finally, 4D Server schedules all simultaneous connections and processes created by 4D Cli ent. The scheduler leverages 4D's multi-processing kernel, which is an operating system independent software engine that is built into both the 4D Client and 4D Server, as well as into the standalone 4th Dimension product.

Client/Server Integration

By deploying tightly integrated client and server components, ACI has been able to optimize the interactions and the division of labor between the client and server. Controlling both the client and the server has made it possible for ACI to minimize the communications processing and the translation of requests and responses that usually occurs in a client/server system. The end result is a thin client, running the most-used client code, and a fat server, running the rest of the application and maintaini ng data. This eliminates the connectivity issues associated with implementing applications built from multi-vendor toolkits, and makes 4D an attractive choice for users that lack sophisticated database and network administration capabilities. The downsid e is that using 4D in heterogeneous environments that employ a variety of development tools and database servers presents something of a challenge. While 4D does not currently support standards such as ODBC (although it's planned for future versions) and OCX controls, ACI provides the 4D Open API to permit external programming languages to obtain access to data stored on 4D Server.

When 4D Client sends a request to 4D Server (for example, to perform a search or a sort operation), its description of the operation uses the same internal structures as those found in 4D Server (as opposed to sending the request as a SQL statement). Whe n sending a procedure or application layout to the client, 4D Server sends it in a format that the client can immediately run without having to perform any translation. When 4D Client needs a record, 4D Server sends it exactly as it finds it in the disk or memory cache. In the same way, when 4D Client needs to update a record, 4D Client sends the data to 4D Server, which 4D Server can write directly to its cache.

The user interface manifests the same tight integration. When the 4D Client displays a list of records, the layout used to display the records determines how many records the 4D Server returns in the result set. For instance, if 4D Client sends 4D Server a request to populate a display window that contains a four-column, 12-row list, 4D Server sends exactly 12 records. Instead of sending the entire set of records, 4D Server sends only the number of records and fields that can be displayed in the window. If the user were to scroll through the list, 4D Server would send the additional records or fields as needed. This optimization reduces network traffic by ensuring that records or fields are sent over the network only when necessary.

Multi-Tasking Processes

4D is built on a multi-tasking architecture that is independent of the operating system; it will perform the same way on both Windows and Macintosh platforms. This architecture is built on an algorithm that divides total processing time into chunks that it assigns to active processes. By frequently switching execution between processes, 4D can give the impression that the processes are executing simultaneously. Developers can spawn an unlimited number of processes to allow operations such as importing, printing, and data entry to occur concurrently. They can assign each process its own window for user interaction and procedurally control each one independently.

In 4D, each process has a separate data environment that consists of a current record and a current selection for each table in the application. In addition, the user or designer can assign current input and output layouts for each file, a menu bar, and one or more windows (only one window is active in each process). All processes have the same basic properties and allow the same operations as the user environment. Users working with 4th Dimension interactively in the user environment can initiate proce sses, or developers can initiate new processes inside of procedures. For example, if a user needs to print a lengthy report, but also wants to continue to do data entry, the reporting task can begin by starting a new process, execute the commands to prin t the report within that process, and hide that process in the background. While the user enters data in the foreground window, the background reporting process proceeds with minimal impact on the responsiveness of the foreground task.

Initiating multiple processes makes it possible to simultaneously work with more than one view of the same table. For example, an Employees database might contain a list of employees and their occupations. With multiple processes, you can display the rec ords of all engineers in one process while you work with the records of all accountants in another. Similarly, initiating multiple processes provides a very clean way to support multiple instances of a window, each referencing a different record in the s ame table. It also allows more than one window to be active, so that, for example, a data-entry window can have focus while another window displays messages resulting from actions initiated by other users. By using interprocess variables and commands tha t permit one process to call another, developers can implement very sophisticated applications. Processes engaging in communication functions using 4D's extensive built-in serial communications libraries can call graphing processes. The application can u pdate the graphs based on the data being retrieved at preset intervals or when specified thresholds are observed.

Application Services

More than a database server, 4D really functions as an application server, maintaining and serving both application components and data to developers and users. When a user opens a form, the server checks the version of the form against the user's local cache and sends the user the updated form if the user's copy of the form is out of date. While the application is up and running, developers can access data and change application components. Changes are automatically sent to clients the next time they a ccess those objects. 4D Server controls all data and object locking automatically. Not only are multi-user data-integrity controls built in, but multi-developer controls are built in as well. An unlimited number of developers can access, add, and modify database objects simultaneously. If one developer is modifying a form, the server will present any other developer that attempts to open that form with a message indicating who is currently modifying the form, and will permit the form to be opened solely in read-only mode.

4D Server Administration

The 4D Server window (see Figure 1) presents information about the status of the server to support effective server administration. The server window is divided into two panels: The top panel displays information about the server i tself, and the lower panel displays information about the clients and processes connected to the server. The top panel displays statistics such as the name of the data and structure files in use, the amount of memory allocated to the kernel and to the da ta cache, the number of currently connected users, the number of active processes, an activity thermometer indicating the current level of server activity, and a Cache Hit Ratio thermometer indicating the level of cache use.

You can also use the Cache Hit Ratio thermometer as a button. Clicking on it displays the Cache Hit Ratio window. This window provides additional thermometers that indicate how the cache is being used. 4D Server caches records, record addresses, index pa ge addresses, index pages, and bit maps. A separate thermometer indicates the relative loading of each in the cache. A higher reading is considered advantageous because accessing that type of data requires less disk access. Records, record addresses, and index page addresses are progressively loaded in the cache as users work with records. Index pages and bit tables are progressively loaded in the cache as users modify data by adding, modifying, or deleting records.

The bottom panel displays a list of all processes -- both server and client -- that are currently active on the server. It excludes processes local to workstations that do not require server services. An administrator can hide and show processes for the kernel or for a particular user by clicking the arrow to the left of the process or user name. For each process, the server panel displays its name, the amount of time elapsed since it was initiated, its status, and the percentage of time allocated to th e process by the server. When no clients are connected, only information about the server engine activity is displayed. The server processes that are always executing include the User Interface process, which controls the user interface of the server win dow itself; the Client Manager process, which manages all connections to the server and ensures that each client is given processing time; and the Cache Manager process, which manages the flushing of data to disk.

Supporting Wide Area and Internet Applications

Several aspects of 4D Server's architecture make it an attractive platform for Internet applications of various types. These include its 32-bit architecture and multi-tasking kernel, and its open extensions architecture and native code compiler. 4D's ext ensions architecture was designed to allow bi-directional interactions between 4D and external applications. Unique to 4D is the fact that the extensions architecture is not bound to an operating-system-based API, but is instead native to 4D and therefor e platform independent. 4D's compiler compiles to code native to the target platform, which results in order-of-magnitude performance improvements. This significantly impacts the types of processes encountered in Internet applications, such as parsing da ta or building textual responses to queries.

The most obvious Internet application is Web-based database access, but 4D products are being deployed for a range of interesting applications. In one case, NASA built an application it calls TechTracS to maintain an inventory of technologies under devel opment that have commercial potential. The TechTracS application is deployed on 4D Servers at each NASA site, where it supports users at that site. Each installation communicates across the Internet with the agency-wide server in Washington D.C. to repli cate data from the satellite systems to the central server and then back out to each installation. This communication session was developed using the 4D Open APIs that provide TCP/IP-based connectivity. In addition to 4D Clients, agency personnel can use a Web browser to query the database and add information about new technologies. Using an Internet extension for 4D called NetLink/4D (from Foresight Technology), the browser submits a request via 4D Client to 4D Server, which results in the creation of an HTML form that presents the required information or data-entry fields. To complete the inventory, NASA will provide private business with access to the TechTracS database via the World Wide Web.

Taking the Web angle one step further, MDG Computer Services Inc. developed Web Server 4D, a complete Web server environment written entirely on top of 4D. Having complete integration with the database makes it easy to track and report on-site access sta tistics such as the number of visits from each browser, how many times a page has been accessed, the Web sites from which users are linking, and much more. Web Server 4D includes a database used to identify where records can be added and searched. The co nfigurable database automatically generates all the necessary HTML forms; browsers with Netscape table support will see search results formatted as Netscape tables, other will see them as formatted text. With the optional source code, developers can prov ide custom support for users utilizing different Web browsers, migrate existing 4D databases onto the Web, or implement new Web-specific database applications.

A Windows Winner?

Recently, I spoke with an Oracle developer who specializes in distributed sales management (what he and I call "opportunity management") applications about directions for technologies that support mobile applications. When I asked him about using 4th Dim ension, he replied that he finds 4th Dimension developers to be rabidly devoted to their chosen tool. My discussion with Practicom's Wayne Carlson, who is deploying production mobile systems with 4D, and with several other 4D developers, leads me to a si milar conclusion. It's good news for ACI that these developers view the Windows opportunity very positively. I had wondered whether their years as Mac devotees would lead them to view ACI's move into Windows as a sell out, but that does not seem to be th e case. On the contrary, these developers are leveraging their skills and Macintosh installed bases to fuel significant growth in their application development businesses.

It seems to me that the Windows application development world is completely up for grabs these days, and that very few developers are seriously committed to the tools they are using for any given project. A vendor that is seriously committed to database applications, as is ACI, with a developer community that is strongly behind its tools, has an opportunity to be extremely successful. I have to applaud a company that has for the past decade focused on continually improving a toolset for database applica tions without getting sidetracked by other perceived opportunities. Entering the glare of the Windows marketplace will highlight the relatively underdeveloped areas of the 4D product line, such as the inability to code logic into the database engine and the weakness of the development environment with regard to reuse issues and team programming. Looking at ACI's history, I would expect them to address these issues as they start to increase their share of the overall application development business.


Tom Spitzer is managing consultant for application solutions in the San Francisco office of AmeriData Consulting. You can email Tom at tspitzer@ameridata.com.
* ACI US Inc. 20883 Stevens Creek Blvd., Cupertino, CA 95014; 408-252-4444 or fax 408-252-0831; http://www.aci-4D.com.
* Foresight Technology Inc., 4100 International Plaza, Ste. 538, Fort Worth, TX 76109-4818; 800-701-9393, 817-731-4444, or fax 817-731-9304; http:/www.fsti.com/.
* MDG Computer Services Inc., 231 Faircroft Rd., Bartlett, IL 60103; 708-622-0220 or fax 708-622-8893; http://www.mdg.com.

Figure 1.


--The 4D Server window displays the number of connected users, together with information about the currently active processes and the resources in use.


Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
April 1996 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Monday, November 4, 1996.