Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL



Developing large distributed software systems is a complex and interesting challenge. A number of architectures have emerged to simplify this task and to relieve developers of the burden of dealing with the many interoperability issues associated with creating such systems. This book focuses on one of those architectures, Microsoft's .NET Framework.

An often-asked question is, “So what is new in the .NET Framework?” On one level, the answer is simple: “Not much.” To put this answer into context, however, the same may be said of most recent software advancements. For example, C++ represented a significant step forward—but it was actually an amalgamation taking advantage of the object-oriented concepts of Simula 67 and the efficiency of C. Likewise, Java contained very little new science, with the concepts of virtual machines and class libraries having been commonplace for many years. So how, then, do these advancements contribute to the computing body of knowledge? Often they exploit synergy—that is, the combination of known technologies in a new and different manner that allows developers to bring together two powerful concepts in a single architecture. So it is with the .NET Framework. Although significant benefits can be gained by using the framework, many readers will be relieved to see that the environment includes many familiar concepts, although their implementation may have changed.

For example, a major concept pervading the .NET Framework is object orientation. Recently, this paradigm has won enormous acceptance in many areas, ranging from graphic user interface (GUI) development to network programming. The .NET Framework supports all of the object-oriented concepts, including classification, information hiding, inheritance, and polymorphism. What is new in the .NET Framework is the elimination of language boundaries that have hampered object orientation in the past. The framework also extends these concepts in concert with other concepts. For example, inheritance can be subject to security constraints; just because you can use a type, it may not follow that you can subtype from that type.

Intended Audience for This Book

It is important to understand the audience for whom this book was written so that you can know whether this book is for you. This book is targeted at software developers who wish to

  • Understand the philosophy and architecture of the .NET Framework,

  • Produce generic frameworks, libraries, classes, and tools to be used in the .NET Framework, and

  • Use multiple languages to develop applications in the .NET Framework.

As this book is geared toward software developers, it not only describes the goals and architecture of the .NET Framework but also demonstrates how the technology implements features and services to meet these goals. Understanding the philosophy and architecture of .NET is important for all distributed system developers, even if they do not use the .NET Framework. Why? Because the .NET Framework represents Microsoft's vision of distributed systems development for the Internet. By understanding the architecture of the .NET Framework, developers gain insight into the issues associated with distributed systems development and Microsoft's solution to these issues.

Once developers have an understanding of the .NET Framework's architecture, the next step is to develop software that takes advantage of it. The .NET Framework is not an abstract programming model, but rather a full-featured system that allows developers to implement their solutions and then make them available to other developers in a robust and secure environment. As the .NET Framework is language agnostic, developers can use the right language to develop parts of a system and then merge these parts together at runtime, regardless of any language differences.

So who is this book not for? It is not an introduction to programming; readers should have experience developing software before reading this book. It is also not the definitive guide to all aspects of the .NET Framework or even to any single aspect of the .NET Framework. A book that covered in detail all aspects of the .NET Framework would be almost indigestible. Many books devoted to a single part of the .NET Framework, such as ASP.NET, are available. This book, in contrast, provides a solid overview of fundamental aspects of the .NET architecture. For in-depth information on individual aspects of the framework, such as the security system, readers must refer to other texts or specific documentation.

Organization of This Book

This book has a fairly straightforward organization:

  • Chapter 1 describes the basic concepts and gives background information on the issues involved in distributed system development.

  • Chapters 2 through 4 are the “runtime section.” They describe the issues that can be thought of as “programming in the small”—defining types, storing metadata, and executing programs, for example.

  • Chapters 5 through 7 are the “building and deployment section.” They deal with the hard issues in distributed systems development—issues such as assembling and developing software from components and deployment challenges. This section also covers the Base Framework, including the libraries used to build applications.

  • The appendices contain important peripheral information that does not fit into Chapters 1 through 7. This information includes experience reports from people who have developed compliers for the .NET Framework.

Our Motivation for Writing This Book

“Why are we writing a book?” We have asked this question many times over.

In late 1998, Monash University was asked if it would like to become involved with Microsoft in the development of the “next generation of COM,” which was then known as the COM Object Runtime (COR). The invitation to join Project 7, the name for this multinational joint collaboration between Microsoft and a number of universities, came from James Plamondon at Microsoft Research. Why was Monash University chosen? The major reason was because of the association with Bertrand Meyer and his object-oriented programming language Eiffel. Even at this early stage, Microsoft was firmly focused on having the runtime system support as many languages as possible.

