REVIEWS

Decaf Development

Brew your own apps with Professional Software's development environment

by Simson L. Garfinkel

ESPRESSO! Developer provides an entirely different way of brewing NEXTSTEP applications. In a way, Professional Software's developer environ- ment is actually more like cappuccino than its namesake, since its purpose is to soften any sting of NEXTSTEP much as steamed milk softens the Italian coffee.

ESPRESSO! enables programmers to create form-based, data-driven applications for viewing and modifying information stored in complex relational databases without having to learn how NEXTSTEP works. But using it comes with a high cost: utter dependence upon Professional Software for timely bug fixes and advances in its development environment, the additional points of failure that come with using a complex application, and less flexibility than the native NEXTSTEP environment provides.

Instead of forcing a developer to master object-oriented programming, Objective-C, and the nuances of the AppKit and DBKit, ESPRESSO! gives the developer a more familiar paradigm: sophisticated text fields, push buttons and sliders, a fourth-generation C-like scripting language called ESL (ESPRESSO! Scripting Language), and a top-down programming methodology that would make any Cobol or BASIC programmer feel comfortable.

Extensions, exits, roots, and bases

To make all of this plug and play in the NEXTSTEP environment requires the use of a counterintuitive set of four NEXTSTEP InterfaceBuilder objects. Every application that uses ESPRESSO! must have an ODExitMgr and ODRoot object in its main nib file. You'll also need an ODWindowBase object for every window your application intends to display. Although Professional Software's documentation sort of explains what these objects do, the company never shares its design rationale with the user.

Once you have set up an ESPRESSO! nib, you simply drag out traditional NEXTSTEP objects such as TextFields, Buttons, and other Controls. Then, instead of connecting the objects on the screen to objects within your program, you connect the ESPRESSO! object to the controls on the screen. By doing so, you change the control into an ESPRESSO! Extension. The extension lets you alter the behavior of the NeXT-provided objects. For example, you can use ESPRESSO! to create a TextField that will only hold date and time values, or only store floating-point numbers or currency amounts. Thus, ESPRESSO! Developer embodies most features of Objective Technologies' SmartField Palette at a very competitive price.

The power of ESPRESSO! extends beyond simple input restriction. Using Professional Software's scripting language, you can write your own procedure, which can be automatically called before or after a field's value is changed or as each key is pressed. You put these ESL functions in their own file and compile them with the ESL compiler that Professional Software provides. Finally, you tell each object on the screen which extension to run by typing the extension's name into the ODWindowBase Inspector. Be sure to get the spelling of the name right, or else your application won't work.

Professional Software calls these ESL code snippets "exits" (a term sure to initially confuse any NEXTSTEP programmer). Although the ESL language looks like C, it isn't. ESL only has 126 built-in functions (far fewer than NeXT provides as part of its ANSI C development system), which are documented in a single 131-page section of its manual (though the manual is available only on-line). An API allows you to call standard C functions from ESPRESSO! and vice versa. Companies considering ESPRESSO! should carefully evaluate this unique dependence on a proprietary language and compiler, a unique situation in the NEXTSTEP third-party world.

Developers hacking NeXT's DBKit will be intrigued by the ESPRESSO! ODModule object, a DBKit "extension." Using ODModule, you can perform qualified selections on a set of database records, change the sort order, or alter the sequencing of retrieved records.

Three of the remaining ESPRESSO! objects can add basic functionality to any NEXTSTEP application: ODMultiView, ODDragView, and ODPickList. All three allow you to change or customize their behavior with ESL. Unfortunately, Professional Software doesn't provide enough documentation to let you modify them the traditional NEXTSTEP way: by subclassing the Objective-C classes. Consequently, what you can do with these objects is limited to the few operations that Professional Software thought ESL programmers might want to perform.

The last object in the ESPRESSO! Developer library is ODLock, a pointed object with the sole purpose of preventing other people from opening your InterfaceBuilder nib files. Locking an ESPRESSO! nib is important, since most of an ESPRESSO! application can be run from InterfaceBuilder's Test Interface mode. Unfortunately, ODLock is a dangerous little object. Make one typo, and you might find yourself locked out of your own project.

Locked in, locked out

But the real problem with ESPRESSO! is that it locks the developer in to the subset of NEXTSTEP that Professional Software thinks is worthwhile. Of course, no serious developer would consider using ESPRESSO! to write a word processor or a 3-D modeler. Unfortunately, aspects of such sophisticated applications have a tendency to pop up in the most banal custom apps. When they do, the power of NEXTSTEP helps you solve your problem Ð unless you're using ESPRESSO! instead.

For example, a general-ledger system written with ESPRESSO! might use Cut and Paste to move text about, but it could never use that method to transfer journal entries from one checkbook to another, since catching these events and handling them intelligently is beyond the abilities of ESL. To do so, you would have to bypass the very functionality that makes ESPRESSO! initially attractive to developers. Companies that don't want to dead-end on the road to high-speed application development with NEXTSTEP would do well to skip the coffee break, buckle down, and learn the nuts and bolts of Objective-C and NeXT's Application Kit. It will be well worth the effort.

Simson L. Garfinkel is a senior contributing editor to NeXTWORLD.


Espresso! Developer

3 Cubes

A 4GL development environment that allows programmers to create database-driven applications without programming in Objective-C. Initially powerful but ultimatedly limiting, developers who wholeheartedly adopt theESPRESSO! paradigm may not be able to realize the full potential that NEXTSTEP offers.

$495

Professional Software, 591 North Ave., Wakefield, MA 01880.

617/246-2425, 800/246-4664, 617/246-1443 fax; psi@ logibec.com.