Development Environment Overview


The development environment comprises all of the hardware and software that enables migration from UNIX to the Microsoft Windows operating system, including the following:

  • Software development kits (SDKs), which include compilers, editors, and debuggers , provide the basis for creating, building, and debugging the application.

  • Integrated development environments ( IDEs ), such as Visual Studio, provide uniform and coherent access to tools otherwise provided by the SDK.

  • Software management tools, such as software for source code managementand problem tracking, are not critical, but they add significant value to larger migration projects.

  • Analysis tools, such as performance analysis and testing tools, can be used to improve the performance of the application.

  • Cross-platform tools and libraries, including third-party packages such as Rogue Wave SourcePro, can be integrated with the application.

These facilities are appropriate to either the developers or the testers of the system, as shown in Figure 7.1.

click to expand
Figure 7.1: The development environment

Visual Studio is a comprehensive and powerful tool for developers. It includes features such as interactive IntelliSense for editing source, edit and continue debugging, integration with Visual SourceSafe for source control, and an extensive set of user customizations and help. These features can make Visual Studio seem overpowering, especially to UNIX developers who are comfortable with command-line utilities and with editors such as vi . However, Visual Studio also offers a setof shortcuts and automation macros to streamline editing sessions.

The best way to overcome apprehension about the size and feature set of Visual Studio is to start using it. Developers will soon see how easy Visual Studio is to use, and how features that once seemed overwhelming can lead to greater productivity. Experienced developers will soon have the Visual Studio IDE customized to meet their needs and to eliminate any unneeded features.

Windows Platform SDK

An SDK contains tools to help build, debug, test, and deliver applications. It also contains all the definitions (include files) and libraries needed to compile programs. In general, SDK tools are run from the command line, just as applications are run from a shell prompt in UNIX. Output from SDK tools can be files created on the disk, text output to the console (like stdout in UNIX), or graphical output to one or more dialog boxes.

The Microsoft Platform SDK is a set of tools and API definitions to help create applications for the Windows platform. It contains include files and documentation forall subsystems and APIs in Windows. It also contains definitions and documentation for the Microsoft .NET Enterprise Servers, including Microsoft BizTalk Server, Microsoft Commerce Server, and Microsoft SQL Server. Installation of the .NET server components is optional.

The Platform SDK is available on CD or as a free download on the Web. It is also available with the Microsoft Visual C++ development system and Visual Studio,or with an MSDN Professional or Universal subscription. To order or download the SDK, go to http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ .

Application Build Tools

The Windows Platform SDK contains tools in several categories to help build applications, including:

  • Cryptography, to create and manage certificates.

  • Microsoft DirectX application programming interface. to manage three-dimensional models, graphs, and DirectX devices.

  • Messaging API (MAPI), for message, address book, and other viewers .

  • The Multimedia for AVI editor.

  • OLE DB for OLE object and file viewers and the MIDL compiler.

  • Resource files for image editor and resource compiler.

  • Telephony API (TAPI), for TAPI browsers.

  • Text Files tools, for identifying file differences.

  • Windows Sockets, for service provider ordering.

Most migration projects rely heavily on the Text Files tools. WinDiff , for example,is a graphical tool for comparing files and directories, recursively if desired. Files with differences can be viewed with the different lines highlighted in colors for easy examination. Another useful tool is Where , which finds a file by name or pattern ina directory or subdirectories.

The Platform SDK also contains the Windows Script Technologies, which include JScript and Microsoft Visual Basic , Scripting Edition (VBScript) engines. JScriptis the Windows implementation of ECMAScript or JavaScript. VBScript is basedon Visual Basic. Both the JScript and VBScript engines run in the context of the Windows Script Host, which is a language-independent environment for scripting engines. Windows Script Host allows scripts to be run from the command line or from the Windows environment. Scripts can run in batch mode and do not require user input. Scripts can also use the objects provided by Windows Script Host to access operating system resources, such as files.

Debugging Tools

The symbolic debuggers in the Platform SDK can set breakpoints, execute the program or step through it one line at a time, and examine memory and registers. The debuggers understand the debugging information in the application, and can display the source with the executing program.

The symbolic debuggers are:

  • NTSD for debugging user mode programs.

  • KD for kernel debugging.

  • WinDBG for debugging Windows-based programs, services, and kernel-mode drivers.