Monash University accepted the invitation, and Damien Watkins attended an overview meeting in Atlanta during early 1999. The idea of writing this book was first discussed at that time. Having just seen a preview of COR, which was then known as Lightning, Damien asked James Plamondon whether anyone was writing a book on Lightning. It was clear that a number of books would be required to cover all aspects of Lightning, but Damien wanted to ensure that the small, but hopefully beneficial, involvement of Project 7 members was recorded. With James's encouragement, and after a few years and numerous changes, this book emerged. The appendices in this book are a concrete acknowledgment of the work done by many people outside of Microsoft on Project 7.

Mark Hammond has been involved in Python development since 1991, developing and maintaining the Win32 extensions for Python, which includes the PythonWin IDE and the support libraries for COM. Mark had worked with Microsoft since the mid-1990s on Python-related projects, most notably the ActiveScripting and ActiveDebugging extensions for the Python language. In 2000, Mark released his first book, Python Programming on Win32, co-authored with Andy Robinson.

In 1998, recognizing the increasing popularity of the Python programming language, the Project 7 team decided that Python should be one of the initial languages ported to the platform. Mark's history with Microsoft made him the obvious choice for spearheading this effort. His residency in Melbourne, Australia, near Melbourne University and Monash University, meant that a core group of Project 7 participants formed almost exactly on the other side of the world from Seattle. That was how Damien and Mark met.

Brad Abrams was fortunate to be present for the birth of the Common Language Runtime (CLR), cutting his teeth in application programming interface (API) design and working on fundamental types such as System.Object and System.String. He participated in the earliest design decisions, which would later infiltrate the breadth of the .NET Framework and, in fact, all .NET code. Brad was very enthusiastic about the cross-language support being built into the runtime system while he led the team that developed the Common Language Specification (CLS).

Early in 1998, Adam Smith, a developer from another team, asked an interesting question: If he exposed properties from his library, could Visual Basic (and other languages) consume his API? Brad did what any respectable program manager at Microsoft would do—he called a one-hour meeting to decide which features of the CLR would be available in all languages. That meeting didn't resolve the issue. In fact, answering the question took more than three years and thousands of hours from key architects inside Microsoft, including Anders Hejlsberg, Peter Kukol, Paul Vick, Alan Carter, Scott Wiltamuth, George Bosworth, Lauren Feaux, Ian Ellison-Taylor, Herman Venter, Jonathan Caves, Francis Hogle, Mark Hall, Daryl Olander, Craig Symonds, and Brian Harry. Later, Brad reviewed and honed the CLS with a group of key language innovators outside Microsoft, the Project 7 members. It was through this effort that Brad met Damien and Mark.

As a by-product of working out what was to be included in the CLS, many “best practices” were developed. Brad started writing these best practices down in what would later become the .NET Framework Design Guidelines document. This document led the way in the drive for consistency and usability across the APIs exposed in the .NET Framework. The work on the CLS and the Design Guidelines document put Brad into a unifying role as Microsoft took disparate internal groups and formed the .NET Framework team. Through this effort, Brad gained an appreciation for the value of the different parts of the .NET Framework as well as the need for consistent usage of concepts across them.

In addition to his day job, Brad joined a very small team charged with creating the CLI and C# language standards, first through the European Computer Manufacturers Association (ECMA) and then through the International Standards Organization (ISO). Once again, the CLS and Design Guidelines received a careful review and fine-tuning from this group; with great help from Jim Miller, they were published as part of the international CLI standard. Brad loves to talk about the .NET Framework and the way it simplifies the lives of developers, so agreeing to do this book was a no-brainer for him!

For us, the major satisfaction gained from working on Project 7, as with all experiences in life, has come not from developing a technology but rather from working with such a large, diverse, and talented group of developers from all over the world.

One final word about the book's title, which pays homage to the truly excellent book Advanced Programming in the UNIX Environment, by W. Richard Stevens (Addison-Wesley, 1992). Rich's book is amazing, and he will be sadly missed.

Current Status of the .NET Framework

The .NET Framework has undergone numerous name changes throughout its history. First, it was known as Project 42, then renamed COR, and subsequently called Lightning, COM+2.0, and NGWS (Next Generation Web Services). It was finally renamed the .NET Framework only weeks before its launch at the Professional Developers Conference (PDC) in Orlando in July 2000.[1]

