Mirage Technology Backgrounder

Software Pundits
25 Burlington Mall Rd
Burlington, MA 01803
617-229-6655,  fax 617-229-6660
-----------------------------------------------------------------

WHY MIGRATE WINDOWS APPLICATIONS TO UNIX?

To insure success in the competitive computing environment of the 1990's,
software developers are more often than not having to consider providing
multiple platform computing solutions. Where the PC and mainframe
computing environments once ensured some measure of success even for sales
of small applications in the 1980's, profuse competition and less than
promising market forecasts have made it hard to survive in these markets
alone. Worldwide PC sales will increase only nominally between 1991 and
1996, while mainframes are expected to decrease in market share from 17.4
percent to 14.4 percent, according to market research firm International
Data Corp. (IDC), of Framingham, Mass.

Clearly, the direction for the 1990's is UNIX, where IDC predicts a
doubling of computer and RlSC-based workstation sales between 1991 and
1996. However, with Microsoft selling over a million copies of Windows
each month, the Windows market continues to grow with new applications
introduced daily. In an effort to remain profitable, many Windows software
developers feel the need to explore software development in the UNIX arena
where applications development has been meager in comparison. It is
anticipated that many new products will come to the UNIX market in 1994,
bringing with them a level of sophistication and commercialization that
UNIX users have never seen before.

There are many advantages to porting applications to multiple platforms.
The most important to software developers is the increase in revenue that
they realize with the new software offering. Unix is the fastest growing
operating environment and has traditionally lacked the diverse and
sophisticated applications base that exists for Windows. Thus, there is
more opportunity to emerge as a leader in the UNIX marketplace with a
ported application and another avenue to increase revenues.

For many software developers, the availability of a product or products on
more than one platform provides them with a competitive edge and greater
market penetration. As computing strategy moves more toward "enterprise
computing", the availability of a product on the commonly used platforms
within a corporation is key to interoperability. Most large organizations
have a mix of PC's, Mac's, UNIX workstations and the creation, movement
and maintenance of information across these platforms is critical to their
success. Many organizations are making cross-platform interoperability a
requirement when purchasing new software applications.

Roadmap For Migrating Windows Applications - The Options

Developing software in a heterogeneous computer environment is a
challenging task. Today, several solutions exist for getting an
application from one computing environment to another. Depending on the
complexity of the application and the computer environments that are
involved, deciding how to get an application running from one computer to
the next can appear to be a complicated issue. However, the benefits of
migrating existing applications to newer hardware/operating systems (or
GUI) platforms can facilitate moving into new markets. Current migration
strategies include a variety of technologies that provide a solution for
the needs that exist:

Layered Toolkits - Proprietary API's

Layered toolkits provide developers with a viable migration strategy. These
toolkits provide a thin intermediate layer of software that lies between
the application program and the native environment. This software is
usually proprietary and non-standard in terms of the GUI and API of the
porting systems. The benefit of a layered toolkit is that, when supported,
it can take a user across multiple platforms. However, being of a
proprietary nature, virtual toolkits tend to ignore standards and present
yet another layer of non-standard code that the developer must learn,
support and rely on the vendor of the toolkit for continued support.

Emulation Toolkits

Emulation toolkits are similar to layered toolkits in that they provide a
common API for different native environments. The major difference is that
emulation toolkits emulate the native user interface instead of using the
native API directly. Applications can run through this emulation on a
desired platform with little to no change. This solution provides the
fastest path for migration and can provide support for features not
currently present on the native API directly. However, applications will
tend to run slower and users will not be able to look to software vendors
for support of applications in the emulated environment.

Ported API Toolkits

Ported APIs offer a much different approach than the traditional
cross-platform options. These toolkits take existing native APIs and port
them to other environments. They provide a library that supports
one-to-one functionality between the function calls of both computing
environments. By simply re-compiling the application on the desired
platform and re-linking with the platform supported library provided by
the toolkit, the application will now run with the same functionality as
it did originally. These toolkits address the complex portability issues
faced when migrating from one computer environment to another and make
these issues as transparent to the user as possible. Mirage (code name
Chameleon) from Software Pundits provides this type of porting technology
to Windows software developers.

WHAT IS MIRAGE?