The Platform SDK also contains Spy and Viewer programs that debug Windows objects:

  • The Spy program (Spy.exe) helps to monitor messages sent to one or morewindows and to examine the values of message parameters.

  • The Object Viewer (Winobj.exe) examines all of the objects in the running system, such as kernel objects and file systems, as well as user-viewable properties of objects.

Performance Monitoring and Tuning Tools

Some tools that help improve the performance of applications are included with both the Platform SDK and Visual Studio. This section discusses only these Platform SDK command-line tools:

  • Call Attributed Profiler (CAP)

  • Performance meter (Perfmtr)

  • Pstat

  • VADump

  • Working Set Tuner (WST)

(For information about Windows-based tools included with both the SDK and Visual Studio, see Performance Tuning later in this chapter.)

Call Attributed Profiler (CAP), a normal function call profiler, runs from the command line. CAP is similar to the UNIX prof profiler. CAP can show how much time is spent in each function and in other functions it calls.

To control the granularity of profiling, you specify which DLLs and functions to include. CAP produces a call tree of all the functions called in the module being profiled, together with the time spent in each.

CAP supports the following measurement techniques:

  • Measuring calls from an executable file (.exe)

  • Measuring calls from a DLL

  • Measuring calls from an .exe file to all of its DLLs

  • Measuring calls from a DLL to all of its DLLs

  • Any combination of the above

The Perfmtr (performance meter) command-line utility dynamically displays system performance information. The information is updated every two to three seconds. Perfmtr starts by displaying CPU usage data. However, single-letter keyboard commands prompt it to display performance information such as those shown in Table 7.1.

Table 7.1: Perfmtr Keyboard Commands

Key

Displays

Key

Displays

C

CPU usage

I

I/O usage

V

Virtual memory usage

X

X86 VDM statistics

F

File cache usage

S

Server statistics

R

Cache Manager read and write operations

H

Repeats the current information type

P

Pool usage

Q

Quits the utility

Pstat displays process statistics as text. Command-line options instruct Pstat to display all statistics for all processes, for user-mode processes, or for kernel-mode processes. (If Pstat gets statistics for all processes, output will be at least several hundred lines.)

VADump examines the virtual address of a running process. Depending on the options specified, the output of VADump can include:

  • Each address, along with its size, state, protection, and type.

  • Total committed memory for the executable file.

  • Total committed memory for each DLL.

  • Total mapped committed memory.

  • Total private committed memory.

  • Total reserved memory.

  • Information about the working set.

  • Information about paged and nonpaged pool usage.

Note  

Because VADump can generate a very large amount of output, it is advisable to redirect the output to a file.

The Working Set Tuner (WST) reduces the memory a program uses. WST can helpa program coexist efficiently with other programs and can help reduce the time it takes to load an application.

The working set of a program consists of those pages from the virtual address space that are mapped into active physical memory for the process. It includes both private data and shared data (program code including executable files, DLLs, and system DLLs.)

Integrated Development Environments

Unlike the SDK command-line tools, integrated development environments offer the user an integrated set of tools such as editors, compilers, and debuggers. Microsoft Visual Studio, the IDE discussed here, comes with a choice of languages such as C/C++ and Visual Basic, compilers and debuggers, and a large set of integrated tools that do everything from create resources to package applications for installation.

This chapter uses Visual Studio 6.0 as the basis for features and examples. The newest version of Visual Studio is Visual Studio .NET. This version includes the new features of the Microsoft .NET Framework and the common language runtime. Visual Studio .NET is covered in greater detail in Chapter 15, Roadmap for Future Migrations.

This section discusses the Visual Studio features that provide compiling and linking, debugging, and performance tuning. It also includes a section that discusses third-party extensions to Visual Studio.

Compiling and Linking

Visual Studio provides a state-of-the-art C/C++ optimizing compiler and preprocessor. Users can specify options to the compiler by using the GUI dialog boxes, or from the command line when using an external make procedure. As in UNIX, link options to the compiler are passed on to the linker.

Options to the compiler can include:

  • Optimization options turn optimizations on or off.

  • Code generation options identify capabilities, such as structured exceptionhandling (SEH) model and processor.

  • Output Files options identify names of output files, such as executable filesand output files for debugging information.

  • Debugging options set preferences for debugging information output.

  • Preprocessor options set, for example, location of files and defined constants.

  • Language options enable or disable language extensions.

  • Linking options include DLL output, threading model, and others.

  • Precompiled header options set compilation speed.

  • Miscellaneous options include Help, compile without linking, and others.