[1] An interesting aside about the history of the .NET Framework: Every .NET Framework executable contains the string “BSJB”. This magic string refers to some of the original developers of the .NET Framework—Brian Harry, Susan Radke-Sproull, Jason Zander, and Bill Evans.

Core elements of the .NET Framework have been standardized by the ECMA. A major reason for standardizing the .NET Framework is to permit other implementations of the framework to be built. Apart from the commercial Windows-based implementation, Microsoft has built shared-source implementations for Windows and BSD UNIX; it is hoped that other implementations from different groups will follow. For information on the standardization effort, interested readers should visit the following Web site:

The .NET Framework standardization effort is detailed at the following Web site:

The C# language standard is found at the following address:

You can find out more about the shared-source implementations at the following Web site:


There are so many people whom we wish to thank. First, we thank all those at Microsoft who allowed us to test the .NET Framework, explained their reasoning for building the framework as they did, listened to our feedback, and even modified the system to incorporate our wishes. Although we will accidentally omit many people—and we are very sorry for that—a non exhaustive list of these individuals would include the following: Nick Abbott, Ihab Abdelhalim, Chris Anderson, Eric Andrae, George Bosworth, Bryan Barnett, Jonathan Caves, Shuk Chan, Steve Christianson, Dennis Crain, Krzysztof Cwalina, Dan Fay, Kit George, Tony Goodhew, David Glance, Carl Grumbeck, Brian Grunkemeyer, Jonathan Hawkins, Mark Hall, Brain Harry, Anders Hejlsberg, Nick Hodapp, Jim Hogg, Rob Howard, Tom Kaiser, Loren Kohnfelder, Pranish Kumar, Ronald Laeremans, Sebastian Lange, Jason McConnell, Erik Meijer, Todd Merrell, Brad Merrill, Jim Miller, Oshoma Momoh, John Montgomery, Anthony Moore, Jon Nicponski, James Plamondon, Peter Plamondon, Susan Radke-Sproull, Jayanth Rajan, Craig Schertz, Don Syme, Clemens Szyperski, Peter Torr, Paul Vick, Scott Wiltamuth, and Eric Zinda.

To all our fellow Project 7 members, who actively participated at the Redmond Development Laboratories, thanks for your valuable insights. Again, a nonexhaustive list would include the following people: Gerry Butler, Chee Yeen Chan, Simon Cuce, John Daintree, Tyson Dowd, Jan Dubois, John Gough, Jürg Gutknecht, Fergus Henderson, Basim Kadhim, Leif Kornstaedt, Bertrand Meyer, Christine Mingins, Nick Nicoloudis, Nigel Perry, Paul Roe, David Simmons, Raphael Simon, Emmanuel Stapf, Pinku Surana, and Dean Thompson.

The reviewers of the book provided invaluable feedback and eliminated numerous errors from the book—many thanks. We would like to especially express our appreciation to Martin Heller, Michi Henning, Jim Hogg, Laurie McGuire, Erik Meijer, Scott Meyers, Christophe Nasarre, Jeffrey Richter, and Purush Rudrakshala. All the remaining errors belong solely to the authors.

A very special thanks to all those who helped at Addison-Wesley, who turned our words into a book: Kristin Erickson, Jill Hobbs, Curt Johnson, Chris Kief, Debbie Lafferty, Chanda Leary-Coutu, Joan Murray, Robin O'Brien, Simone Payment, Stephane Thomas, and Katherine Tristaino.

Special mentions should also go to the Thai Kitchen and Kim Chi restaurants. Many perplexing issues have been resolved over fine lunches at these establishments.

Most of all we thank our families, who endured our absence and pre occupation for the last four years:

To my wife: Your love and support strengthen me; your proofreading saves my butt! Philippians 1:3



To my daughter, Sacha, who has to put up with her dad spending way too much time playing and working on his PC. To everyone at Dave's Jungle Bar, who ensure that I have a life other than computers. To my parents, Lee and John, and my brothers, Paul, Scott, and Jason, for allowing me to grow up in an environment that allowed me to become whatever I wanted. Thanks and love to you all.



To my wife, Māire, and our five children, Joseph, Jane, John, Leah, and Katherine, for putting up with all those weeks I spent away from you. Now that the book and the thesis are finished we should spend some time together! Love to you all.



  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint