Chapter 8. .NET Framework Classes

for RuBoard

It is impossible to cover in one chapter or one book all of the .NET Framework classes. 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 changes in Internet- related functionality, the development model for Windows applications has changed as well.

This chapter focuses on classes illustrating the key concepts and patterns that appear throughout the .NET Framework. Over the long run, experienced programmers will find this approach more fruitful than attempting to explain a little about every class that you might need without giving you much insight. Other chapters 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 exemplifies how some Framework classes provide some or all of their functionality through static 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. Serialization also appears in a supporting role wherever 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 issues. The various synchronization techniques illustrate the trade-offs of using attributes supplied by the Framework versus doing it yourself.

To further your understanding of the .NET programming model, we introduce context and the use of proxies and stubs. Application domains can achieve application isolation with less performance penalty than a Win32 processes. [1]

[1] Win32 process isolation uses the processor's MMU. .NET's application domain isolation is done in software and requires verifiable code.

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.

for RuBoard


Application Development Using C# and .NET
Application Development Using C# and .NET
ISBN: 013093383X
EAN: 2147483647
Year: 2001
Pages: 158

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