Debugging

Each built-in Visual Studio debugger for C/C++ and Visual Basic has its own window in the Visual Studio IDE. Many of these windows can be docked , that is, attached to a side of the main IDE window, or they may float over the IDE window.

Performance Tuning

Visual Studio includes tools for analyzing the performance of applications, including:

  • Pview

  • Profiler

  • Spy++

The PView process viewer uses dialog boxes to view and modify running processes and their threads.

PView can monitor:

  • Memory usage of a process, of threads, and of individual DLLs.

  • CPU time used by processes and threads.

  • How an application or the system runs with different system priorities.

Note  

PView features provide powerful tools with which developers can monitor an application s processes and threads at different priorities. Changing priorities may also affect other applications running on the same system. Developers need to take this into account when using PView.

Profiler helps to analyze program execution either at the function level or at the level of individual lines of source code. Profiler can help determine which partsof code take a long time to execute and which parts are executed many times.

Profiler can be used:

  • To count how many times a function is called. If the test data shows that a function is called too many or too few times, the application code could be in error.

  • To determine the amount of time used by a function. If a function takes too long to execute, inefficient algorithms could be to blame.

  • To determine coverage of testing procedures by verifying that all functionsare called or that they are called the correct number of times.

Spy++ (Spyxx.exe) shows a graphical view of the system s processes, threads, windows, and window messages. Spy++ has a toolbar, hyperlinks for fast navigation, a Window Finder tool for easily selecting a window, and a font dialog box for customizing view windows. Spy++ also saves and restores user preferences.

Third-Party Extensions to Visual Studio

Third-party tools that integrate with Microsoft Visual Studio to enable detectionof run-time errors include BoundsChecker from Compuware and PurifyPlus from Rational Software.

BoundsChecker, a run-time error detection tool, was originally a single product.It is now part of the DevPartner Studio suite, which contains performance as wellas debugging tools.

BoundsChecker can diagnose programming problems unique to C++, such as stack and heap memory errors and leaks of memory and resources. BoundsChecker also eliminates common Windows mismatched argument problems by checking APIcalls for Win32, ODBC, and Internet, among others.

PurifyPlus contains the Purify error and memory problem detection tool in addition to performance tools to analyze bottlenecks and to detect untested code. PurifyPlus also checks for errors in API calls, including Win32, ActiveX controls, COM objects, and DLLs. PurifyPlus detects C++ memory problems such as heap and stack errors, pointer errors, memory usage errors, and handle errors. PurifyPlus also works outside the Visual Studio IDE for stand-alone debugging.

MKS Software offers an extension to Visual Studio 6.0 to support the UNIX lex and yacc utilities. The lex utility is a scanning utility that analyzes input text files forthe occurrence of predefined text patterns. When the text pattern is found, a set ofC source code is run. The lex utility reads its input from a specified input file, or from standard in. The input is in the form of pairs, with the text expression to scan for first, followed by the C code to execute when the text expression is found. The lex utility produces a C source file that is compiled to create the scanning program.

The yacc (yet another compiler compiler) utility is a parser that takes a setup input token and applies a set of grammar rules to the token. The yacc utility generatesa C program based on the input of grammar rules from an input file or from standard in. The C program parses an input based on the grammar rules supplied when yacc was run.

The combination of lex and yacc provide developers with a powerful method for generating compilers, front-end processors for compilers, text processors, and language translators. The lex utility performs the function of creating tokens based on regular expressions; yacc performs grammar rules on the tokens.

The MKS lex and yacc utilities work as add-ins to Visual Studio 6.0 that allow developers to create scanners and parsers within the Visual Studio 6.0 IDE. These help automate the time-consuming and monotonous tasks of lexical analysis and grammar matching from within Visual Studio 6.0.

Source Code Management Tools

Source code management tools can be integrated into the Visual Studio IDE to perform automatic checkout when a developer modifies a file. Source code management tools that integrate with Visual Studio have point-and-click interfaces, which may be new to UNIX developers.

