Programming In The .Net Environment


Programming in the .NET Environment is the software developer's guide to the .NET Framework. The authors describe Microsoft's vision for distributed component-based systems development and then show programmers how to develop software that takes full advantage of the features of the .NET Framework. Readers learn how to author components, libraries, and frameworks that not only exploit the capabilities of the .NET Framework but also integrate seamlessly into that environment.


See more details below
$37.49 price
(Save 25%)$49.99 List Price
Other sellers (Paperback)
  • All (14) from $1.99   
  • New (6) from $31.53   
  • Used (8) from $1.99   
Sending request ...


Programming in the .NET Environment is the software developer's guide to the .NET Framework. The authors describe Microsoft's vision for distributed component-based systems development and then show programmers how to develop software that takes full advantage of the features of the .NET Framework. Readers learn how to author components, libraries, and frameworks that not only exploit the capabilities of the .NET Framework but also integrate seamlessly into that environment.

This book begins with an introduction to the goals and architecture of the .NET Framework. Readers will then gain a thorough understanding of the type, metadata, and execution systems; learn how to build and deploy their components within .NET assemblies; and gain an understanding of the facilities of the Framework Class Libraries.

Topic coverage includes:

  • The Common Language Runtime (CLR) and the Framework Class Libraries
  • The CLR's Type, Metadata, and Execution Systems
  • Creating and deploying .NET Assemblies
  • Internationalization and localization facilities
  • .NET Languages, including C# and Visual Basic .NET

