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 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.
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.
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.
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.
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.
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.
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.
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.