Visual SourceSafe, the source management tool included with the Visual Studio IDE, creates projects in a tree view structure. Visual SourceSafe provides full source control for check in, check out, and difference tracking. Visual SourceSafe uses COM Automation for customization.

The Automation model can help automate the migration of source from UNIX to Windows by automating repetitive tasks. For example, in a batch build processthe Automation features of Visual SourceSafe can be used to get the source code automatically before it is compiled.

Like other source code control systems, Visual SourceSafe maintains a library of projects from which users check out files for exclusive or nonexclusive access. After modification and testing, users check in the files. If nonexclusive checkoutis allowed, the files are merged at check-in time, interactively if necessary. Each incremental checked-in version can be recalled if functionality is inadvertently deleted. VSS can also create releases by labeling the files.

Visual SourceSafe handles text as well as binary files.

Packaging Tools

Once an application is created, the developer needs a way to effectively distribute the application to the target users. This needs to be done in a reliable and repeatable manner. The Microsoft Installer (MSI) technology provides this capability.

MSI allows the developer to generate an installation package that organizes an application s setup into a set of features that can be installed through the command line, or through Control Panel, by using the Add or Remove Programs options.In addition to installation, MSI provides uninstall functionality, automatic application repair, and installation with elevated privileges.

MSI creates installation packages through a set of programming APIs and a package installation database. A developer can work with MSI by using the API directory. However, a tool that generates MSI scripts can help automate the process. The Microsoft Platform SDK provides such a tool ” Orca.exe. Orca allows the developer to directly edit the content of the MSI database. Detailed information about Orca can be found on the Platform SDK Online Help or the Microsoft MSDN Web site at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/orca_exe.asp

Third parties such as Wise Solutions and InstallShield provide products that further automate the creation of MSI installation packages. These tools have options that allow a developer to create a before snapshot of a target system. The developer can then manually install the package and take an after snapshot of the system. The difference becomes the MSI package.

For more detailed information about MSI, see the Microsoft TechNet Web site at http://www.microsoft.com/technet/default.asp . The current page with MSI contentas of creation of this guide is:

http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/winxppro/proddocs/sag_WinInstall_Using_topnode.asp

Cross-Platform Packages and Libraries

Every migration of an application from UNIX to Windows requires some inter-operability between the UNIX development environment and the Windowsdevelopment environment.

A rewrite to Win32 requires the least interoperation between the two environments. In this case, the code simply moves to a native Windows environment, with no further need for the UNIX development environment. At the other end of the scale, when a ported application requires ongoing cross-platform development, UNIX and Windows development environments must be well integrated.

Third-party cross-platform environments or libraries are popular solutions for maintaining code on multiple versions of UNIX and Windows operating systems. Because a layer of abstraction isolates the differences in the platforms in this case, users can develop applications without as much attention to operating system-specific code.

A given third-party library or toolset may not provide complete coverage for all aspects of program design. For example, one library could be designed to createan abstraction for operating system functionality such as processes and threads. Another library could address graphical user interface functionality.

For this reason, the functionality applications need is a major factor in choosing a vendor. The level of the interoperability required between the UNIX and Windows environments influences vendor choice. For more information about interoperability, see Chapter 6, UNIX and Windows Interoperability.

Interix

Interix is a multiuser UNIX environment that operates on computers running Windows. The Interix subsystem and its accompanying utilities provide an environment that resembles any other UNIX system. It includes case-sensitive file names, job control, compilation tools, and the use of more than 300 UNIX commands, utilities, and shell scripts. Because the Interix subsystem is layered on top of the Windows kernel, it offers true UNIX functionality without any emulation. (For more information about Interix, see Chapter 4, Assessment and Analysis. )

This section discusses Interix APIs, Interix utilities, and Interix networking and security issues.

Interix APIs

Interix includes a Software Development Kit (the Interix SDK) that provides a full set of APIs (more than 1900) plus header and library files for creating and migrating UNIX applications.

The Interix SDK includes documentation and header files for the following categories of APIs and services:

  • POSIX.1 APIs

  • Cryptography

  • User interface services, including curses , terminal routines, and X-Windows

  • Database (dbm)

  • Remote procedure calls (RPCs)

  • Sockets

  • Memory-mapped files

  • System V interprocess communication (IPC) mechanisms

  • Berkeley Software Distribution (BSD) string and memory functions

  • Pseudo terminals

  • Controlling terminals

  • Security

  • Setup and system administration

  • Tools and scripting

