Mono Moonlight and Silverlight – Mono better than the original?

written by Jason Short on Thursday, June 21 2007

The Mono project has announced a plan to produce a Silverlight alternative called Moonlight.  I am pretty excited about it.  But first, a little background about Mono.

Mono support for VistaDB 3

Run your Dot Net app under Linux / Unix.  This is one of the coolest features of VistaDB 3 (to me).  The fact that you can run your application unchanged on Mono (Linux / FreeBSD / MacOS) is a BIG DEAL.  The ONLY reason you can do that is because we are 100% managed code. 

First, what is The Mono Project?  Only the coolest thing since Dot Net. (Other than VistaDB of course). I started using Mono back in 2004 with some of the really early builds.  I immediately saw the amazing potential of such a technology.  At the time we were writing a distributed crawling system for our Emerald Spam Shield Stop and Dig system.  We had just committed to using Dot Net 1.1 and were moving ahead, even though it would mean blocking us from running on FreeBSD (my favorite Unix flavor).  I was sort of bummed because the previous generation of web scanner was written in C++ and would run under FreeBSD or Windows.  But we were redesigning the engine for a totally new purpose of scanning and classifying pages with complex rule sets.  We were also redesigning our Spam Engine and wanted to use fully managed code for the huge benefits of buffer overruns and the attack footprint of the application. When I heard about the project I immediately downloaded it and spent a weekend getting it to build.  I was a little heartbroken because almost nothing worked.  About 25 of the API functions we needed were still missing from the build.  Over the next few months I followed the progress and would test each new build, I even submitted some patches to the project in the early days.

Fast forward about 6 months.  Novell stepped up and became the benefactor to the project, and put more developers on it as well.  Momentum started to build.  I was pleasantly surprised that the 1.0 release actually ran our command line web crawlers, classification engines, and indexers without modification.  We have been running with two FreeBSD servers as huge 500GB caches since 2005.  They crawl, analyze and index content through the C# code we wrote on Windows.  In many cases we found the GC in Mono outperformed the GC in the Microsoft assemblies.  It was amazing for us to find little things that were different, but our code all worked.  We didn’t have to worry about it for the most part.  You do have to pay attention to use the Path.DirectorySeparatorChar rather than hard coding a \ or / in your code, but that is pretty easy stuff to find and correct (and it is a good coding practice anyway).

Enter Silverlight and the (non) support for the CLR

To be honest I have been disappointed at Microsoft’s support for the CLR in Silverlight.  I was hoping it would lead to a cross platform Winforms and CLR stack for Unix and Mac OS supported by Microsoft.  I guess that was wishing too much, eh? So the Mono Project has decided to step in and release a Silverlight like system called Mono Moonlight. But, this is the coolest part:  It will host the Mono 2.1 CLR!  This means that they can choose to implement a System.Data namespace if they want.  From what I have read it appears that they also think a full CLR running in a browser can be very safe.  You are already typesafe, and you have Security attributes in place to determine what to allow and deny, you can deny access to specific Methods in the CLR with security, etc, etc.  So why NOT put the full CLR in a plugin and let the user tell you what they want the controls to do?  If a user wants to allow isolated storage access, they should be allowed to do so.  Flash already lets users specify how much storage to allow Flash SWF’s to use (or none).

Don’t take my word for it

Please, go take a look at the Mono Project (and Mono Moonlight) and read up.  At a minimum you will come away with a deeper understanding of how the CLR works (I know I have learned a lot from Mono), and you might just find a new platform to deploy your existing apps or services.

More MONO articles and sample coming

We will be adding more information and samples for Mono in time.  Right now I run Mono 1.2.x on a Mac OS X machine.  I would like to write about the development tools and process for others to read a well.

[EDIT - Now you can use VistaDB Express on Mono as well]

Similar Posts

  1. The GC does not solve all memory leaks
  2. Looking ahead to 2008, and back at 2007
  3. devLINK 2007 – post show analysis

Comments are closed

Options:

Size

Colors