What the Heck Is .NET, Anyway?


That’s what Microsoft .NET is—prefabricated infrastructure for solving common problems in Internet applications. Microsoft .NET has been getting an enormous amount of publicity lately, even for this industry. That’s why 5000 rabid geeks, crazed on Jolt Cola, converged on Orlando, Florida, in July 2000. Not because they can’t pass up a bargain off-season airfare, even if it’s not somewhere they want to go, or because they enjoy punishing heat and sunstroke. It was to hear about Microsoft .NET for the first time.

Microsoft .NET provides prefabricated infrastructure for solving the common problems of writing Internet software.

The server-side features of Microsoft .NET are built into Windows Server 2003, which is scheduled to ship in the first half of 2003. They are also available as an add-on pack for Windows 2000 and Windows XP Professional. The client-side features can be installed on these versions of Windows plus Windows 98, Windows Me, and Windows XP Home. They will probably be a part of future desktop operating systems as well. Microsoft .NET provides the following services, all discussed later in this book.

  • A 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-time 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 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 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 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, Kazaa, 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. The .NET Framework provides a 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 a 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 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 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 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 because of 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.

  • Enhanced connection from one .NET system to another .NET system The .NET remoting API allows programmers to write code that creates objects and calls functions from one .NET system to another. It’s more powerful and flexible in this specific case than Web Services, but it doesn’t work with non-Microsoft systems. If you think of remoting as the true successor of DCOM, you’ll have the right mental model. Chapter 10 discusses .NET remoting.

  • Support for run-time discovery and invocation of an object’s methods and properties The .NET reflection API allows a programmer to examine an object’s contents at run time. This is useful for developers of intelligent tools such as the properties window in Visual Studio. It also allows services such as the Web Service infrastructure to create an object and call its methods by means of names that they don’t know until run time. Chapter 11 discusses the reflection API.

Note

The second edition of this book included chapters describing the .NET Framework’s 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 4) and ASP.NET Web Forms (Chapter 3) get most of their functionality from their ability to host controls. The .NET Framework also provides excellent support for users to develop their own controls, either for internal use or for sale to third parties. The chapters covering these topics have been removed from this edition of the book, but you can download them for free from the book’s web site, http://www.introducingmicrosoft.net.




Introducing Microsoft. NET
Introducing Microsoft .NET (Pro-Developer)
ISBN: 0735619182
EAN: 2147483647
Year: 2003
Pages: 110

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