The Interix environment includes both the Korn and C shells and provides more than 300 UNIX utilities. In addition, Interix includes the usual UNIX developments tools, such as text editors, make utilities, compilers, linkers, debuggers, and shell scripts.

Table 7.2 shows some widely used development tools included with Interix.

Table 7.2: UNIX-like Development Tools Included with Interix

Category

Tools

Text editors and processors

Text editors: ex , vi , view
File-pattern searchers : grep , egrep , fgrep
Stream editor: sed

Archives, compression, and source management tools

To create and maintain library archives: ar
To display file or directory differences: diff , sdiff
To compress or expand files: gzip , gunzip , uncompress , zcat
To create new revision control system (RCS) files or to change attributes of existing files: rcs
To create archive files: tar

Configuration, management, and build process tools

To translate Awk to Perl: a2p
Pattern-directed scanning and processing language: awk / gawk
C preprocessor interface to the make utility: imake
Fast lexical analyzer generator: lex
To maintain program dependencies (Berkeley make): make
To create dependencies in makefiles: makedepend
Practical Extraction and Report Language (Perl): perl
For pipe fitting; to duplicate standard input and help when recording and watching the build process at the same time: tee
To construct argument list(s) and execute: xargs
To call imake with appropriate configuration file: xmkmf
LALR parser generator: yacc

Compilers and linkers

Portable GNU (not UNIX) assembler: as
Compiler interface: c89 , cc (The c89 utility is an interface to the Microsoft Visual C/C++ compiler.)
GNU project C and C++ Compiler: gcc , g++
GNU project Fortran Compiler (v0.5.21): g77
GNU assembler macro preprocessor: gasp
GNU linker: ld

Debuggers and debugging assistance

GNU debugger: gdb
ASCII, decimal, hexadecimal, octal dump: hexdump
To display information from object files: objdump
To list symbolic names stored in an object file: nm
To trace system calls and signals: truss
To display or set process limits: ulimit
To print contents of X-Windows events: xev

Miscellaneous tools

To run a Win32 command (such as during migration of scripts): runwin32
Terminal emulator for X-Windows (requires third-party X-Windows server): xterm
UNIX to Windows text formatting converter: flip

In addition, the Interix /usr/ contrib /win32/bin directory includes shell script wrappers for common Windows command-line utilities, such as net , calc , cacls , and netstat . Because this directory is automatically placed in the PATH variable when an Interix shell starts, these Windows utilities can be executed by typing the command name at the shell prompt. For example, to run the Windows calculator in the Korn shell, type calc at the dollar sign ( $ ) prompt. To look for Windows commands in other directories, set the PATH_WINDOWS variable in the startup files.

Interix Networking and Security

This section covers some of the networking and security differences between UNIX and Interix. In particular it covers:

  • Mapping network drives

  • Network resource security

  • User name differences

  • Daemons and services

The /net virtual directory is similar to the Windows Universal Naming Convention (UNC). For example, the file referred to as \\Saturn\marketing\report.xls using Windows UNC can be referred to as /net/Saturn/marketing/report.xls using Interix.

To make resource ownership information consistent across computers, Interixuses User Name Mapping (when available) to associate Windows users with user identifiers (UIDs) and group identifiers (GIDs). If there is no User Name Mapping server available, the Interix subsystem computes a UID or GID as it encounters each Windows user or group . This computed value is normally unique, and all hosts in the same domain compute the same UID or GID for the user or group. If Interix cannot compute a unique UID or GID for the user or group, it makes a log entry in the Windows-based application s event log. If Interix can no longer communicate with a User Name Mapping server, the Interix subsystem reverts from mapped UIDs and GIDs to computed UIDs and GIDs.

The Interix subsystem principal domain is designed to reduce the length of the displayed user and group names. The principal domain is separate from the system s primary domain. The primary domain for a system is the domain to which the system is joined; that is, the domain displayed in System Properties. The Interix principal domain is set by default to the system primary domain, but this setting can be altered . For example, when the primary domain for the system is WESTCORP and users are also in the WESTCORP domain, the Interix principal domain is WESTCORP by default. A who command displays a user named Carl in the WESTCORP domain as Carl. A user from another domain, such as Susannah in EASTCORP, is displayed as EASTCORP+Susannah.

