A Leauki's Writings
Published on February 21, 2008 By Leauki In Macintosh

A tutorial:



Background info:

The Microsoft .NET framework is really a virtual machine plus framework very much like Java. .NET binaries (assemblies) are nominally cross-platform and should, in theory, run on any platform assuming that the .NET runtime software is installed.

.NET is also a standardized platform, with Microsoft .NET being but one implementation.

Microsoft provide their .NET runtime for most versions of Windows and an experimental implementation for Windows, Mac OS X (PowerPC), and FreeBSD (Intel). The experimental implementation does not support GUI-based programs.

Novell and the FSF have their own implementations of the .NET runtime with Novell's being pretty much on par with Microsoft's 2.0 version.

Novell's implementation, Mono (Spanish for "monkey") supports console-based programs as well as Windows Forms (GUI) applications. Mono also offers bindings to GTK+ (called GTK#) which allows for native-looking GUIs on UNIX and Linux. Both Novell's Windows Forms and GTK# work on all three platforms (Windows, Mac OS X, and UNIX including Linux).

Of course, on Mac OS X neither Windows Forms nor GT# are native, hence there is a third GUI toolkit, called Cocoa#, which is a binding for .NET to Cocoa, Mac OS X's native API (one of them, Carbon is the other one).

The tutorial shows how to port a Windows Forms .NET application to Cocoa#.

Note that the original Windows Forms assembly (.exe file) already runs on both Windows and Mac OS X (and UNIX and Linux). But it doesn't look native, hence it is preferable to replace the Windows GUI with a Cocoa GUI.

Cocoa# is by no means complete (although the rest of Mono really is), but it is being worked on at the moment.


Mono runtime and MonoDevelop IDE for Mac OS X (PowerPC and Intel):


Mono runtime and MonoDevelop IDE for Windows (32 bit Intel):


Mono runtime and MonoDevelop IDE for Linux:


Mono runtime for Solaris (SPARC):





No one has commented on this article. Be the first!