RDN Directions

Better Late than Never

Having the source code for the .NET Framework will be another tool in the toolbox.

When I was in high school, I had a friend who, like a lot of teenagers, was intensely interested in what was going on in music, movies, clothes and everything pop culture. The only problem was he was perpetually a year or so behind the times. It's not that he had bad taste or made goofy choices. It's just that by the time he "discovered" a hot band, everyone else was on to something else. He was the living embodiment of the concept "better late than never."

Reading that Microsoft is making the source code for the .NET Framework available to developers made me think of my old friend. There's nothing wrong with Microsoft's decision to allow developers to peek into the source code of the .NET Framework. In fact, it will help some developers facing tricky debugging problems. It's just that, even with the change, Microsoft is still behind what its competitors are doing and even behind what Microsoft itself did for other libraries back in 1992.


Under the terms of the announcement, Microsoft will make the source code to the .NET Framework 3.5 -- which will ship with Visual Studio 2008 -- available under the Microsoft Reference License. This is the most restrictive of Microsoft's shared-source programs. Other programs include the Permissive and Community licenses, which give developers the right to modify and redistribute the code. The Reference License, however, is a read-only license: Developers can read the source code but may not make any changes.

Having the source code for the framework could help developers with tricky debugging problems because they'll be able to use the Visual Studio debugger to step from the code of their own application into the code of the framework itself. Until now, the framework has been a black box. But no matter how good the external documentation is, at the end of the day, a developer with a tricky bug needs to understand what the software actually does as opposed to what the documentation says it does.

It's not uncommon for developers to eventually find themselves with a bug caused by some unexpected interaction between their code and the framework. Rather than pounding their heads or spending hours Googling message boards, having the source code will allow them to dig deeper until they find the root problem.

Playing Catch Up
But as useful as the source code is, in terms of openness it still leaves the .NET Framework behind competitors such as Java and Adobe. Java is the most open: Its source code is available under the GNU Public License (GPL), the same license used for the Linux kernel. Adobe, meanwhile, makes the source code for its Flex framework -- used by developers to build Flash applications -- available under the Mozilla Public License, used by the Firefox browser. The Mozilla license isn't quite as permissive as the GPL, but both of those licenses give developers the right to modify the source code and even to distribute those changes.

No one seriously expects Microsoft to adopt the GPL, but with the release of the .NET source code Microsoft hasn't even caught up to what it did in 1992 with the Microsoft Foundation Classes (MFC). MFC is a class library used by C++ developers to build Windows applications, and at one time it was extremely popular. From its initial release, MFC not only provided developers with source code, but allowed them to modify the code and redistribute the changes, as long as they changed the name of the resulting DLL. (In the interest of disclosure I will point out that I worked on the C++ team at Microsoft during this time, but that doesn't change the fact that it was a good idea.)

There's one other fly in the ointment, particularly if your developers contribute to any open source projects. Microsoft has a number of patents for technology in the .NET Framework and developers that examine the code will be exposed to those patents. But the Microsoft Reference License provides a license to those patents for reference purposes only, opening up the possibility that your developers will inadvertently use patented technology in other projects.

For those of you already using Java or Adobe Flex, this doesn't change your world. And for open source developers, you can add this to the list of topics for your next weekly meeting with the lawyers. But if you've got a staff of .NET developers facing some tricky challenges, having the source code for the .NET Framework will be another tool in the toolbox. After all, late really is better than never.

About the Author

Greg DeMichillie analyzes and writes about Microsoft's development platform and tools for Directions on Microsoft, a research firm dedicated to tracking Microsoft. He was previously the group program manager at Microsoft responsible for the overall design and feature set for Visual C# and C++. A founding member of the C# language team, DeMichillie was a key contributor to the initial design and development of .NET.

Reader Comments:

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above