Flylib.com

Books Software

 
 
 

- page 72

Snoops

   

 
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay  Katre, Prashant  Halari, Narayana  Rao  Surapaneni, Manu  Gupta, Meghana  Deshpande

Table of Contents
Chapter 7.   Migrating to ASP.NET II


Summary

Because session state cannot be shared across ASP and ASP.NET, the session object in ASP needs to be replaced with the ASP.NET session object. This isn't much of a task because most of the properties and methods of the ASP session object are supported in .NET.

Caching in ASP.NET is very different from that in traditional ASP. ASP.NET provides a cache object that is a key-value pair object, similar to the session and application objects. It also provides a means to cache the entire response by way of the OutputCache directive added at the start of a page. Partial or fragment caching is also made possible by user controls.

All of the six intrinsic objects in ASP are supported in ASP.NET with some differences in properties, events, or methods of the objects. We list all the properties, events, and methods of ASP objects and whether they are supported, changed, or not supported in .NET. The structural and language changes involve changes in syntax and the manner in which the page is presented.

We have covered all the important functionalities in ASP that can be migrated to ASP.NET across two chapters. We have provided code examples for each functionality in ASP and its equivalent in ASP.NET.


Snoops

   
Top
0-13-100962-1_ch08 Chapter 8. New Features in Visual C++ .NET

Snoops

   

  
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay  Katre, Prashant  Halari, Narayana  Rao  Surapaneni, Manu  Gupta, Meghana  Deshpande

Table of Contents


Chapter 8. New Features in Visual C++ .NET

Visual C++ .NET provides the developer with the flexibility to choose the best from both worlds (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, generally 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 components .

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.


Snoops

   
Top