Miguel pointed me to an interesting discussion between Havoc Pennington of RedHat and Paolo Molaro, a lead developer of the Mono project. Although I exchanged mail with Miguel about this thread about a week ago I've been watching the discussion as opposed to directly commenting on it because I've been trying to figure out if this is just a discussion between a couple of Open Source developers or a larger discussion between RedHat and Novell being carried out by proxy.

Anyway, the root of the discussion is Havoc's entry entitled Java, Mono, or C++? where he starts of by pointing out that a number of the large Linux desktop projects are interested in migrating from C/C++ to managed code. Specifically he writes

In the Linux desktop world, there's widespread sentiment that high-level language technologies such as garbage collection, sandboxed code, and so forth would be valuable to have and represent an improvement over C/C++.

Several desktop projects are actively interested in this kind of technology:

  • GNOME: many developers feel that this is the right direction
  • Mozilla: to take full advantage of XUL, it has to support more than just JavaScript
  • OpenOffice.org: has constantly flirted with Java, and is considering using Java throughout the codebase
  • Evolution: has considered writing new code and features in Mono, though they are waiting for a GNOME-wide decision

Just these four projects add up to probably 90% of the lines of code in a Linux desktop built around them

Havoc then makes the argument that the Open Source community will have to make a choice between Java/JVM or C#/CLI. He argues against choosing C#/CLI by saying

Microsoft has set a clever trap by standardizing the core of the CLI and C# language with ECMA, while keeping proprietary the class libraries such as ASP.NET and XAML. There's the appearance of an open managed runtime, but it's an incomplete platform, and no momentum or standards body exists to drive it to completion in an open manner...Even if we use some unencumbered ideas or designs from the .NET world, we should never define our open source managed runtime as a .NET clone.

and argues for Java/JVM by writing

Java has broad industry acceptance, historically driven by Sun and IBM; it's by far the most-used platform in embedded and on the UNIX/Linux enterprise server...One virtue of Java is that it's at least somewhat an open standard; the Java Community Process isn't ideal, but it does cover all the important APIs. The barest core of .NET is an ECMA standard, but the class libraries of note are Microsoft-specific...It's unclear that anyone but Microsoft could have significant influence over the ECMA spec in any case...

Also worth keeping in mind, OO.org is already using Java.

Combining Java and Linux is interesting from another standpoint: it merges the two major Microsoft-alternative platforms into a united front.

At this point it is clear that Havoc does agree with what Miguel and the rest of the Mono folks have been saying for years about needing a managed code environment to elevate the state of the art in desktop application development on UNIX-based Open Source platforms. I completely disagree with him that Sun's JCP process is somehow more of an open standard than ECMA. That just seems absurd. He concludes the article with

What Next?

For some time, the gcj and Classpath teams have been working on an open source Java runtime. Perhaps it's time to ramp up this effort and start using it more widely in free software projects. How long do we wait for a proprietary JDK to become GPL compatible before we take the plunge with what we have?

The first approach I'd explore for GNOME would be Java, but supporting a choice of gcj or IKVM or the Sun/IBM JDKs. The requirement would be that only the least common denominator of these three can be used: only the subset of the Java standard completed in GNU Classpath, and avoiding features specific to one of the VMs. Over time, the least common denominator becomes larger; Classpath's goal is to complete the entire Java standard.

There is also some stuff about needing to come up with an alternative to XAML so that GNOME and co. stay competitive but that just seems like the typical Open Source need to clone everything a proprietary vendor does without thinking it through. There was no real argument as to why he thought it would be a good idea, just a need to play catchup with Microsoft.

Now on to the responses. Paolo has two responses to Havoc's call to action. Both posts argue that technically Mono is as mature as the Open Source Java/JVM projects and has niceties such as P/Invoke that make communication between native and managed code straightforward. Secondly, his major point is that there is no reason to believe that while Microsoft will eventually sue the Mono project for violating patents on .NET Framework technologies that Sun would not do the same with Java technologies. Not only has Sun sued before when it felt Java was being threatened (the lengthy lawsuit with Microsoft) but unlike Microsoft it has never given any Java technology to a standards body to administer in a royalty free manner as Microsoft has done with C# and the CLI. Miguel also followed up with his post Java, Gtk and Mono which shows that it is possible to write Java code against Mono which points out that language choice is separate from the choice of which runtime (JVM vs. CLI) you use. He also echoes Paolo's sentiments on Sun and Microsoft's behavior with regards to software patents and their technologies in his post On Software Patents.

Havoc has a number of followup posts where he points out various other options people have mailed him and where he points out that his primary worry is that the current state of affairs will lead to fragmentation in the Open Source desktop world.  Miguel responds in his post On Fragmentation, reply with the followng opening

Havoc, you are skipping over the fact that a viable compromise for the community is not a viable compromise for some products, and hence why you see some companies picking a particular technology as I described at length below.

which I agree with completely. Even if the Open Source community agreed to go with C#/CLI I doubt that Sun would choose anything besides Java for their “Java Desktop System”. If Havoc is saying having companies like Sun on board with whatever decision he is trying to arrive at is a must then he's already made the decision to go with Java and the JVM. Given that Longhorn will have managed APIs (aka WinFX) Miguel believes that the ability to migrate from Windows programming to Linux programming [based on Mono] would be huge.  I agree, one of the reasons Java became so popular was the ease with which one could migrate from platform to platform and preserve one's knowledge since Java was somewhat Write Once Run Anywhere (WORA). However this never extended to building desktop applications which Miguel is now trying to tap into by pushing Linux desktop development to be based on Mono.

I have no idea how Microsoft would react to the outcome that Miguel envisions but it should be an interesting ride.



Thursday, March 25, 2004 1:13:28 PM (GMT Standard Time, UTC+00:00)
As much fun as it would be to base the decision solely on the technical merits, we know that is going to happen. I just don't see most OS folks being comfortable with C#/CLI knowing that Microsoft may choose to pull a legal trigger at some point in the future. I am not trying to bash them, but they were convicted of monopolistic practices. That is a huge gamble.
Mark Schmeets
Thursday, March 25, 2004 5:16:49 PM (GMT Standard Time, UTC+00:00)
ECMA may be more open than the JCP, but a far larger portion of the Java platform goes through the JCP than .NET stuff goes through ECMA. Future versions of JSP get specced through the JCP, for instance; nobody expects Microsoft to spec ASP.NET through ECMA.
Sunday, September 5, 2004 6:40:56 AM (GMT Daylight Time, UTC+01:00)
I don't see how Java is supposed to become the basis for Linux desktop software. Are you talking about Gnome bindings for Java? Or are you talking about ditching Gnome and writing everything in Swing?

And what do people mean when they say "Java" anyway? Sun seems pretty clear on it: none of the OSS Java implementations are "Java"--none of them have passed the conformance tests. So, when Havoc says "use Java", does he mean Sun's proprietary Java implementation, or does he mean open source implementations of something that isn't really Java?

I'm also wondering whether people have bothered reading the licenses on the Java language specification and JCP: it's a page of fine print that says that Sun owns the specification (yes, the specification, not just their trademark).
Tom Smith
Comments are closed.