Exhuming data

Digital Cortex shortcuts EAI by reading data from application windows

OUR MODERN PASSION for universal data integration is not always satisfied by applications. Sometimes companies need to bolt a more productive user interface onto the software they use. In other cases, the data produced by one application would be useful in another.

There are lots of tools for both kinds of projects, but most fail when one factor is introduced: lack of access to the specifications or source code of one of the applications. If you can’t rewrite a piece of software or decipher how it stores its data, how can you use that data in another application?

One solution, popular ever since we turned the corner from green screens to GUIs, has been through front-end integration, typically using a technique called screen scraping. A programmer writes software that drives a legacy application by remote control, simulating user input. The legacy application’s text output is captured and fed to the custom software for parsing and manipulation. That’s what Digital Cortex does, with some intriguing usability and scalability twists.

Our biggest gripe with Digital Cortex is that Anysoft’s literature obscures the value of its tools with posturing and doublespeak that make it hard for a prospective user to decide whether or not those tools would be a good fit. We can imagine many uses for the product, which leverages the Windows architecture to turn most applications’ displayed data into objects that programmers can use as they see fit. It is decidedly a poor man’s approach to EAI (enterprise application integration), but if it’s the only path available to your company, Digital Cortex is worth considering.

Digital Cortex collects a Windows application’s data by inserting a DLL spy into the application’s process. The DLL is part of the Digital Cortex run-time engine that reads what the monitored application (the donor, in Anysoft parlance) writes to its output window. The run time also relays user input messages, so custom applications can drive donor software by sending out keystrokes and simulating mouse clicks.

What makes Digital Cortex worthwhile is the degree to which it automates the process. Using Digital Cortex Developer tools, the programmer identifies textual regions in the donor application’s windows, assigns names to push-buttons and creates shortcuts for keyboard input sequences. Digital Cortex exposes the donor’s on-screen data elements and user interface controls as simple named objects.

The API of the Digital Cortex system is packaged as a COM interface; it couldn’t be easier for a Visual Basic, Visual C++, Delphi, or Visual InterDev (Web scripting) programmer to use. It should also be accessible, through COM integration, to .Net and Java developers, but Anysoft hasn’t verified or documented such use.

The Digital Cortex Developer tools require a basic knowledge of Windows user interfaces. Working with a snapshot of the donor application’s display windows (which the tools grab for you), you identify relevant on-screen components by type: text box, tree view, check-box, push-button and so on. When Digital Cortex knows the type of each interface element, it knows how to drive the app by remote control and extract its data.

At run time, Digital Cortex watches the donor application’s windows, looking for visual clues (called anchors) that uniquely identify the window. When it spots an anchor, it applies the screen layout definition the programmer defined for that window.

Getting the anchors right takes some effort. For example, if you use a window’s caption (title bar) text as an anchor, Digital Cortex may get confused if that text changes as the application runs. The developer must study and document the donor application’s behavior so Digital Cortex doesn’t fall out of sync with it at run time.

One of the problems associated with screen scrapers is that they don’t scale. It’s difficult, if not impossible, to run more than one instance of the donor application. The donor app also runs on the server’s console, where one stray mouse click or keystroke can derail the remote control process.

Anysoft does an admirable job of addressing these issues. During installation, the Digital Cortex Developer tools set up eight invisible virtual displays. Donor applications run on these virtual screens, eliminating screen clutter and making the donors impervious to interference. That solution is used only for development.

The Digital Cortex Distributed VU (virtual user) Services extends this model to a server environment. It uses Windows 2000 Terminal Services or Citrix Metaframe, neither of which is included with Digital Cortex, to host as many donor apps as the custom software requires. Digital Cortex manages these virtual sessions for you, launching donors as needed. Deployment wizards reduce deployment to a few clicks.

Anysoft’s unique approach allows Digital Cortex to drive and pull data from any application that uses Windows’ standard interface components. The complexity of Anysoft’s technology is mostly hidden from developers and administrators by high-quality tools. The product is well within the reach of intermediate-level Visual Basic developers and competent Windows server administrators. The documentation is verbose and sometimes confusing, but concise tutorials get the message across. Overall, Digital Cortex tackles the job of front-end application integration with style.

Source: www.infoworld.com