Hands on with Mono 2.2

 

Summary

If you are writing an application designed to work on many platforms, Mono is still an alternative but it may not be a simple matter of "recompile and deploy" in many cases.

Events

Echelon 2012
June 11 and 12, 2012

University Cultural Centre, National University of Singapore

Startup Asia Jakarta 2012
June 7 and 8, 2012

12th Floor, Annex Building, Wisma Nusantara Complex, Jl. M.H. Thamrin No. 59 Jakarta 10350, Indonesia

MMA Forum Singapore
April 23-25, 2012

Grand Hyatt Singapore

In October 2008, I wrote about the release of Mono 2.0 (an open source version of the .NET CLR and Framework that runs on many platforms including Windows, Linux, Solaris, and Mac OSX).

Since then, I've spent time with the application and, along the way, discovered that Mono is now up to version 2.2. I'm really grateful that I waited, too… the differences between 2.0 and 2.2 are pretty important.

I did all of my testing with the Mono Project's pre-made openSUSE VMware image. I tried working with three applications, all of which are Windows desktop applications. Application A and Application B are written entirely in C#, and Application C is written in VB.NET with a few classes in C#.

Applications A and B are small utility-type applications. Application A simply goes through all of the files in a directory (and its subdirectories) and attempts to open the file and read from it, and optionally tries to edit the file's properties (flipping the "read only" flag twice). Application B is a system tray application that maintains a list of directories to periodically check and make sure that the total size of the files in them are within certain boundaries. Application C is the photo mosaic software that I occasionally tinker with to demonstrate various concepts, particularly parallel processing.

At first, I tried to simply open my already compiled executables in the openSUSE GUI by double clicking the EXE files; not too surprisingly, the executables did not run. Next, I opened the Visual Studio projects in the Mono Development Environment (MDE), an IDE for working with Mono. From there, I was able to compile and run my applications.

What I should have done before that was put my applications through the Mono Migration Analyzer (MoMA). MoMA inspects an application to look for things that you should know about. Applications A and C got a clean bill of health, but Application B had one flagged function. However, Application C had a different problem: It uses the Microsoft Parallel Extensions Library (PFx).

Because PFx is still in CTP status, the Mono Project does not distribute its version of it with the default installation of Mono. One thing I noticed is that Application B had more warnings from MoMA in the 2.0 release, for a total of four. Clearly, many of the items on the "To Do" list in 2.0 were completed by the time 2.2 was re-released.

When I tried to run the applications, Application A ran flawlessly. Applications B and C, as expected, did not run. Application B compiled, but blew up when it tried to execute the line of code that MoMA flagged. Application C did not compile at all due to the missing library.

Unfortunately, what prevented Application B from working seemed to be something trivial, but it turned out to be a major hassle. I had a DataGridView control bound to a DataSet object, and the application blew up when it tried to get the enumerator from the DataViewManager component. An Internet search showed that the only results for this problem were a bug ticket submitted in 2008.

Needless to say, I was extremely displeased. Data bound controls are extraordinarily common in the .NET world. I am sure that if I was writing code for Mono to begin with, I would have expected this and not used the data bound control, but it is disappointing all the same.

For writing and debugging code, the MDE is barely adequate. The version in Mono 2.0 was one step up from a language-aware text editor; it did not support debugging at all. The version in Mono 2.2 is substantially improved. It has rudimentary visual debugging tools, but it is lacking something very important: a visual designer. Unless you don't mind writing all of the layout code by hand, you will need to use something other than MDE, which means using Visual Studio and importing your work into MDE.

Overall, I am impressed and disappointed with the Mono experience. What impresses me about it is the very existence of the project (and the tools) and just how far they have come. It is no small feat to try to redo Microsoft's work with the .NET Framework. On the other hand, it is disappointing that Mono still has such a long way to go before it is a functional equivalent (or at least a functional competitor) to Microsoft's .NET implementation.

