Development General

Excursions in Mono and Generics…

Shortly after starting at the new company I found out
that a lot of our clients like Mac‘s so we need to find some way to make the new version of our
product work on Mac‘s.  Of course the initial solution was to make it web
based, but that causes some hassles with interactivity… I know Ajax/atlas is cool but for lots of
data entry the web just didn’t seem to quite do it quite as nicely as was
required… so our next option started becoming either Java or Mono.   And since we
don’t have any real java experience here we decided to take a look at Mono.

I was pretty excited when I found out that it does Generics and Nullable
types, and some tests showed that assemblies built in VS.Net 2005 that used
Generics and Nullable types worked quite nicely in Mono.

Unforutnately I’ve had some issues with the UI side of things.  Mono
kinda (98%) supports System.Windows.Forms v1.1 and if I design a UI in
VS.Net 2005 there seems to be no way to make it use .Net v1.1 components. 
So I get a bunch of designer code that isn’t 1.1 compatable, as well as a whole
bunch of controls that aren’t in v1.1.  Apparently Mono has a few of these
controls already in testing, but they’re not planning on supporting System
Windows Forms (SWF) v2.0 until the end of 2006, so its not a good idea for an
application that I need to build now.

So I’ve tried to use VS.Net 2003 and while that builds the UI’s nicely, it
doesn’t recognise the Generics and Nullable types in my v2.0 assemblies.  I
thought I’d try out SharpDevelop v1 and v2 (which isn’t yet released). 
SharpDevelop v1 bombs out when I try to reference a .Net v2.0 based assembly,
and SharpDevelop v2 has two problems:
1. Its not very stable (which is to be
expected from a pre-alpha product)
2. It seems to suffer from the same
problem as VS.Net 2005.

Next I tried out MonoDevelop. I could only get that working on Linux,
which I managed thanks to Ubuntu and Virtual PC, and it doesn’t seem to like SWF
at all – it only seems to build GTK# based interfaces. 

I even tried X-Develop, and didn’t have much joy.

From what I’ve seen there seems to be no IDE that will build a Mono SWF (aka
MWF) UI while using some of the .Net v2.0 features that mono
supports.  So my next plan of action is to dumb down my business logic
so that it only uses .Net v1.1 features so that I can build a UI using either
VS.Net 2003 or SharpDevelop v1.

At this moment I’m super impressed with how Mono performs, I’m just
struggling to find tools and controls (that’s another story/blog post – coming
soon) that will work easily.

Leave a Reply

Your email address will not be published. Required fields are marked *