Mono on OS X: first (positive) impressions

Mono

Work on my Cocoa SOAP client framework has been postponed as I’ve found a shiny new toy to play with… At work, my team has sorta inherited a web app developed using VB/ASP/VBScript and a little C#… and of course, being a Learner who doesn’t know squat about MS development… I’m attracted like a moth to flame. For a couple months now, I’ve been flirting with a my VBScript in a Nutshell book in an attempt to get a small sense what the MS development world is all about.

As I mentioned, Santa brought a few C# books too… So on the flight back to San Antonio from New Orleans, I managed to get through the non-reference sections of C# in a Nutshell (Did I mention I like the ‘In a Nutshell’ series?). Perfect timing considering all the recent controversy regarding C# vs Objective-C and .NET vs Cocoa. I’m looking forward to learning more and perhaps porting a few of my Cocoa apps over to C# or VB.NET in a quest to compare the two.

So I have no problem learning some MS development tools/languages/frameworks… but I’d like to minimize my time sitting in front of Windows PC. What I really need is a .NET development environment that I can run on my PowerBooks ( ;) ) while I learn C# and the FCL (.NET Framework Class Library). Then, I can move to my PC (shudder) when it’s time to start doing some GUI-building in Visual Studio.

So, I checked out Mono… the Novell-backed, portable, open implementation of .NET (that runs on OS X).

Mono is fabulous.

Mono allows you to compile and run C# programs that access a large (and growing) subset of the .NET class library on your Mac. Cool! This is a great way to learn about C# and .NET (a formidable and modern language/development platform regardless of your OS preferences) from the comfort of Tiger. Installation is dead simple (installer package), and everything JUST WORKS. Great work Mono guys! Many thanks!

I’ve also compiled and run a few JScript.NET programs… JScript.NET is a really cool superset of JavaScript that has added classes, enums, namespaces, static typing and more. Unfortunately, it looks like you can’t access the .NET class library from Mono’s JScript implementation yet… but it’s listed on the Mono site as a ‘Future Plan’. As a JavaScript junkie always looking for ways to use JavaScript in environments for which it was never intended, I’m looking forward to that. Once they add class library access to JScript, this will actually surpass Rhino in coolness.

I’ve also tried creating a few trivial Cocoa# apps — which are basically native Cocoa apps written in C# — with varying success. Cocoa# appears to be associated with Mono somehow, but not quite sure how. After doing a lot of Swing programming in ‘04 and early ‘05, and then switching to ObjC/Cocoa, I’m really sour on the idea of developing GUI apps using a non-native toolkit… regardless of platform/language. Cocoa blows Swing so far out of the water (and I was NOT a Swing hater keep in mind), that I’ve pretty much vowed to use the native toolkit for GUI development on whatever platform for which I happen to be developing. Even if it means learning a new language/framework.

So therefore… If I’m developing Mac OS X apps, I’m using Cocoa/ObjC (and loving it). And if I’m developing windows apps, I’m using C#/.NET or VB.NET.

Still… bravo to the Cocoa# developers for pushing the envelope. Maybe Apple will take notice, and get started on a CLR of their own. Everyone has their own language preferences… and although I adore Objective-C, I’ve heard rumors that some people out there actually dislike it (wha???). If you’re one of those people, I suppose Cocoa# might offer a nice alternative for Cocoa development.

If you’re a Mac developer, and haven’t checked out Mono yet… you don’t know what you’re missing!


About this entry