The book concludes with appendixes written by other specialists in the field: Paul Vick (writing about VB .NET), Eric Gunnerson (on C#), Mark Hammond (on Python for .NET), Jan Dubois (on Perl for .NET), John Gough (on Component Pascal for .NET), Pankaj Surana (on Scheme for .NET), Nigel Perry (on Mondrian), and Juerg Gutknecht (on Active Oberon for .NET).

Written by a team of experienced authors using a practical, authoritative approach, Programming in the .NET Environment is an indispensable guide to developing components that fulfill the promise of Microsoft's .NET Framework.

Books in the Microsoft .NET Development Series are written and reviewed by the principal authorities and pioneering developers of the Microsoft .NET technologies, including the Microsoft .NET development team and DevelopMentor. Books in the Microsoft .NET Development Series focus on the design, architecture, and implementation of the Microsoft .NET initiative to empower developers and students everywhere with the knowledge they need to thrive in the Microsoft .NET revolution.


Read More Show Less

Product Details

  • ISBN-13: 9780201770186
  • Publisher: Pearson Technology Group 2
  • Publication date: 11/6/2002
  • Series: Developmentor Series
  • Pages: 556
  • Product dimensions: 7.50 (w) x 9.25 (h) x 1.13 (d)

Meet the Author

Damien Watkins is the founder of Project 42, a consulting company specializing in the development of Component Based Systems for the Internet. Until 2002 he was a lecturer at Monash University in Melbourne, Australia. Damien became involved with the development of the .NET Framework in 1998 when Microsoft invited Monash University to join Project 7, an early access program for .NET.

Mark Hammond has been an independent software consultant since 1995. He has produced many of the Windows extensions for Python, including PythonWin, Active Scripting and Active Debugging support, and coauthored the Python/COM framework and extensions. In 2000 he published his first book, Python Programming on Win32, and from 1999 through 2001 developed the first .NET implementation of the Python language.

Brad Abrams was a founding member of both the Common Language Runtime and .NET Framework teams at Microsoft, where he is currently a Lead Program Manager. Brad has been involved with WinFX and Windows Vista efforts from the beginning. His primary role is to ensure consistency and developer productivity of the .NET Framework through Vista and beyond. His popular blog can be found at

Read More Show Less

Table of Contents

(NOTE: Each chapter concludes with a Summary.)



1. Introducing the .NET Framework.

Programming Issues.

Programming in the Small.

Programming in the Large.


Comparing the .NET Framework and IDL-Based Systems.

Elements of the .NET Framework.

Common Language Runtime.

Base Framework.

Exposing the .NET Framework.

Windows Clients.

ASP.NET: Web Forms.

ASP.NET: Web Services.


The Type System.

The Metadata System.

The Execution System.

Example: Hello World.

2. The Type System.

The Relationship Between Programming Languages and Type Systems.

The Evolution of Type Systems.

Programming Language-Specific Type Systems.

The Design Challenge: Development of a Single Type System for Multiple Languages.

CLR-Programming Language Interaction: An Overview.

Elements of the CLR Type System.

Value Types.

Built-in Value Types.

User-Defined Value Types.

Reference Types.

Object Types.

Interface Types.

Pointer Types.

Example: User-Defined Object Type.

Example: Use of Interfaces on Value Types.

Assignment Compatibility.

Nested Types.



3. The Metadata System.

Medata Issues.

Saving Metadata About Types: IDL Files.

Reflection: Inspection of a Type's Metadata.

Reflection Classes.

Example: Using Reflection.

Example: Use of Type as an Abstract Type.

Metadata Tools and Extensions.

A Tool for Reading Metadata.

Metadata Extensibility.

Dynamic Discovery of Types.

Assemblies and Manifests.


Metadata File Format.

COM Interop.

4. The Execution System.

The Execution System Versus Other—Component Models.

Intermediate Language.

Example: Generating Intermediate Language.

Verification of Intermediate Language.

Starting a CLR Program.

COR Debugger.

Application Domains.

Memory Management.

Value Types Versus Reference Types.

Garbage Collection.


Role-Based Security.

Evidence-Based Security.

Policy Manager.

Code Groups.

Named Permission Sets.

Policy Assemblies.

Examining Policy Levels and Permission Sets.

Stack Walks.

Declarative and Imperative Style.

5. Building Applications.

Existing Technologies to Solve Application-Related Problems.

Well-Known Locations.

Search Paths.

Symbolic Names.

Versioning-Related Technologies.

Windows Registry.


Example: A Simple Assembly.

Version 1 of AboutBox.

Building the Assembly with nmake and makefile.

Functioning of the makefile.

Embedded and Linked Resources.

Example: A .NET Assembly with Embedded Resources.

Example: A .NET Assembly with Linked Resources.

The Assembly Linker.

Public and Private Assemblies.

Strong Names.

Assembly Caches.

Example: Creating and Using Public Assemblies.

Assembly Versioning.

Example: Building a Second Version of an Assembly.

Example: Binding to a Different Version of an Assembly.

Internalization and Localization.


Existing Technologies: Separation of Code and User Interfaces.

.NET Localization Concepts.

Example: A Localized Application.

Application Domains.

Application Domains Versus Processes.

Use of Application Domains.

Example: Retrieving Current Application Domain Information.

Example: Creating and Manipulating Application Domains.

Example: Loading Assemblies into Application Domains.

6. Deploying Applications.

Configuration Files.

Text-Based Configuration Files.

CLR Configuration Files.

Which Configuration Files to Use?

Downloading Web Content.

Referencing Assemblies with the codeBase Element.

The Download Cache Revisited.

Web Controls.

Installing Applications.

Copying Files to the Computer.

Downloading Files to the Computer.

Using Traditional Installation Programs.

Installing the .NET Framework.

The ECMA CLI Standards.

Compact Framework.

Smart Device Extensions.

Shared Source Common Language Infrastructure.

7. The Framework Class Library.

A Historical Perspective.






Support for Multiple Programming Languages.

Goals of the .NET Framework.

Unify Programming Models.

Be Factored and Extensible.

Integrate with Web Standards and Practices.

Make Development Simpler.

Design Guidelines.

Naming Guidelines.

Member Usage.


















Looking Back and Looking Ahead.

Appendix A: Visual Basic .NET.

Type System Additions.





Type System Modifications.


Variant and Object Types.


Date, Currency, and Decimal Types.

Platform Changes.

Deterministic Finalization and Garbage Collection.

Let and Set Assignment.

Late Binding.

On Error and Structured Exception Handling.

Events and Delegates.

Language Cleanup.

New Features.

Future Directions.


Appendix B: C#.

History and Design Goals.

A Brief History of C++ and C#.

C# Design Goals.

The C# Type System.

Reference Versus Value Types.

User-Defined Types.

Component-Oriented Development.



Operator Overloading.




Unsafe Code.

Advanced Interoperability.

Dealing with Existing Structures.

Performance Extremes.

Neat Things.


switch on String.

params Arrays.

XML Comments.

A Stack Component Example.

Future Directions.

C# and Standardization.


Appendix C: Python for .NET.

A Brief Overview of Python.

About Python.

Python Implementations.


Python for .NET.

Current Status.


Using Python for .NET.

Example: Hello World.

Using .NET Objects.

Method Signatures and Overloads.

Other Examples of Compiler Techniques.

Limitations of Python for .NET.


Closed World Syndrome.

Class and Instance Semantics.

Type Declarations or Inference for Speed.

Type Declarations for Semantics.

Possible .NET and Python Enhancements.

Type Declarations.

Dynamic Language Support.

Alternative Implementation Strategies.

Python for .NET.

The Compiler.

The Runtime.

The Library.


Appendix D: Perl and the .NET Runtime.

Perl for .NET Research Compiler.

The Parser.

The Code Generator.

The Runtime Library.

PerlNET Component Builder.

Interface with Standard Perl Interpreter.


Supported .NET Features.

PerlNET Status.

Example: A Windows Forms Application.


Appendix E: Component Pascal on the CLR.

About Component Pascal.

The Type System.


Module Structure.

Mapping to the CLR.

Mapping the Program Structure.

The Synthetic Static Class.

Controlling Visibility.

Mapping the Type System.

Static Record Types.

Dispatched Methods.

Semantic Challenges.

Nonlocal Addressing.

Structural Compatibility of Delegates.

Covariant Function Types.


Compatibility Extensions.



Appendix F: Hotdog: Compiling Scheme to Object-Oriented Virtual Machines.

Introduction to the Hotdog Scheme Compiler.

Scheme, Briefly.

Object-Oriented Virtual Machines.



Small Values.

Dynamic Type Checking.


Performance Improvements.



Appendix G: Functional Languages for the .NET Framework.

A Brief Introduction to Mondrian.

The Type System.

Exception Handling.

Concurrency Support.

The Syntax.

Types in Mondrian.

Primitive Types.

Type Products.

Type Unions.

Parametric Types.

Functions in Mondrian.

Monomorphic Functions.

Polymorphic Functions.

Partial Applications.

Just-in-Time Evaluation.

Calling Other CLR-Hosted Languages.

The Power of .NET: A Multilanguage Example.

The Sieve of Eratosthenes in C#.

The Sieve: Combining Mondrian and C#.

A Glimpse into the Future: Improving the Interface.



Appendix H: Active Oberon for .NET: A Case Study in Language Model Mapping.

History of the ETH Programming Languages.

The Active Object System.

An Extended Concept of Object Types.

A Unified Concept of Abstractions.

A Concept of Static Modules.

The Mapping to the Common Type System.

Recapitulation of the .NET Interoperability Framework.

Mapping Modules.

Mapping Definitions.


Mapping Active Behavior.

Language Fitting.

Summary and Conclusions.




Suggested Reading List.

Index. 0201770180T10292002

Read More Show Less


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

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:

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.


Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)