In its current form, I feel that Mono is usable, but you would need to have staff experienced in Mono development in order to avoid the various shortcomings. If you are writing an application that is designed to work on many platforms, Mono is still an alternative, but be aware that it is not a simple matter of "recompile and deploy" in many cases.

Disclosure of industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides. He is an employee of Levit & James, Inc. in a multi-disciplinary role that combines programming, network management, and systems administration and has been blogging at TechRepublic since 2005.

Talkback

Hands on with Mono 2.2

Why did you use Mono 2.2 when 2.4 is available? Also, I use allot of data bound controls exclusively, and dont have any issue. Meaning, can you describe the problem better?

In short... The reason for mono is simple, which is to reduce costs for deployment. If I am deploying a linux / mono implementation for 25 load balanced servers, then a free (and fast) implementation is the most cost effective and reliable solution out there. Meaning, Windows is not bad, but nothing beats Linux for server side reliability, cost, and performance.

Tim Jones May 13, 2009
Add your opinion

In order to post a comment, you need to be registered. (Sign In or register below)

Post your comment

ZDNet Asia Live

China solar cell makers seek Taiwan partnerships http://t.co/p5Hh7kJD

Big data acquisitions pave way to fast, effective innovation http://t.co/hdiEfBsz via @zdnetasia

Integration, focused investments to propel Windows Phone: By Kevin Kwang , ZDNet Asia on May 23, 2012 (2 hours a... http://t.co/E7tsZbHJ

Integration, focused investments to propel Windows Phone http://t.co/u9TqjQ8C

ZDNet Asia IT Salary Benchmark 2012 http://t.co/rVwYlV7H

AsiaClassifiedToday. Integration, focused investments to propel Windows Phone - ZDNet Asia: S... http://t.co/47tdjZyG #asia #google #biz

Malaysian organizations are apathetic about information security and fail to realize they are potentially under... http://t.co/XeuvbXrs

Big data acquisitions pave way to fast, effective innovation - ZDNet Asia News http://t.co/vDZpl0lu

"Big data acquisitions pave way to fast, effective innovation" including @Vivisimo_Inc (client) in @ZDnetAsia http://t.co/yNSdPqbb

Homegrown smartphone OSes gaining favor in China: 59 Jakarta 10350, Indonesia Locally-made mobile operating syst... http://t.co/BruP98Es

RT @MDMGeek: Big data acquisitions pave way to fast, effective innovation - ZDNet Asia http://t.co/ky8YgPAn #Bigdata #analytics via @ciropuglisi

Integration, focused investments to propel Windows Phone http://t.co/6JkDa9sB

RT @AsianFashionLaw: Malaysia offers some manufacturing benefits over China http://t.co/bMquIFiX

Acquisitions in the Big Data market increasingly important to enterprises… http://t.co/Br4BkXyZ

Experience trumps content in apps monetization http://t.co/iaCY5ebX

So much as we know , MTK6575 extremely integrated frequency1GHz ARM Cortex-A9 processor, the superiority of 3G / HSPA Modem, and help the...

1 day ago by y15822137359 on 5 SaaS adoption speed bumps to avoid

I reckon your view: "CRM is strategy, not software", if a company replicating the approach uses in ERP implementation into CRM, what they...

2 days ago by wykoong on Gartner: Mobile CRM gives better ROI than social

This video will teach you about the Excel fill handle but also provide you with a workook to download... http://www.youtube.com/watch?v=...

3 days ago by TradeBrother on A quick fill handle trick for Microsoft Excel

waiting...

5 days ago by eapete on What should count in a company's market value?

Boy, you've opened a can of worms now.

Wait for the rants & raves.

5 days ago by eapete on What should count in a company's market value?

I was puzzling before this whether to replicate the success formula we executed for a financial institute, and come out with a standard s...

5 days ago by wykoong on Drop the egos, copy ideas, then innovate