UNIX system services are handled by server programs called daemons . Windows server-level programs are called services . Unlike a daemon, a service logs on to the computer by using a user account. This gives the Windows administrator greater control over the privileges granted to the service and, when the service logs on with a domain account, even allows the service to access network resources.

Interix can take advantage of both Windows and UNIX mechanisms to provide services such as inetd ( the UNIX super server for Internet services). By default, Interix runs such services as traditional UNIX daemons, using the init utility to start and stop these daemons. Similar to a traditional UNIX system, Interix runs init as part of its startup procedure. When it starts, init executes scripts referenced by symbolic links located in /etc/rc2.d. Then, init continues to run until it receives a termination signal, at which point it runs shutdown scripts for the daemons it started.

Rogue Wave SourcePro

Rogue Wave SourcePro consists of a set of libraries that enable cross-platform compatibility of applications between UNIX and Windows. Its C++ components handle many of the intricacies of the C++ language and provide high-level object-oriented interfaces to complex underlying APIs. With minimal code changes, applications built by using SourcePro Core run on multiple operating systems, including Windows, and Linux and other popular UNIX operating systems.

Rogue Wave SourcePro consists of libraries for core functionality and for database and networking support.

SourcePro Core

The Rogue Wave SourcePro core library consists of five modules:

  • The Standard C++ Library Module is a complete implementation of the ISO/ANSI Standard for the C++ Programming Language. Sun, Hewlett-Packard, and Compaq ship Rogue Wave s implementation of the ANSI Standard C++ Library with their C++ compilers.

  • The Essential Tools Module offers an internationalized set of fundamental C++ components that are useful in almost any type of C++ application. They provide user interfaces to the underlying ANSI Standard C++ Library and features beyond those in the ANSI standard, including classes for handling dates and times. Developers can use this module to write a single C++ application that can ship to any country.

  • The Advanced Tools Module offers a mechanism for complex stream transformations and object serializations, which can stream C++ classes with minimal code changes.

  • The XML Streams Module builds on the Advanced Tools Module, enabling C++ data to be written to or read from an XML stream. Because instances of C++ classes can be turned into XML without writing XML streaming code, developers can integrate existing C++ code into systems that use XML to communicate.

  • The Threads Module provides a higher level, object-oriented API that hides many of the complexities of multithreading in C++; that is, developers are insulated from dealing with the native C threading library implementations . The Threads Module classes handle fundamental tasks such as creating,manipulating, synchronizing, and deleting threads. Advanced threadingfunctionality includes server pools and producer/consumer queues.

SourcePro Networking, Web, and Security

Developers can create secure or nonsecure networked and Internet-enabled applications by using Rogue Wave SourcePro Net to handle the details of socket programming and Internet protocols. In SourcePro Net, developers can implement standard Simple Object Access Protocol (SOAP) concepts using their existing C++ knowledge and XML. Because SourcePro Net has a layered architecture, developers can choose the level of abstraction for an application, such as the abstract layer for ease of use, or the protocol layer for finer control of details.

SourcePro Net includes four modules:

  • The Essential Networking Module includes a high-level API for networking applications (it encapsulates the details of socket programming).

  • The Internet Protocols Module provides an API for developing Internet-enabled client-side applications (it encapsulates the details of key Internet protocols).

  • The Secure Communication Module provides an API for developing secure networked and Internet-enabled applications (it encapsulates the details of the low-level HTTPS protocol). This module also offers a high-level C++ API to Secure Socket Layer/Transport Layer Security [SSL/TLS] implementations, including RSA s commercial product BSAFE SSL-C and the open source alternative OpenSSL.

  • The Web Services Module encapsulates the current SOAP specifications, including SOAP 1. 2, SOAP with attachments, and XML Schema 2001. By using the Web Services Module, developers can convert SOAP objects to and from strings, enabling the objects to work with any networking or deployment technology.

SourcePro Database Support

Rogue Wave SourcePro DB provides relational database access in C++. The SourcePro DB object-oriented interface abstracts the complexity of writing database applications, but still allows access to the native database client libraries when needed. SourcePro DB encapsulates the ANSI SQL 92 standard and supplies a consistent, high-level C++ interface to relational databases. Its layered architecture comprises a database-independent interface module and a variety of database-specific access modules, including Oracle, Oracle 8, Sybase, DB2, Informix, and Microsoft SQL Server, as well as general access by using ODBC. The object-oriented encapsulation of relational database concepts eliminates the need to generate SQL programmatically.

