Open Source developer Miguel de Icaza, leader of the GNOME project and founder of Ximian, has been exploring Microsoft's .NET platform with an open mind. When I interviewed him over a month ago, he told me that he was impressed with .NET. Then he was only beginning to think about the implications of Microsoft.NET in the Open Source community. Since then, he has organized a new project called Mono, which will try to build a free implementation of .NET for UNIX systems. Ximian will dedicate some resources to this project, but like any Open Source project, its success will depend heavily on contributions from independent developers.
".NET is an interesting mix of technologies," said Miguel de Icaza. He likes the C# language, and he is particularly impressed by .NET's component architecture and its development tools. .NET provides developers with a state-of-the-art development environment, one that leaps ahead of open source alternatives. "With .NET, Microsoft is starting with a clean slate and building for the future," said de Icaza in an interview. "It's a new development environment for the next twenty years."
"Five years ago, we [open source developers] had the high ground in technical tools," said de Icaza. "We had better tools and a better development environment than Windows developers had. Now, with .NET, I see that the roles have changed and Windows developers have much better tools than we have. Ours are good but not as good as theirs. Theirs are better integrated. Within that context, I can see how developers might use Visual Studio instead of a free-software development environment to develop applications -- especially if they are not concerned with freedom, and the ideas behind free software."
".NET is a good platform to innovate from," said de Icaza. "So I'm interested in seeing an open source version of .NET. Microsoft might port the runtime to Linux, but I don't know if it will be open source. I personally want to see the .NET runtime on Linux. I'm very interested in seeing this happen," he said emphatically, seeming to commit himself to building it if it doesn't emerge from current efforts.
In our conversation, Miguel de Icaza explored some of the reasons he liked .NET. "The C# language has some of the features of Java that I like," said de Icaza. "One of things I really like is interface-based programming, which we've been doing in the GNOME project. We've been working towards building a component system and it's sort of annoying to have to deal with the whole CORBA IDL. Microsoft was streamlining the process of writing component software with C#. They had a very simple mechanism for writing COM components using C#. That was the first thing that got my attention."
When asked what .NET says to him about future directions for GNOME, de Icaza replied: "What I wanted to do with GNOME was to close the gap between the proprietary software offering and the free software offering. We're not catching up on the desktop. With .NET, MS has figured out the next generation of development software. So it's worth looking at." He added: "If you're a developer, .NET has a lot of things that you're not going to find in Linux."
In the February Linux Magazine, Jon Udell writes about what open source developers can learn from .NET. Udell opens his article, Embrace and Extend: What can Linux learn from Microsoft's .NET? by quoting de Icaza's "Let's Make Unix Not Suck"
What are your thoughts about his take, and on open source possibilites for .NET?
Miguel de Icaza will announce technical details of Mono at the the O'Reilly Open Source Convention in San Diego, CA, July 23-27, 2001. Rub elbows with Open Source leaders while relaxing on the beautiful Sheraton San Diego Hotel and Marina waterfront. For more information, visit our conference home page or see our pre-conference coverage.
Certainly, C# is similar to Java, but what de Icaza found intriguing was that .NET was not targeted for a single language. The problem with Java is, of course, that developers must work in Java. As a development environment, .NET is language-agnostic. It allows developers to program in whatever language they like. "In .NET, Microsoft has created the common language runtime (CLR), which is a way for languages to generate code that interoperates easily," said de Icaza. "You can have Visual Basic running in the same environment as C#, Fortan, Pascal, or whatever. You could create a class in C++ and pass it over to a C# object and then have it instantiated as a Visual Basic object. It's a programmer's dream come true."
The real benefit is greater code reuse. "Code reuse is a big problem in the Unix environment," added de Icaza. He details this argument in his well-known article: "Let's Make Unix Not Suck."
"The problem is that we are not re-using enough code across all the applications in UNIX," he said. "Everybody is reinventing all the little pieces." His first approach to solving the problem was to suggest that applications use the GNOME libraries. But exposing those libraries in Perl, Python, or whatever language the user chose was a difficult and complex task. This is what led de Icaza to create the Bonobo project, which is developing a component architecture implemented in CORBA. "That's what we set out to do last year with Bonobo. I said, 'let's use a component architecture that will allow us to write the API once and then bring it to any programming language.' We wanted C, Perl, Python or any language to have access to the APIs."
He feels that the design goals behind .NET and Bonobo were very similar, but he thinks the .NET component model is better. "One problem is that Bonobo has a lot more overhead than .NET. .NET is pretty slim when it comes to the size of the components and things that you can expose." When asked if he would see himself moving away from Bonobo, de Icaza replied: "Bonobo's interfaces are okay for what they do, which are compound documents and embedding of controls. There are better ways of defining components and writing components than writing them in CORBA IDL. If I can write a component by implementing an interface in C#, I would much rather create the component in C# than with existing Bonobo." Nonetheless, he can see both approaches being compatible. However, he reiterated that he saw himself in the future not writing C and CORBA IDL, but C#.
When pressed for additional details on what makes .NET better, de Icaza replied: "The tools are better integrated. You have a debugger, a project manager. It's an IDE with documentation integrated into the system. It's very easy to deploy web services. You write a web service and it's getting packaged into a single directory. One of the things you can do is just dump the directory into your system and it happens to work. They have a signature system for their libraries, so if you develop an application that links into a set of libraries, even if somebody replaces the API for the library, the application is going to continue to run because it links to the original library."
He added: "Microsoft basically solved the DLL problem, and that's something that the open source community is not solving. Even though we have the tools to do so, no one is taking the next step to do things right. There's still breakage that's happening in libraries that are shipping with traditional Linux libraries. If you get the latest version of Linux, many applications are going to break because they broke binary compatibility, because you didn't upgrade your application, because there's not a lot of effort going into supporting third-party application developers. So that's why I think .NET is a better application development platform, right now." Visual Studio.NET is "pretty sweet," he added.
According to de Icaza, what Microsoft got right is that they put all the technologies together: the language, the common runtime library, and the integrated development environment (IDE). "Look at how easy they make it to expose web services through SOAP," said de Icaza. "I don't think Microsoft is a visionary in this respect. SOAP is an idea shared by other people, the idea of an XML-RPC system." However, he credits Microsoft for putting all the pieces together, making it easier for developers.
De Icaza, who makes no claim to being a Java expert, believes that Java will also offer a lot of what you find in .NET. "I don't think they have everything together today for me to deploy web services," he commented. "If you have Visual Studio, you can deploy Web services right away; they are SOAP-enabled. You can automatically generate WSDL descriptions."
Miguel de Icaza has no intentions of becoming a Microsoft developer. However, he believes the open source and free software communities should be prepared to have a response to .NET, or have an equivalent offering. He is particularly interested in strategies that "embrace and extend" .NET and leverage it to the benefit of open source developers. "I'm playing with the idea of writing a C# compiler in C#. There are a few bits written, but I only think of it as an interesting hack. There are people writing free replacements for the key components of .NET." He hopes that eventually there will be a full open source replacement for .NET.
He'd like to see .NET development tools running under Linux, along with a .NET runtime. "People are going to chose .NET because it's a very good development environment. So what you want to do is have a .NET runtime for Linux. There's already a beautiful IDE called SharpDevelop." SharpDevelop is a C# development environment written in C# by Mike Krueger and released under the GPL. According to de Icaza, the interesting thing about SharpDevelop is that the environment is really complete in only a few lines of code. It's really amazing when you compare the code size to other projects. That says something about the language and the runtime environment. It's pretty fast too. The whole actually compiles itself. C# showed a lot of potential by having this one guy write a really good IDE in about two months. The language is powerful, the runtime is powerful, and they are creating some really great applications."
De Icaza worries that some people will be put off by .NET because it comes from Microsoft and because it seems so large and all-encompassing. "Microsoft is calling everything .NET and so people are really confused about what .NET is. Is it Hailstorm? Is it Visual Studio? Is it ASP? The only part I really focus on is the .NET development environment. I don't know about all the rest." He believes open source developers need to break down .NET into its parts and set about writing replacements. "I think it's really easy," said de Icaza. "Here's why. When the GNU project was started, it was really clear, was given, that they were replacing UNIX. There were hundreds of tools and there was documentation for the tool and its interface. Developers could pick a tool and concentrate on it and work independently of each other. Same thing can happen in .NET. You have the class libraries and you can write the library in pretty much any language. Different contributors can work on different pieces of the runtime."
Brian Jepson, an O'Reilly editor and writer with experience in Perl, Java, and C#, agrees with de Icaza. "Almost anybody could develop a compatible implementation of .NET," he said, because what you need to know is out in the open. (Microsoft is in the process of submitting .NET to ECMA for standardization.) "I tend to think of .NET as a better J2EE and more open."
There are currently 51 projects listed on Sourceforge that are classified in the C# programming language category. (Some of these associations seem misleading.) In addition to SharpDevelop, there is a .NET Opensource project that aims to write the portable .NET runtime. "It's still in its infancy but it already has a lot of code," said de Icaza. "You want to write the just-in-time compilers and write a front-end to GCC that takes a Microsoft .xit, which contains IL bytecode, and just feed it to GCC, which can optimize for the native system. That is something that .NET gets right. They are not pretending to generate bytecode and wait for some magic to make it fast. They actually ship with a working optimizing JIT with the current version of .NET. When you are debugging your .NET applications, you are actually getting optimized Intel code running, instead of the IDL intermediate representation that they generate."
This explains why C# in this environment is generally faster than Java. "I don't think MS is coming out with something novel here," said de Icaza. "They just said, 'if we need to get more speed, we need to do the full optimization,' and they just did it instead of pretending that it was something they were going to do over the next five years."
Reflecting on what might be called the Open Source response to .NET, de Icaza said: "I don't think we as a community can design something that is going to be as completely thought out as .NET. It's taken them several years already to design this, and I believe that Microsoft hired a lot of smart people to build it. It would definitely take us a lot of time and debate to get there." He doesn't believe that the open source community needs to leapfrog .NET, but rather they should make it their own, much as Unix led to GNU/Linux.
Certainly, with the upcoming announcement of Mono, Miguel de Icaza feels the open source community can replicate a free implementation of .NET just as the GNU team set out to methodically create a free version of the UNIX operating system. Mono is quite an ambitious project and Miguel de Icaza deserves a lot of credit for daring to undertake it. He will have to gain the support of Open Source developers, who are naturally suspicious of anything that Microsoft is involved in. This loosely-coupled effort will be competing with the world's largest software company. O'Reilly Network will continue to follow Mono. Once its announcement is made official, we will provide a deeper look at the details of the project and its implications for an open source .NET platform.
Dale Dougherty is the editor and publisher of MAKE, and general manager of the Maker Media division of O'Reilly Media, Inc.
Return to the .NET DevCenter.
Copyright © 2009 O'Reilly Media, Inc.