In 2001, a crazy man Miguel de Icaza started the mono project. The project aimed to implement the .NET platform on UNIX machines. Unlike some crazy types, Miguel had the advantage of being very damn clever and already had an impressive track record with GNOME.
Part of what makes .NET a great platform is the ability for people to write code in multiple languages; all that code is boiled down into an intermediate language, which is then executed by the common language runtime. This has meant that coders (and code files) speaking different languages can get along happily. Having a choice of languages provides developer choice as well as allowing specialist languages to be developed for specific problem domains.
Despite Microsoft’s reputation for being more Vader than Sky Walker, they did the right thing in creating ECMA standards for C# and Common Language Infrastructure (CLI). Yesterday they went one step further, applying the community promise. The mono project has created a free, open source C# compiler and CLI virtual machine that runs on UNIX based machines including Linux, OS Xand BSD. Mono also includes an API to map parts of the .NET framework (e.g.ASP.NET, ADO.NET).
All this is very cool, but not something we have had much need for over the years. The vast majority of our projects have been web applications so they happily sit on a Windows stack; there has not been a real need for an alternative platform.
Mono might become more relevant to us soon. In August they plan to release a beta of MonoTouch. This will allow .NET apps, written in C# to be run on the iPhone. How in God’s name is that going to work? They are working on a static compiler to convert that intermediate language code into a native code. This means that you can write and distribute an iPhone app, coded in C# written on a Windows machine.
The viability of this will depend on whether MonoTouch can offer full and timely support for the iPhone API. The track record of Mono keeping up with C#’s evolution is impressive (currently it has complete support for C# 3.0; support for C# 4.0 is in the roadmap). Mono seems to be crossing the chasm and becoming a legitimate platform in the mainstream .NET community. MonoTouch will have access to a strong community base to aid adoption and support.
There are some mumblings that Mono is sort of running on Android. I don’t think this has gotten much further than a few broken hello world apps but a similar approach would seem feasible.
The implications of all this are wider than just making life easier for a humble .NET developer (although that’s a magnificent outcome). It will mean that we can create iPhone apps which directly share their brain code with a web application. The learning curve for a .NET developer will also be flattened, so development will be more efficient.
The devil is always in the detail, and this has a long way to go before it will be a proven option, but my fingers are crossed.