Curiosity got the best of me, It really did. I had listened to Hanselminutes “State of the Mono Project” and I had to try it. I have a current version of Mono for windows installed on my work PC, but I had to try it on a Mac. My Beautiful Wife has a Mac and has for a long time. Truthfully I am a huge fan of Apple’s hardware and software. I think that iTunes is one of the best pieces of software the PC has ever seen. Writing Mac OS X on top of BSD was simply brilliant in my opinion. I’ve always wanted to write software for the Mac. However I work at a Microsoft shop, so there hasn’t been any really need or opportunity for me to write software for the Mac. However now with the Mono Project and .NET the idea that I can write something on the Mac, compile it to IL (Intermediate Language) and it can run in Windows is exciting. This is exciting in two ways, first, who doesn’t want to write code in a language they are very comfortable with (C# for me) that will run on just about any OS. Secondly, like I said before, I am a big fan of Mac stuff, and I would love to be able to work on a Mac, even though I work in a Microsoft shop. This idea came to me when I was watching a screencast of C# code being ran in both Mono and .NET interchangeable. Well if the frameworks are that interchangeable I should be able to write code on the Mac and have it run in Windows or Linux. Although after I did some research I found I wasn’t the only one that has had this idea. Good that means I won’t be in undiscovered county alone. Since most of my work is done in ASP.NET and C#, these are the two components of .NET/Mono that I am concerned about.
Coding on a MacIt’s been a long time since I’ve written anything on a Mac. The last thing I wrote on a Mac was a web site. So HTML isn’t nearly as complicated as compiled code. That being said most of the code I write is in Visual Studio .NET. This is a pretty complete IDE, that has a designer and a code editor and includes intellisense. I am so addicted to using intellisense that it is something I feel I need for writing all code. Of course we use Windows XP SP2 at work, so these are the environments I am use everyday, so that is what becomes my benchmarks so to speak.
As with any new venture I did a little research. Of course Mono Project’s web site was my first stop. After a little bit of reading I downloaded the Mono Framework for Mac OS X and installed it. It gets installed in /Library/Frameworks/Mono, this is something you’ll need to know a little later. Also I always like to know where things get installed. The other thing gets installed is Cocoa# (Cocoa-Sharp). Cocoa, is the UI for Mac OS X, so Cocoa# lets your Mono/C# code use Cocoa for the UI instead of GTK. While this isn’t as completely ambiguous as using GTK for a “windows” application, it is nice to be able to use the Interface Builder and XCode. I’m installed this stuff on my Wife's computer, so I need to be careful about what I am installing and how hardcore it is. That is why I haven’t installed MonoDevelop yet. I’ll need to upgrade her computer to Tiger before I start down that road.
My ConclusionsFirst, man I need to get a Mac. I really enjoyed coding on it, and I love the OS. As far as some of the coding go, it would of been really nice to have had everything completely update, because that is what the frameworks, really require. The fact it was an older version of Xcode kept me from installing MonoDevelop, and I am sure that would of changed the experience quite a bit. I also ran in to some confusion as to use the “Apple.Foundation” and “Apple.AppKit” namespaces verses the “Cocoa” namespace when interfacing with the “nib” file that Interface Builder produces. Again however, I believe that if I had had the current version of XCode and installed MonoDevelop, it wouldn’t of been an issue. So my plans for the future? See about getting a Mac Mini, or iBook and start coding.
Remember Me