Mirage is a new technology that enables Microsoft Windows developers to
quickly and cost-effectively migrate their applications to UNIX platforms.
Mirage allows true Windows applications created using the Microsoft
Windows Software Development Kit (SDK) to be compiled and run in a native
UNIX/Motif environment. The resulting native UNIX application adopts the
look and feel of the platform's GUI ( i.e. Motif) and gains the power and
performance of the RlSC-based architecture.

The baseline technology for Mirage is a virtual Windows software
development environment for UNIX. A Windows application is compiled on a
UNIX platform and linked to the Mirage libraries rather than the Windows
SDK. The result is a UNIX based application, identical in look, feel and
functionality to that of the original Windows application, yet with the
ability to take advantage of the powerful networking and multi-tasking
capabilities of UNIX. One common set of source code can now be maintained
and compiled to produce both Windows and UNIX versions of the
application.

Mirage provides Windows functionality by translating more than 550 function
calls into equivalent X window and Motif/Open Look function calls while
complying with the Windows-based and X-based interface standards. It also
handles the full range of data types, data structures and file formats
supported by Microsoft Windows 3.1. Mirage provides developers with
Windows functionality on UNIX such as Object Linking and Embedding (OLE)
and Dynamic Data Exchange (DDE). These features make Mirage unique and
separate it from other migration technologies.

WHY USE MIRAGE?

The Mirage technology provides developers with the opportunity to enter the
fast growing UNIX market while significantly reducing the time and risk to
market. A rewrite or re-design of a product requires a substantial amount
of time not only in development, but also in testing. Using Mirage to port
a product allows the developer the control over incremental quality
assurance and testing efforts. Concurrent development and testing can take
place throughout the development cycle while maintaining one set of source
code for both platforms.

Mirage allows ported applications to take advantage of the powerful
networking and multi-tasking capabilities of UNIX and run on all popular
RISC-based architectures. Applications experience an increase in
performance when run in the UNIX environment, creating a high performance
implementation of the Windows API.

MIRAGE FEATURES

The core Mirage technology provides an optimal mapping of Windows features
to the UNIX, Motif and Postscript facilities. These features include
shared resources; memory management; Windows menus, dialogs and controls;
device-independent graphics; fonts and color palettes; data interchange by
various methods; and dynamic linking.

Mirage is based on the industry standard Windows API and provides complete
and comprehensive Windows SDK support. The technology supports the more
than 550 function calls which comprise the window manager interface, the
graphics device interface (GDI) and the system services. It also supports
Windows messages, data types, resource and file formats. File formats
include bitmaps, icons, cursors, clipboards and metafiles.

The Mirage technology includes support for Dynamic Data Exchange (DDE).
Mirage's message-based DDE allows Mirage-based applications to share
data.

Currently, the Mirage technology is supported on the following platforms:

* Solaris 1.x and 2.x for SPARC and X86
* SCO Open Systems Software 3.0
* HP-UX 8.0
* AIX 3.2
* OSF/1
* UnixWare 1.0
* X Window System Version 11 Release 4 or 5
* Motif 1.1 or 1.2

MIRAGE TECHNOLOGY PRIMARY TOOLS

Mirage technology consists of these primary tools:

Mirage Run-Time Library

The Mirage run-time library is composed of window manager, graphical
interface and system services functions. The Windows application is linked
with the Mirage run-time library on the UNIX system to produce the Motif
application. Where appropriate, the Mirage library maps Windows function
calls into equivalent X Window and Motif calls. The Mirage library also
contains functionality that is supported in Windows, but has no one to one
correspondence in the X Window and Motif environments such as Object
Linking and Embedding, Dynamic Data Exchange, Dynamic Link Libraries,
Multiple Document Interface and Printer support. The Mirage run-time
library contains custom algorithms and widgets that simulate these Windows
features on Motif.

Mirage Resource Compiler

The Mirage Resource Compiler uses existing Windows resource files (.res
files) to specify menu and dialog layouts, bitmaps, icons and cursor
resources. Users can edit or create Windows .rc files on their UNIX
systems and compile these files with the Resource Compiler to produce a
.res file that is conformant to the Windows resource file format. This
feature facilitates internationalization when language customization of
menus, buttons, etc. is required.

Postscript Print Driver

The Postscript Print Driver supports efficient postscript code generation.
Instead of the GDI layer making calls to Xlib, calls are made that
generate postscript code supported at PS level 1 and 2. The Postscript
Print Driver includes printer setup dialog boxes and supports most
postscript printers.

Affinity Linking and Embedding Technology (optional)

