Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Is Mono Ready for Production?

Is Mono Ready for Production?

This item in japanese


 A question was asked on Stack Overflow having the title "Is Mono ready for prime time?" Several users responded including Miguel de Icaza, founder of the Mono project. The responses are helpful to evaluate the opportunity to deploy an application on Mono.

Miguel's response suggested two scenarios:

a) if you are porting an existing application and wondering if Mono is good enough for this task;

b) you are starting to write some new code, and you want to know if Mono is mature enough.

For the first scenario, Miguel suggests running the Mono Migration Analyzer tool, known as Moma, and proceed to production if Moma shows none or few application issues. Miguel offers some Moma analysis statistics:

According to our Moma statistics based on user submissions (this is from memory) about 50% of the applications work out of the box, about 25% require about a week worth of work (refactoring, adapting) another 15% require a serious commitment to redo chunks of your code, and the rest is just not worth bothering porting since they are so incredibly tied to Win32. At that point, either you start from zero, or a business decision will drive the effort to make your code portable, but we are talking months worth of work (at least from the reports we have).

Things look much simpler if starting a new project, according to Miguel:

If you are starting from scratch, the situation is a lot simpler, because you will only be using the APIs that are present in Mono. As long as you stay with the supported stack (which is pretty much .NET 2.0, plus all the core upgrades in 3.5 including LINQ and System.Core, plus any of the Mono cross-platform APIs) you will be fine.

Other users expressed their opinion on the questions asked. Jon Galloway said:

It's pretty good for .NET 2.0 features. Many .NET 3.x features are in process now but aren't complete.

I recently ran MoMA on SubSonic and found only one issue - a weird use of Nullable types. That's a big codebase, so the coverage there was pretty impressive.

At the language level, the Mono compiler is fully compliant with the C# 3.0 language specification.

Jonathan Holland had his take:

On the desktop side, Mono works great if you commit to using GTK#. The Windows.Forms implementation is still a little buggy (For example, TrayIcon's don't work) but it has come a long way. Besides, GTK# is a better toolkit than windows forms as it is.

On the web side, Mono has implemented enough of ASP.NET to run most sites perfectly. The difficulty here is finding a host that has mod_mono installed on apache, or doing it yourself if you have shell access to your host.

Daniel, another Stack Overflow user, pointed out:

If you want to use WPF, you are out of luck. Mono currently has no plans to implement it.

It looks like Mono is ready for production, at least for new applications or those which pass the Moma compatibility test.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Mono not ready for production - garabage collection limitations

    by Alex Black,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    For the type of application we're building Mono unfortunately doesn't seem ready for production. We were impressed with it overall, and impressed with its performance both on Windows and on EC2 machines, however, our program crashed consistenly with garbage collection errors on both Windows and linux.

    The error message is: "fatal errors in GC: too many heap sections", here is a link to someone else experiencing the problem in a slightly different way:

    The first piece of code we ran in Mono was a simple programming challenge we'd developed... The code loads about 10mb data into some data structures (e.g. HashSets), then runs 10 queries against the data. We ran the queries 100 times in order to time them and get an average.

    The code crashed around the 55th query on Windows. On linux it worked, but as soon as we moved to a bigger data set, it would crash too.

    This code is very simple, e.g. put some data into HashSets and then query those HashSets etc, all native c#, nothing unsafe, no API calls. On the Microsoft CLR it never crashes, and runs on huge data sets 1000s times just fine.

    One of our guys emailed Miguel and included the code that caused the problem, no response yet. :(

    It also seems like many other people have encountered this problem without solution - one solution has been suggested to recompile Mono with different GC settings but that just appears to increase the threshold before which it crashes.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p