Why I Avoid .NET/Mono
EDIT (5 Feb 2008): As indicated in the comments below, some of my reasoning here isn’t completely accurate. Apparently Windows Forms runs under Mono now, albeit not some of the newest stuff. A lot of people seem to be angry at the “Watch your backs, it’s Microsoft and they might sue” thing — I think it’s definitely something to keep in mind if you’re making a living doing Mono development but probably not too much to worry about for anything else.
So, Eddie at Innova has been touting the awesomeness of C# and the Common Language Runtime for a while — how it’s so awesome that he can write code under Mono and run it under Windows using Microsoft’s .NET runtime. And, he can take advantage of all of the .NET libraries! And if C# is the problem (which he explains is a fantastic language) then why not use IronPython or IronRuby or some such?
On the surface, this sounds like the panacea the industry’s been looking for since Sun adopted the “Write Once, Run Anywhere” slogan for Java. Certainly seems enticing — writing in whatever language you want from the set of languages that can compile down to IL, running on any platform that’s got a compatible runtime.
Except I just don’t like it.
Before we go further, understand that I’m not saying .NET isn’t the best way to go if you’re writing software that’s only ever going to run on Windows. I personally don’t like Windows, and have no desire to write software for that platform, but that has nothing to do with this debate. One more time, with emphasis: .NET is an excellent tool for writing Windows-only software.
If writing Windows software is a solution best solved by .NET, and if there’s a free-software implementation of the .NET CLR in Mono, then why doesn’t it follow that .NET is a fine solution for cross-platform software development?
I’ve got several complaints, first being that unless you’re using the common subset of features between Mono and .NET you can’t write cross-platform code. If I write a Windows Forms application, then that’s the end of it right there. You absolutely cannot run that under Mono. Now, if we start with something like GTK#, then we avoid this problem, but there are similar pitfalls for things like ADO.NET and ASP.NET.
Somewhat related to that is my second worry: Mono is always going to lag behind Microsoft’s .NET implementation. Sure, the whole thing is a published standard, but there’s still going to be a period of “This works in .NET latest but not Mono.” Again, I’m not too familiar with Mono’s past, so I can’t say with absolute certainty that this has happened or will happen, but I’d be shocked if there wasn’t a level of disconnect.
Finally, I’m just not enthused about promoting technology that Microsoft made popular. Look what happened to the browser market when IE6 was the best browser on the market — Microsoft disbanded the IE team and failed to keep up with standards. IE6 is still used by the majority of web surfers and it’s the bane of every reasonable web developer. Look at the state of operating systems. Microsoft made Windows the de-facto PC operating system and through a lack of innovation and anticompetitive business practices has set the mainstream PC OS industry back a decade.
If any of my reasons are off, feel free to let me know in the comments.
Share This
February 4th, 2008 at 12:40 am
Mono is a moving target.
I totally agree with your point that “.NET is an excellent tool for writing Windows-only software.” as it was designed to make Windows programming a lot easier.
I disagree with starting with GTK# though. GTK for Win32 is more of an afterthought, see: http://www.gimp.org/~tml/gimp/win32/why.html and you’re pretty much stuck with a “it works but no guarantees” library. It’s pretty much the same scenario with System.Windows.Forms under Mono. In the end, you’re stuck with one or the other (System.Windows.Forms) or you’re forced to maintain two separate code bases for both widget libraries.
I don’t think Mono lagging behind the latest .NET is a problem though. Most of the 1.x and 2.x stuff is already implemented in Mono, so unless your program uses the latest and greatest assemblies (or SWF) then it’s safe to say your program should run under Mono.
Lastly, I think you missed the fact that despite Mono being based off of ECMA standards there’s a catch: Software patents and that there is nothing in the ECMA that prevents Microsoft from enforcing those patents. My biggest worry is that the sweetheart deal between Novell and Microsoft will come to a bitter end and all Mono users will be seeking litigation protection. This last thought has kept me off .NET and Mono now and for the foreseeable future.
February 4th, 2008 at 12:52 am
Just to follow up on that last bit concerning litigation when Microsoft decides to enforce their software patents:
http://web.archive.org/web/20030424174805/http://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html
It’s a post from Jim Miller, one of the inventors listed in the patent claim found here.
While this is all very reassuring, it is still no guarantee of safety. Agreements between companies (especially if one or two of those have a history of going back on previous deals) cannot be relied upon to protect you.
February 4th, 2008 at 4:05 am
FACT: Windows Forms 1.1 , 100% compatible with linux mono. Windows Forms 2.0 mostly runs on mono linux. Examples ? nunit-gui, NClass, Reflector Paint.NET and many others
FACT: ASP.NET 2.0 is 100% in mono and you can develop professional commercial applications (which I do)
FACT: ADO.NET is 99% in mono
FACT: Mono is lagging behind .NET but the gap is relatively small. Mono has Full C# 3.0 stack including LINQ , it has full asp.net ajax , control panel and even asp.net futures running. IT has WCF and WF mostly implemented
So please LEARN THE FACTS before spreading FUD
February 4th, 2008 at 6:05 am
There are some great Windows Forms applications written for Mono - which now runs with a ‘native’ driver for Mac OS.
Checkout these screenshots of ‘Plastic’ (a sourcecode control system) running under Mono on Linux and Mac OS - fantastic eye candy:
http://tirania.org/blog/archive/2008/Jan-03-1.html
Michael Foord
February 4th, 2008 at 8:19 am
False. What does not work is P/Invoke.
You absolutely can. Applications that were not targetted to run on Mono can run on Mono today. Including really complicated things like Paint.Net.
Wrong again. Also, Gtk# does not really need ASP.NET.
Yes and no. It may lag on some features, but move ahead of .Net in other features.
I would expect more from a zealot. Something like “Microsoft stole Java and called it .Net” (which is sort of true and the best form of flattery). A better argument might be about the libraries, tool maturity and existing bindings in Java. JSS is a huge asset to Java for example. MonoDevelop is years behind JBuilder and will be for a while. Of course, there is nothing inherently better in Java (or in being backed by Sun versus Novell).
I admit to being a Mono proponent, but only because I am a C# and CLR enthusiast. The fact that I could take my skills from Windows to Linux and get right to work was invaluable for me. My learning curve is with GTK# and not with the language and libraries. There are good reasons not to use .Net, but I did not see them in your post. Happy programming in whatever language/VM you choose. I recommend targeting Plan 9. It is the successor to Unix developed by the same folks that brought us C and Unix. Parrot is a good second choice as it copies the register versus stack based Plan 9 VM though it suffers from much worse immaturity than Mono and not being the first will most likely bother you.
February 4th, 2008 at 9:18 am
Wow. You’re about 2-3 years behind the times when it comes to Mono. You can run Windows.Forms, ADO.NET, and ASP.NET applications on Mono. Sure, some things won’t work, but many of them will.
You’re right in that there is a disconnect between Microsoft’s implementation and Mono’s. However, take something like Silverlight and the DLR. Due to the licensing, the DLR can run on top of Mono, without modification, on any platform. Within a week of the announcement of silverlight (and the DLR), the Mono people had a working prototype of their version, Moonlight, and it’s come leaps and bounds since then.
I could go on and on. Mono has done some amazing things, not just with .NET, but creating their own feature set as well. There are several things that are completely unique to Mono. For example, if you are a big fan of reflection, you should try out Cecil, which blows Reflection.Emit out of the water.
Besides, the first time you write an app in visual studio, compile it, transfer the assembly to a linux box and run it without modification - that’s just fuckin’ cool. Or if you write it in Linux, compile it on OS X, and run it on windows - ditto. You should try it sometime!
I would go so far as to say the only thing that has really been worth anything coming from microsoft in the last decade or so has been .NET.
February 4th, 2008 at 9:26 am
Thanks for the enlightening replies! Sure, I guess I was behind when I mentioned that certain things don’t work in Linux — I assumed (and my breathtaking two seconds of research backed) that these things were still the case.
To be fair, I don’t consider myself a zealot. Not liking Microsoft products and wanting to distance myself from that platform doesn’t make me a zealot. Being cautious about hopping in bed with technologies that may be open to litigation from a gigantic company known for it’s dirty business practices is not zealotry.
But there are a lot of interesting points here. I don’t think I’ll pick up Mono for any of my day-to-day coding needs, but I might give it a shot to see how things go.
Also, @Onur: I realize we’re on the intertuberweb and tone is hard to convey, but that seemed harsh. Calm down, nobody’s spreading FUD.
February 4th, 2008 at 2:49 pm
As far as the legal question goes: 1. Sun and IBM are just as bad as Microsoft. Red Hat and Novell would also be bullies if they just had the size… Nobody pays nice. 2. C# and the CLR are standards. See 3. Gtk# is build on top of Gtk+ which was not developed by Microsoft. 4. Being more afraid of a language or technology because it was developed by Microsoft is certainly prejudice. You would have to only use hardware and software you build yourself to limit your exposure. And even then, we live in a litigious society and you could still get stuck. Is the risk really that high? From what I read, Sun was worse. 5. One of the problems with Mono is that some of the enterprise distros (Red Hat should be called out here) are WAY behind. Make sure you get version 1.9 or greater which your distro may not ship with. 6. We are calm. We don’t appreciate FUD. By perpetuating the myth that Mono is not mature enough to be used by professionals, you are hindering the adoption of a very useful technology.
February 4th, 2008 at 3:23 pm
@Vlad:
Wait, what?
Let me address your points as they come up.
Sure, but I’m not talking about anyone else. I’m talking specifically about Microsoft. Maybe it’s a non-issue, but I don’t trust them.
Yes they are. I don’t have any beef there. But there are things developed on top of the CLR (ASP.NET for instance) that aren’t covered by that umbrella. Furthermore, when Microsoft and Novell’s deal runs out then all bets are off. Again, I’m not saying this is a real issue, but it’s definitely something to be conscious of.
…yeah? That was my point. It doesn’t matter, I was misinformed about the state of Windows Forms on Mono, so I suppose you could do a Windows Forms app and compile it seamlessly on Linux.
I didn’t say I wasn’t prejudiced. I said I wasn’t a zealot. There is an ocean of difference there. I don’t know what you mean about “only [using] hardware and software you build yourself to limit your exposure.” Microsoft doesn’t build hardware, and I’m not using a single bit of Microsoft software right now, and I didn’t write a bit of it. I’m not saying Mono users are all going to be sued one day, but I’m just saying that if I develop something in Ruby or Python or what have you I don’t ever have to worry that Microsoft will some day decide they no longer like the Python runtime and put the kibosh on it. Mono users right now don’t have to worry a bit about that thanks to Novell’s agreement with MS, but that will run out one day. So no, the risk isn’t high.
That’s something to be aware of, for sure.
I’m flattered that you think anything I do here perpetuates a myth, or is FUD. I never said Mono wasn’t useful. I’m willing to admit that parts of the above article are inaccurate, but that’s why I closed with “If any of my reasons are off, feel free to let me know in the comments.” — this was to encourage feedback if I was indeed incorrect. Nor did I say it shouldn’t be used by professionals. Where are you getting these from?
February 4th, 2008 at 3:33 pm
To Jon:
Sorry for my aggressiveness. I am just sick of people who is bashing mono unfairly. I will carry on my career on mono (and not ms.net if not cumpolsory). So I want mono to gain a large user base. Sure it is not perfect that we can critisize .But unfair comments bring up nothing. Sorry again
February 4th, 2008 at 3:36 pm
@Onur:
Fair enough. My intent wasn’t to bash Mono, just to explain why I don’t use it. If Mono makes you happy, or makes you money, or both, then more power to you. It seems my post here did come off as inflammatory, I didn’t mean for it to be a whole “I hate Mono or .NET” thing, but it seems people take it that way. No hard feelings.
February 5th, 2008 at 9:18 am
OK, I probably overreacted too. Someone in my office was using your comments as evidence that Mono was this and that. I got defensive and took it out on you. The title (coupled with weak reasons) sounds a lot like “I hate Mono or .Net”. I realize it does not say it, but people will hear what they hear. Anyway… Peace out.
February 5th, 2008 at 9:46 am
@Vlad:
Thanks, although I’m more impressed to know someone was using my specious reasoning as basis for an argument!