Click to Rate and Give Feedback
Articles by this Author
Windows Workflow Foundation allows you to write workflow-based programs in terms of domain-specific activities that are implemented in CLR-based programming languages such as C# and Visual Basic. Here Don Box and Dharma Shukla get you started.

By Don Box and Dharma Shukla (January 2006)
This article describes a collection of new programming frameworks that are part of "Longhorn," the upcoming version of Windows. "Indigo," the code name for this framework, provides rich support for service-oriented design that is complementary to traditional object-oriented approaches. Indigo marries the best features of .NET Remoting, ASMX, and .NET Enterprise Services into a unified programming and administration model. Indigo's deep support for standard protocols, including HTTP, XML, and SOAP, makes it easier to integrate applications and services without sacrificing security or reliability.

By Don Box (January 2004)
The common language runtime of the .NET Framework has its own secure execution model that isn't bound by the limitations of the operating system it's running on. In addition, unlike the old principal-based security, the CLR enforces security policy based on where code is coming from rather than who the user is. This model, called code access security, makes sense in today's environment because so much code is installed over the Internet and even a trusted user doesn't know when that code is safe.In this article, Don Box explains how code access security works in the CLR. He discusses the kinds of evidence required by policy, how permissions are granted, and how policy is enforced by the runtime.

By Don Box (September 2002)


By Don Box (February 2002)


By Don Box (November 2001)


By Don Box (May 2001)


By Don Box (December 2000)
The XSL Transformations (XSLT) specification defines an XML-based language for expressing transformation rules that map one XML document to another. XSLT has many of the constructs found in traditional programming languages, including variables, functions, iteration, and conditional statements. In this article you'll learn how to use the XSLT instructions and template rules, manage namespaces, control transformation output, use multiple stylesheets, and employ pattern-matching with template rules. A sidebar explains how to access XSLT from MSXML using the IXSLTemplate and IXSLProcessor interfaces.

By Don Box, Aaron Skonnard, John Lam (August 2000)
More ...
Popular Articles
Here the author answers questions regarding the Entity Framework and provides an understanding of how and why it was developed.

By Elisa Flasko (July 2008)
Microsoft Robotics Studio is not just for playing with robots. It also allows you to build service-based applications for a wide range of hardware devices.

By Sara Morgan (June 2008)
Performance problems can creep into your Web app as it scales up, and when they do, you need to find the causes and the best strategies to address them.

By Richard Campbell and Kent Alstad (April 2008)
With custom form regions in Outlook you can pull in data from designated data sources and truly customize your users' Outlook 2007 experience.

By Steve Fox (Launch 2008)
More ...
Read the Blog
In the November issue of MSDN Magazine, Jeffrey Richter demonstrates some recent additions to the C# programming language that make working with the APM significantly easier. In the June ...
Read more!
The July 2008 issue of MSDN Magazine is now available online. Here's what's in the issue: Data Services: Develop ...
Read more!
The June 2008 issue features the first installment of a new MSDN Magazine column on software design fundamentals. We’ll discuss design patterns and principles in a manner that isn't bound to a specific tool or lifecycle methodology. In this issue, Jeremy Miller starts the Patterns in Practice column ...
Read more!
In the April 2008 issue of MSDN Magazine, Kenny Kerr introduced the Windows Imaging Component (WIC), showing you how you can use it to encode and decode different image ...
Read more!
A combination of the retained-mode graphics system and notification mechanisms such as dependency properties unleash the flexibility and power of Windows Presentation Foundation (WPF, allowing these objects to be targets of data bindings and animations. In the June 2008 issue of MSDN Magazine, Charles ...
Read more!
One problem with GUI programming in C++ is that most libraries are too low level, putting much of the burden on the programmer. In the June 2008 issue of MSDN Magazine, John Torjo introduces you eGUI++, a C++ library that gives you a ...
Read more!
More ...
{ End Bracket }
Scheme Is Love
Don Box


For the past few years, it has become fashionable to embrace a dynamic language such as Perl, PHP, Python, or Ruby. While I'll admit to having a short but pleasurable tryst with Ruby, I believe I have found true love in the dialect of Lisp called Scheme.
In writing Scheme programs, I've learned a lot about coding, design, architecture, and aesthetics. On this front, Eric S. Raymond got it right in his essay, "How to Become a Hacker":
Lisp is worth learning for a different reason—the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.
Everyone gets something different from their travels with Lisp. Here's what I saw along the way.
Small is beautiful. Scheme is a great example of a micro-kernel design style. Scheme defines a very small number of base mechanisms as part of the core language/runtime specification. For example, Scheme defines only one conditional in its base: the if special form. The if form works like the ? : operator from C/C++/C#:
(if abc "yes" "no")
This is equivalent to the following C expression:
abc ? "yes" : "no"
But Scheme and the C languages depart at this point. C defines a number of logical operators (&&, ||, !) and control flow statements (if, if/else, while, do/while) as language primitives. In contrast, Scheme defines all of these constructs as either procedures or macros. Does Scheme have the moral equivalent of C's basic conditionals and control constructs? Absolutely. What's interesting about Scheme is that these are all defined purely in terms of Scheme.
Lambda is more powerful than you think. Scheme programs are defined largely in terms of the lambda special form. Scheme lambdas are used to define functions. What's noteworthy about lambda is that functions are values just like integers are values. For example, the following Scheme code
(define s (lambda (y) (+ y 1)))
defines a new variable named s whose value is the function that calculates the successor of its argument. Here's the equivalent C#:
Converter<int,int> s = delegate(int y){ return y + 1; };
In both C# and Scheme, lambdas form lexical closures that capture the in-scope variables that are used by the newly defined function.Consider this C# code:
Converter<int,int> MakeAccumulator() {
  int total = 0;
  return delegate (int y) { return total += y; };
}
What I love about this approach versus defining a class is that I didn't need to go through the standard 20 questions one typically asks themselves when writing a new class. No class versus struct, interface versus abstract base, or other analysis was necessary. Instead I wrote a program that did what I wanted it to do. Period.
The difference between code and data is highly overrated. One thing all Lisp dialects have in common is that they build on a very simple mechanism (lists) that are used to build composite data structures. For example, the following Scheme expression
(list 1 2 3 4 5)
results in a five-element list containing the integers 1 through 5. In this case, list is a variable that is bound to a lambda that constructs a list out of its arguments.
In Lisp dialects, expressions themselves can be viewed as lists. Consider this simple Scheme expression:
(+ 1 2 3 4 5)
When evaluated, this expression results in the number 15. To turn off evaluation and keep this expression as plain, uninterpreted data, you can use the quote special form like this
(quote (+ 1 2 3 4 5))
which is longhand for:
'(+ 1 2 3 4 5)
Both of these expressions result in a six-element list, which begins with the symbol + followed by the integers 1 through 5. The ability to treat code as data allows me to apply general query and data manipulation techniques to my programs. To go back to the world of interpretation, I can ask the system to evaluate a data structure as if it is a legal Scheme expression like this:
(eval '(+ 1 2 3 4 5) (scheme-report-environment 5))
This melding of code and data is central to all dialects of Lisp, and is fundamental to the way Microsoft is integrating multiple expression languages (most notably SQL) in future versions of the Microsoft® .NET Framework.

Don Box is an architect on the Indigo project at Microsoft, working on next-generation Web service protocols and plumbing. His latest book is Essential .NET Volume 1: The Common Language Runtime (Addison-Wesley, 2002).

Page view tracker