The OpenSQL API helps to improve performance on a specific database by providing lower-level access that uses a statement-based architecture. This allows the creation of SQL, binds the variables to the statement, and executes the statement. By using SourcePro DB, developers can also get direct access to native structures and functions and make database-specific implementation choices.

Cross-Platform GUI Tools

By using cross-platform graphical user interface (GUI) tools, developers can write applications with an API consistent with both UNIX and Windows. The cross-platform tools usually create an abstraction through which the application can use the X-Windows system on UNIX and the Windows API on the Microsoft platform.

Some cross-platform GUI tools come from an independent software vendor (ISV), and others are open source. Even some open source versions come from a vendor with a support option. Examples of these cross-platform tools are the Carnac 2D graphics toolkit from INT, Inc., and the Qt toolkit from Trolltech.

INT Carnac

Carnac, a cross-platform interactive display system, is a C++ library availableon several UNIX systems as well as on the Windows  NT and Windows  2000 operating systems.

Carnac is designed to handle applications that have high-end graphics requirements. For optimum performance, Carnac drives the native graphics pipeline of the target system.

Carnac supports the following features in prototypes or applications:

  • Applications written in C++

  • Thread-safe library

  • Hard copy produced by PostScript

  • Computer Graphics Metafile (CGM) (optional)

  • Web browser support (optional)

  • Visual properties that can be set on shapes depending on target device

  • View layering (data can be categorized)

  • Advanced scaling, rotation, selection, and shape modification

  • Ability to persist pictures as binary or ASCII

For more information, see the INT Web site at http://www.int.com .

Trolltech Qt

The Trolltech Qt toolkit, a C++ cross-platform library available on several Windows-based and UNIX systems, provides platform-independent toolsets. Developers can use it to write applications to a single API with a single source code base. Qt is maintained by Trolltech, which delivers both a free, open-source version and full-featured versions suitable for creating commercial software.

Qt application development functionality, implemented as C++ classes, covers GUI, database, networking, and file handling. Classes and libraries used for database and file handling (and others) are separate from and are not required for using the GUI classes, where the Qt toolkit focuses its functionality.

Qt does not implement GUI by wrapping the native windowing capabilities. Instead, it creates its own abstraction layer, which means the toolkit can change look-and-feel characteristics between Windows, Motif, and other customizable schemes, depending on whether the application runs on a Windows or Motif system.

Qt also supports advanced graphics requirements that use the OpenGL extensions. Applications developed using Qt widgets can use OpenGL functionality.

For more information, see the Trolltech Web site at http://www.trolltech.com .

UNIX Emulation Systems

Another approach to creating system architecture that runs UNIX programs on Windows operating systems is to create UNIX emulation by using Win32. Such a program runs as a Win32-based application or service that accepts commands from the user through a command window. Because these systems are emulations rather than native Windows subsystems, performance of migrated UNIX applications could suffer and some UNIX functionality may not work in exactly the same way as it does on UNIX. In contrast, because Interix is implemented as an environment subsystem, it can deliver the exact behavior of a UNIX system.

UNIX emulation systems for Windows include the following:

  • Cygwin, which was developed by Cygnus Solutions and later Red Hat, featuresa port of the GNU development tools and utilities. Cygwin offers a UNIX-like development environment running on Windows. Cygwin does not implement a single, complete UNIX environment. Instead, it combines the features of several UNIX versions and Linux.

  • NuTCRACKER, which is part of the MKS Toolkit, features both the C and Korn shells. This makes many UNIX developers feel comfortable working with it. MKS delivers most of the UNIX 98 APIs plus features from specific UNIX versions and POSIX, such as threads. There is also a complete X-Windows system including a server.

  • U/WIN (UNIX for Windows), which was developed by David Korn, can be downloaded free of charge from the AT&T Research Web site for educational and research purposes. Commercial users must have a license. U/WIN uses the Korn shell. U/WIN provides support for most UNIX features including signals, UCB-style sockets, and devices.




UNIX Application Migration Guide
Unix Application Migration Guide (Patterns & Practices)
ISBN: 0735618380
EAN: 2147483647
Year: 2003
Pages: 134

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net