Balazs Fejes has posted an article on his experiments in Mono, which has got a Java slant (seeing as that’s his day job).
In it, he makes a few glaring mistakes, but also raises a very good point.
Dealing with mistakes first – he’s trying to combine Mono on Win32 with Visual C# Express which is a) still in beta and b) based on .NET 2.0 (which Mono does not yet fully implement). This is a recipe for headaches. Whilst you can do Mono development with Visual Studio, I would recommend using SharpDevelop which is a) free, b) supports Mono and c) was the basis for MonoDevelop.
I know, I know – Mono and .NET are supposed to be interchangeable and they are, but Visual Studio and Mono have a very different way of doing things in terms of builds etc. If you want to target .NET and support Mono, by all means use VS, but if you want to target Mono and support .NET you need to be a bit more clever about it.
Building Bridges
This segues nicely into a pet rant of mine – cross platform (or even just distro) compilation.
Mono is supposed to cross platform (and cross framework), yet building applications targetted for Linux on Win32 is pretty much no go. Ignoring the dependencies for a moment, most Mono-based Linux apps use GNU Make and autotools for creating builds. This is fine on Linux, but on Win32 you either need find ports or rely on something like Cygwin to provide them. Even then, you’ve got the rest of the dependencies to worry about.
Instead of falling into the old ./configure; make; make install trap, why didn’t Mono embrace NAnt or somthing like it. Then as long as you had Mono and NAnt, you could build everything else. You see this in other languages/frameworks – Perl has CPAN (and PPM if you’re using ActiveState), Ruby has RubyGems, PHP has Perl etc. With those, once you’ve got the language and the tool (which typically comes with it) you can get (pretty much) whatever you need. With Mono you have to get this and build it, then that and build it, and then the other and build it ad infinitum.
Availability
From the article:
Perhaps the one thing that baffled me most is that the Mono framework is not fully embraced by the Linux ecosystem. When I tried my application with the latest Ubuntu LiveCD, I realised that not only Mono was not in the default configuration, I could not even install a consistent set of components for Mono and GtkSharp.
How very true. It doesn’t matter how good Mono is if people can’t use it. Sure use developers can (and will) compile it ourselves, but how can we (and the developers of Mono) expect people to use our applications if a) they can’t easily get Mono or worse b) only get an old version of Mono.