What is Mono?

Contents

Preface

Based on post from Miguel de Icaza's (miguel@ximian.com) on the gnome-hacker list in Febrary 2002.

Before starting, I would like to ask my readers to forget everything they have heard about .NET, because it is a marketing term used to describe many different Microsoft projects, and there is a lot of information both correct and incorrect about it floating around.

My goals with Mono are very specific, and I will address those shortly, but for the sake of getting things done, please forget everything you have heard about .NET.

What is Mono?

Mono is an implementation of 7 pieces of technology:

These are usually referred in the Microsoft world as the `.NET Framework' as opposed to .NET. When I say `.NET Framework' here, I am talking about these technologies.

Seasoned industry programmers will notice that the above is very much like Java and the Java VM. They are right, the above is just like Java.

The CIL has one feature not found in Java though: it is byte code representation that is powerful enough to be used as a target for many languages: from C++, C, Fortran and Eiffel to Lisp and Haskell including things like Java, C#, JavaScript and Visual Basic in the mix.

I wish I had the time to go in more detail, but for the sake of this argument, the above will suffice.

Although Ximian can only finance the work of a C# compiler (that is all the resource I have at my disposal), I want to encourage other people to work on free implementations of other compilers.

I want to encourage other developers to look at targeting existing compilers and interpreters to the CLI: JavaScript, Basic, Perl, Python, C++, and maybe even get gcc core to generate CIL bytecodes.

The CIL and the promise of language independence:

Bertrand Meyer (the father of Eiffel) wrote an interesting article that encapsulates my excitement about the possibilities of the CIL:

This technology allows programming languages to be considered on the basis of how they will perform for a given task, and not based on the runtime libraries that you will depend. Any software engineer should read this article:

So no longer should a software engineer pick Fortran, because that is the only language where his math libraries are available: he can now pick the right language for the problem at hand.

Mono and GNOME.

GNOME had always tried to have a good support for multiple programming languages, because we realize that no matter how much we loved C as a programming language, there was a large crowd of people out there that would like to use the GNOME libraries from their favorite programming language, which might not necessarily be C.

This strategy has paid off very well. There are healthy and striving Python, Perl, Guile and Ada communities out there that use the Gtk+ and Gnome bindings to build applications. From rapid prototyping to robust applications: we wanted to empower developers.

Keeping language bindings up to date and shipping them on time has always been a consuming process, because no matter how automated this process has turned out to be, there is still a considerable amount of manual work that needs to be done.

I do go into more details about this at the following places:

An upgrade to the development platform: Part I.

Microsoft has terrible APIs to code against. Anyone who has used Win32 and any combination of the various layered cakes that have been built on top of it has stuck to that platform only because of the size of the market, but it is one of the most horrible APIs ever built.

To make things worse, an evolution of APIs, components, memory management contracts and patched up versions of COM have made the platform horrible.

Microsoft has injected fresh air into their platform by building and designing a new programming platform that addresses all these pains. They have incorporated many ideas from Java, and they have extended it to address new needs that developers had. They took where Java left off.

Now, the Unix platform, GNOME included has some of these problems: our APIs have been evolving. Libraries have been built by disconnected groups (PNG, JPEG, Gtk+, Xml, Bonobo, CORBA spec apis, etc) and the end result is that a developer eventually has to learn more than he wanted to in the course of developing a large application.

Ximian funded for a long time the work on the Perl bindings, and we had a lot of work going into Bonobo (more than we do today) because we believed that this would help us achieve language independence and empower scripting language developers (that is why we were so psyched about CORBA/Bonobo support all this time).

When C#, the CLR and the class libraries were launched, we looked at that, and we saw how they were solving the problem in a very nice way. At least it appealed to me and others from a purely technological standpoint. This new platform showed a lot of promise.

After much researching and debating, we decided that a couple of developers at Ximian will join me in working on a free implementation of these specifications. These people came precisely from the cross-language interoperability area: Dick Porter had been working before on ORBit and our SOAP implementation; Dietmar Maurer came from the Bonobo development world and Paolo Molaro was working on Gtk+/Gnome/Bonobo bindings for Perl. This is the original Mono developer lineup.

Evolution, Gnumeric and GNOME.

I have written and maintained many lines of code as part of my GNOME work. Ximian has developed Evolution which consists of roughly 750,000 lines of code.

Large software projects expose a set of problems that can be ignored for smaller projects. Programs that have long life times have different dynamics when it comes to memory management than smaller programs.

There is a point in your life when you realize that you have written enough destructors, and have spent enough time tracking down a memory leak, and you have spend enough time tracking down memory corruption, and you have spent enough time using low-level insecure functions, and you have implemented way too many linked lists [1]

[1] indeed, GNOME uses Glib which is a massive step up from the Unixy libc APIs.

The .NET Framework is really about productivity: even if Microsoft pushes these technologies for creating Web Services, the major benefit of these is increased programmer productivity.

Evolution took us two years to develop and at its peak had 17 engineers working on the project. I want to be able to deliver four times as many free software applications with the same resources, and I believe that this is achievable with these new technologies.

My experience so far has been positive, and I have first hands experience on the productivity benefits that these technologies bring to the table. For instance, our C# compiler is written in C#. A beautiful piece of code.

It can be argued that I could be wrong, and that these technologies are too new. But my personal experience and the experience of some of my friends with this platform has been amazing. I want to share with others this simplicity. And I want to empower developers: I want to enable a whole class of developers to create great desktop applications that integrate with GNOME.

Why is Mono related to GNOME?

It is no secret that I have been working on Mono as a new platform for software development, and it is also not a secret that I want to help the GNOME project with Mono. This has been the plan since the project was announced in July.

Mono will use Gtk+, Gnome-Db, Libart, Gnome-Print and other GNOME technologies as part of its implementation of its class libraries, because that is what my team and I are familiarized with.

So when you copy your binary from Windows that was compiled with the Visual Studio.NET and run it on your Unix platform, it will just integrate nicely with your GNOME desktop.

We are also exploring a port to MacOS X, and for that particular case, we will integrate with Aqua, not with Gtk+, but you get the idea.

GNU was based on a proprietary technology.

GNU is a free re-implementations of Unix. Linux is a re-implementation of the Unix kernel. Before the advent of Linux and the Berkeley Unix, Unix was a proprietary technology, built by ATT (which back in the day, was a monopoly).

Still, developers took what was good from Unix, and reimplemented a free version of it. Down to the Unix programming language: C (which was also invented at ATT). Even C++ was invented at ATT.

Think of Mono as following the same process: we are bringing the best technology out there to our beloved free software platform. And at the same time it serves to be a magnificent upgrade on the development platform.

Other uses of Mono

Despite my love for Mono as a tool for writing GNOME applications and giving developers new tools to write code in less time, there is an extra advantage in having a free implementation of the .NET Framework for Unix:

Mono features

Here are my top 10 features.

A. Credits

Author: Johannes Roith (johannes@jroith.de)
Author: Miguel de Icaza (miguel@ximian.com)