The Mirage technology includes Affinity, an application to application
linking technology, similar to that of OLE 1.0. for Microsoft Windows
applications. Using Link, Embed and Launch to edit (LEL), technology
co-developed by Software Pundits and Lotus Development Corporation,
Affinity supplies the UNIX environment with the power to create compound
documents that include data linked and embedded from multiple applications
across a network of heterogeneous workstations. The Affinity technology is
the only linking and embedding technology available on UNIX today.

PORTING WINDOWS APPLICATIONS TO UNIX USING MIRAGE

The process of porting Windows applications to UNIX using Mirage involves a
few basic steps. First, the source code must be physically transferred
from the PC running Windows to the system running UNIX.

Basic portability issues exist when porting code from Windows to UNIX based
on fundamental differences in hardware architecture between Intel chips
and RISC-based workstations. Such issues arise in the areas of byte
swapping and 16 bit vs 32 bit operating environments.

Byte swapping errors result from the difference in byte ordering between
the Intel chips (386, 486 and 586) and various RISC chips (SPARC, RS6000).
The Intel chip is byte ordered in the little endian format which orders
and processes the bytes from right to left. The SPARC chips are byte
ordered in big endian format and order and process bytes from left to
right. These incompatibilities can be handled through conditional compiles
in the source code.

Moving from Windows, which is typically run in a 16 bit environment, to
UNIX which is inherently 32 bit, problems arise if int variables are not
explicitly declared. In order to insure portability between the two
environments, it is necessary to explicitly qualify int variables as
either long or short. (This is the same problem developers will face when
porting to Windows NT)

Once these compiler differences and system dependencies have been resolved,
the next step is to link the Mirage run-time library with the Windows
source code on the UNIX system. In a perfect world, the application would
now execute perfectly, but in reality, most substantial Windows
applications will show a few bugs when ported to UNIX. Some time must be
spent debugging the application on the UNIX side, but after compiling,
linking and debugging the code, it will run better and faster than before.
And, the time spent in this process will be far less than the time spent
to re-write and maintain an entirely new set of source code for UNIX.

MIRAGE ARCHITECTURE

The core technology of the Mirage architecture resides in the Mirage
run-time library. The Mirage run-time library consists of several
libraries that interface between the Microsoft Windows application and the
Motif, X Window and UNIX layers. These libraries provides Microsoft
Windows functionality by translating standard Windows API function calls
into equivalent X Window and Motif function calls. This translation
results in a common set of source code that is maintained and compiled to
create both Windows and UNIX versions of the application.

The Mirage run-time library is composed of several libraries: The User
Library, the Graphical Device Interface(GDI) Library, the Kernel Library
and the Common Dialog Library.

USER LIBRARY

The User library provides window management function APIs for the
application. Within the User library the logic exists for creating,
manipulating and destroying windows and managing the application in
relation to the windowing system. This library in the architecture also
does the translation of Windows classes into equivalent Motif Widgets and
provides support for control widgets which are not supported in Motif such
as: Multiple Document Interface (MDI), Combo Box and Owner Drawn Lists.

GDI LIBRARY

The GDI library provides graphics operations for both the display and the
printer. It provides basic routines for line drawing, text/font handling,
tiling, shading, etc., similar to the graphics routines of Xlib. However,
GDI also provides some functionality that does not exist in Xlib,. such
as: logical coordinate mapping, windows metafile, logical font mapping,
simplified painting model and device-independent bitmaps.

KERNEL LIBRARY

All non-GUI APIs in the Windows environment are supported in the Kernel
library. This includes file l/O, memory management, module management and
a variety of other functionality.

OTHER COMPONENTS

Other components of the Mirage architecture include: The Common Dialog
Library, The Resource Compiler (as described above) and Affinity Object
Linking and Embedding technology (as discussed above).

Common Dialog

The Mirage run-time common dialog provides the same functionality as
Microsoft's dynamic-link library COMMDLG.DLL.

 ============================================================
 From the  'New Product Information'  Electronic News Service
 ============================================================
 This information was processed from data provided by the
 above mentioned company. For additional details, contact 
 the company at the address or telephone number indicated.
 OmniPage Pro is now used for converting all printed input! 
 ============================================================
 All submissions for this service should be addressed to:
 BAKER ENTERPRISES,  20 Ferro Dr,  Sewell, NJ  08080  U.S.A.
 Email: RBakerPC (AOL/Delphi), rbakerpc@delphi.com (Internet)
 ============================================================
