Nancy Nicolaisen
With their newest C++ products, Borland and Microsoft have taken two fundamentally different foci: Microsoft emphasizes cross-platform coverage and the ability to create OLE custom controls, while Borland introduces a highly modular set of OLE 2.0 tools. Both products should ship this fall.
In a major strategy reversal, Borland is ceding the battle for definition of a de facto C++ Windows API to Microsoft's MFC (Microsoft Foundation Classes) while taking the lead in OLE 2.0 applications development tools with Borland C++ 4.5. BC++ 4.5 delivers OLE 2.0 component support that is independent of a specific applications framework, tools that retrofit existing code with OLE functionali
ty, and support for fast, DLL-based OLE servers.
Borland's new OCF (Object Component Framework) lets you write OLE-enabled applications that plug cleanly into OWL (Object Windows Library), MFC, straight C++, and even ordinary C Windows programs--thus offering the first incremental path for investing older code with OLE features. OCF essentially makes the model of OLE communications fit an ordinary Windows messaging model. Its normalizing mechanism allows older applications to benefit from OLE components without undergoing redesign.
A unique and complementary strength of BC++ 4.5's OCF tool set is its AppExpert source code generator. AppExpert can automatically update previously generated code with OLE support. By contrast, Microsoft's AppWizard source code generator is a single-pass utility that establishes for all time the class library support built into the application templates it creates.
BC++ 4.5's compiler will reportedly include an MFC compatibility layer. The precise extent of MF
C support has not been defined, but Borland says it will be thorough. ``We will give developers a path that makes MFC relatively easy to use with our compiler,'' says Michael Hyman, languages business-unit manager at Borland. Borland has not abandoned its OWL class libraries; it's made incremental improvements in them, the compiler back end, and some IDE tools. But the recurrent harmonic of the BC++ 4.5 theme is OLE 2.0.
In another daring move, Borland will introduce a 32-bit portability layer that lets 32-bit Windows applications use 16-bit Visual Basic controls under Chicago and Windows NT. This is good news to the developers of Windows 3.1 applications that rely on VBXes (Visual Basic custom controls), an inherently 16-bit technology; this support is not forthcoming from Microsoft.
A novel feature of BC++ 4.5 is internationalization of the VBX property list, which eliminates the need for developers to supply separate DLLs for each international language that they want to support. A VBX can ma
p its property list to alias tables that translate the property names to various languages so that a VBX can change languages dynamically.
With Visual C++ 2.0, Microsoft has crafted a masterful product by improving its IDE, expanding its class library, and targeting multiple hardware platforms. Visual C++ 2.0's 32-bit MFC library is source code-portable across the Intel, Mips RISC 4000, DEC Alpha, and Mac platforms. The new 32-bit MFC libraries are thread safe, exploiting one of the more sophisticated operating-system features of NT. MFC functions can be called from multiple threads, with the library offering a CWinThread class for creating new threads.
Visual C++ 2.0's most dramatic technical achievement is the OLE Custom Control Development Kit. The OLE Custom Control Development Kit does for custom controls what the Visual Workbench did for MFC: It leads developers through a set of choices and generates extensive skeleton code, leaving the programmer to add only the application-specific behav
ior. This is an enabling technology, and one that BC++ 4.5 OLE tools don't address.
Illustration: Visual C++ 2.0 features a seamlessly integrated development environment that minimizes the number of steps needed to create visual interface elements and link them to handle code. Pictured is the new project window, which opens the appropriate editor when you click on a filename in the project tree.
Illustration: Using the Borland C++ AppExpert, you can create an OLE 2.0-enabled application by simply choosing the OLE 2.0 options provided. Borland's OLE 2.0 support also make it easy to OLE-enable existing applications.