Green Eggs and .NET



Green Eggs and .NET


By Paul Litwin


One of my daughter Anna's favorite books (in case you're wondering, she's 1 1/2 years old) is Green Eggs and Ham by Dr. Seuss. We read it every night as part of the bedtime routine. (Jonathan Goodyear also mentions a Dr. Seuss title in his column .NET Certification Blues, but I swear it's only a coincidence.) In Green Eggs and Ham, Sam-I-am asks an unnamed character who we like to call "the grouch," "Do you like green eggs and ham?" The grouch emphatically states, "I do not like green eggs and ham. I do not like them Sam-I-am." Sam-I-am proceeds to ask the grouch if he would like them "here or there." The grouch says no, and the book continues with Sam-I-am asking the grouch countless times if he would like green eggs and ham in a variety of settings (with a fox, in the rain, on a boat, etc.). The turning point of the book is when the grouch agrees to try the green eggs and ham if Sam-I-am will agree to let him be. The grouch finally tries the dish and exclaims, "Say! I like green eggs and ham! I do! I like them, Sam-I-am!"


Okay, so you're asking yourself what this could possibly have to do with .NET. Good question. The grouch is Microsoft, and Sam-I-am is the developers who have been complaining for years and years about the problems with DLL hell and registry nightmares. We have been trying to coax Microsoft into fixing DLL hell and imagining life without the registry. And for years, like the grouch, Microsoft has said no in a thousand different ways, telling us it was impossible.


But, at some point in the development of .NET, Microsoft finally agreed to try the green eggs and ham, tasted them, and liked them. And now, under .NET, assemblies (.NET dll and exe files) are self-describing and private, by default. These two facts eliminate DLL hell and the need to register components. They also make installation as simple, in most cases, as copying files from one location to another. Of course, if it's an ASP.NET application, you may have to create a virtual folder also, but I think most of us can handle that.


The .NET assembly can avoid DLL hell and registry problems because it is self-describing. That is, an assembly carries metadata about itself that includes, among other things, information regarding the version of the assembly and any dependencies it has on other assemblies. Prior to .NET, this sort of data was stored in the registry. Jeff Niblack digs under the covers of assemblies and explores the metadata stored in an assembly in Explore .NET Assemblies. I'm sure you'll find Jeff's article intriguing enough to fire up Microsoft's Intermediate Language Disassembler and dig through some assemblies. It certainly made me want to!


We've all gotten cynical throughout the years, but I want to state rather emphatically that I truly appreciate the fact that the grouch finally agreed to try the strange green breakfast. The story ends with the grouch saying, "I do so like green eggs and ham! Thank you! Thank you! Sam-I-am!"


You're most welcome, Microsoft.


Paul Litwin is editor-in-chief of asp.netPRO magazine. Readers may contact him at [email protected].




Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.