15. Using the Framework ClassesMost of this book so far has concentrated, quite correctly, on the classes in the System.Web and associated namespaces of the .NET Framework. This is what you would expect, because it is here that the classes implementing ASP.NET reside. However, .NET provides a rich environment of managed code objects that you can use from code in your ASP.NET pages. This makes many tasks much easier than in previous (and other) environments where you have to instantiate external components to be able to step outside the bounds of the intrinsic language capabilities. For example, in versions of ASP prior to ASP.NET, you often had to resort to registering COM objects of various kinds and then instantiating them within the process of your Web server. Now, using the Framework classes, you benefit from the inherent flexibility, efficiency, and safety that managed code provides. There is no need to go across processing boundaries when calling other classes; and the features such as automatic garbage collection, integrated debugging capabilities, simple no-registration deployment, and compatible data and parameter types make using the Framework classes much easier. In this chapter, you will see some of the ways you can use the classes in the namespaces outside of System.Web, including:
The chapter starts with a look at the example application provided for this chapter, which illustrates techniques related to all of the topics just presented. |