Chapter 8. New Features in Visual C++ .NET
Visual C++ .NET provides the developer with the flexibility to choose the best from both
(i.e., the developer can opt for the .NET Framework classes or Enhanced Microsoft Foundation Classes (MFC) and ActiveX Template Library (ATL) Libraries). This puts Visual C++ .NET above other languages supported by the Visual Studio .NET.
Visual C++ .NET has introduced a new programming model for C++ developers, managed extensions. Now using managed extensions, you can write C++ code with the classical approach using Microsoft Foundation Classes (MFC), Active Template Library (ATL), COM, and WIN32 APIs, generally referred as unmanaged code, and at the same time you can write code in C++ using libraries provided by the .NET Framework,
referred as managed code. Managed code runs under the .NET runtime execution engine to take advantage of the services provided by the .NET Framework such as garbage collection.
Generally the unmanaged code is faster than the managed code because it does not have the overhead of .NET runtime execution engine. Moreover, you can call the WIN32 APIs and existing C++ code without any extra transitions. The managed extension in Visual C++ .NET provides support for the existing C++ applications. With the help of managed extensions, we can migrate the existing C++ applications to exploit the various features provided by the .NET Framework. Using managed extensions you can mix both managed and unmanaged code (native C++ code) in the same application. This will give you a tremendous amount of control and flexibility and at the same time a seamless integration with the other .NET
Besides the managed extensions, Visual C++ .NET comes with the enhanced version of MFC and ATL libraries. In Visual C++ .NET, we have altogether separate project types. The ATL Server project in Visual C++ .NET has given C++ programmers the power of Web development by introducing an altogether new framework for Web applications. Now the developers can use the simple programming model provided by the ATL Server Framework to build high-performance applications with consummate ease. Visual C++ .NET provides the ATL Server Web service, which is an extension to ATL Server with the XML and Simple Object Access Protocol (SOAP) support. Visual C++ .NET provides the support for the MFC applications for consuming Web services.
The intent of this chapter is to provide insight into new and enhanced features provided by Visual C++ .NET for C++ developers. Let's explore the much talked about feature of Visual Studio .NET, managed extensions.