Introducing Microsoft .NET, Second EditionWhat the Heck Is .NET, Anyway?
The server-side features of Microsoft .NET run on Windows NT, Windows 2000, and Windows XP
Professional. The client-side features run on these plus Windows 98, Windows Me, and Windows
XP Home. While it's currently an add-on service pack, later versions of .NET will probably
be made part of the operating system. Later versions may or may not be announced to allow at
least portions of it to run on other versions of Windows or, as we shall see, perhaps for
other operating platforms as well. Microsoft .NET provides the following services, all
discussed later in this book.
A new run-time environment, the .NET Framework. The .NET Framework is a run-time
environment that makes it much easier for programmers to write good, robust code quickly,
and to manage, deploy, and revise the code. The programs and components that you write
execute inside this environment. It provides programmers with cool run-ime features such
as automatic memory management (garbage collection) and easier access to all system
services. It adds many utility features such as easy Internet and database access. It also
provides a new mechanism for code reuse—easier to use and at the same time more
powerful and flexible than COM. The .NET Framework is easier to deploy because it doesn't
require registry settings. It also provides standardized, system-level support for versioning.
All of these features are available to programmers in any .NET-compliant language. I
discuss the .NET Framework in Chapter 2.
A new programming model for constructing HTML pages, named ASP.NET. Even
though intelligent single use programs are on the rise, most Internet traffic for the near-to
middle-term future will use a generic browser as a front end. This requires a server to
construct a page using the HTML language that browsers understand and can display to a
user. ASP.NET (the next version of Active Server Pages) is a new environment that runs on
Internet Information Services (IIS) and makes it much easier for programmers to write code
that constructs HTML-based Web pages for browser viewing. ASP.NET features a new
language-independent way of writing code and tying it to Web page requests. It features
.NET Web Forms, which is an event-driven programming model of interacting with controls
that makes programming a Web page feel very much like programming a Visual Basic form.
ASP.NET contains good session state management and security features. It is more robust
and contains many performance enhancements over original ASP. I discuss ASP.NET in
Chapter 3.
A new way for Internet servers to expose functions to any client, named XML Web
services. While generic browsers will remain important, I think that the future really belongs
to dedicated applications and appliances. The Web will become more of a place where,
instead of data being rendered in a generic browser, a dedicated client (say, Napster, for
music searching) will make cross-Internet function calls to a server and receive data to be
displayed in a dedicated user interface or perhaps without a user interface at all for
machine-to-machine communications. Microsoft .NET provides a new set of services that
allows a server to expose its functions to any client on any machine running any operating
system. The client makes calls to the server using the Internet's lowest common
denominator of XML and HTTP. A set of functions exposed in this manner is called an XML
Web service. Instead of sitting around waiting for customers to see the light and embrace
the One True Operating System (Hallelujah!), the new design seems to say, "Buy our
operating system because we provide lots of prefabricated support that makes it much
easier to write applications that talk to anyone else in the entire world, no matter what or
where they're running." I discuss XML Web services in Chapter 4.
Windows Forms, a new way of writing rich client applications using the .NET
Framework. A dedicated client application that uses XML Web services needs to provide a
good user interface. A high-quality interface can provide a much better user experience, as
the dedicated interface of Microsoft Outlook is better than the generic Web user interface of
Hotmail. Microsoft .NET provides a new package, called .NET Windows Forms, that makes
it easy to write dedicated Windows client applications using the .NET Framework. Think of
Visual Basic on steroids, available in any language, and you'll have imagined the right
model. I describe .NET Windows Forms in Chapter 5.
ADO.NET, which provides good support for database access within the .NET
Framework. No Internet programming environment would be complete without some
mention of database access. Most Internet programs, at least today, spend most of their
time gathering information from a client, making a database query, and presenting the
results to the client. .NET provides good support for database operations using ADO.NET. I
cover ADO.NET in Chapter 6.
Outstanding support for handling XML documents and streams. Operating in the
modern distributed computing environments requires applications to handle XML. The .NET
Framework contains outstanding support for writing applications that handle XML documents
and streams. I discuss XML in Chapter 7.
A standardized mechanism for signaling asynchronous events. Providing a
standardized mechanism for callbacks from a server to its client was a large stumbling block
in pre-.NET COM-based programming. The .NET Framework provides a standardized
mechanism for one party to make an asynchronous call to another. I discuss this eventing
mechanism in Chapter 8.
Support for writing multithreaded code. The Windows operating system acquired
preemptive multithreading in 1993 with the release of 32-bit Windows NT. Unfortunately,
multithreaded programs have been difficult to write due to the low level of support from the
operating system. The .NET Framework contains much more support for allowing everyday
programmers to make use of the operating system's multithreading capabilities. I discuss
threading in Chapter 9.
Support for writing your own Windows Forms and Web Forms controls. The concept of
a control, a prepackaged unit of functionality dealing with a user interface, has been
fantastically successful. Both Windows Forms (Chapter 5) and ASP.NET Web Forms
(Chapter 3) get most of their functionality from their ability to host controls. .NET also
provides excellent support for users to develop their own controls, either for internal use or
for sale to third parties. Chapter 10 and Chapter 11, respectively, discuss writing Windows
Forms controls and Web Forms controls.
David S. Platt
Microsoft Press



