Chapter 10. .NET Framework Classes

Team-Fly    

 
Application Development Using Visual Basic and .NET
By Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Table of Contents
Part 4.  Fundamentals of the .NET Framework


It is impossible to cover in one chapter or one book all of the .NET Framework classes. Although coverage is incomplete, the .NET classes cover a large fraction of the Win32 API as well as much else. While a lot of attention has been focused on the Internet- related functionality, the development model for Windows applications has changed as well.

This chapter focuses on those classes that illustrate the key concepts and patterns that appear throughout the .NET Framework. Experienced programmers will find this approach more fruitful over the long run than our attempting to explain a little about every class that a programmer might need without giving much insight into them. Other chapters will go into more depth about other parts of the framework, such as Windows Forms, ASP.NET, ADO.NET security, and Web services.

We start out by exploring the concept of reflection and metadata. Metadata appears everywhere in .NET and is critical to understanding how the CLR can provide services for your applications. Next we explore file input/output for several reasons. First, it introduces the important topic of serialization. Second, the Path class provides an example of how some .NET Framework classes provide some or all of their functionality through shared methods . Third, the formatter classes are used in several places in .NET.

Understanding serialization will give you a concrete idea of how the framework can handle objects transparently for you. It also appears in a supporting role any place where objects have to be moved or transported. Our discussion of the ISerializable interface demonstrates how much easier it is to implement an interface in .NET than with COM.

To develop an understanding of the .NET model for applications, we introduce programming with threads under .NET and several .NET synchronization techniques to handle multithreading conflicts. The various synchronization techniques illustrate the tradeoffs of using attributes supplied by the .NET Framework versus doing it yourself.

To further your understanding of the .NET programming model, we introduce context and the use of proxies and stubs to implement system services. Application domains are much more effective than Win32 processes in achieving application isolation.

The asynchronous design pattern appears throughout .NET and is discussed in some detail. We give some examples of remoting because it is a key technology and it summarizes many of the concepts developed in this chapter. The chapter uses several attributes provided by the .NET Framework, and we show how to implement and use custom attributes. We discuss garbage collection, finalization , and the dispose pattern so that you can understand how to make sure resources are properly freed in your applications.


Team-Fly    
Top
 


Application Development Using Visual BasicR and .NET
Application Development Using Visual BasicR and .NET
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 190

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