[Mono-osx] General cross-platform issues and considerations

Andrew Brehm ajbrehm at gmail.com
Wed Oct 14 06:49:59 EDT 2009


I have been working with Delphi Prism for a while now and can recommend it to
anyone who wants to do Mac development in .NET. Any criticism below is not
to be understood as criticism of Delphi Prism. It's just the tool I use
because I think it is the best for the job.

Between Windows Forms, Windows Presentation Foundation (WPF), Monobjc (Cocoa
bindings), and Gtk# we have ample GUI toolkits to choose from, but this also
means that the ability of .NET/Mono binaries to run unchanged on any
platform is somewhat diminished, to say the least. I found that Mono's
implementation of Windows Forms on Mac OS and Linux does not support
right-to-left text. I haven't checked with Gtk#. (In fact I have never
really looked at Gtk#.)

So currently the best solution for cross-platform .NET development is to
create separate binaries for each platform which, as I said, diminished the
advantage of being able to run the same binary on any target platform.

One year ago I managed to create a test program that would check whether
it's running on Windows or Mac OS and then use a Windows Forms or a Cocoa#
(back then) GUI depending on the result. A single binary worked on both
systems again, with decent results on both targets too. But this
configuration is not easily supported by IDEs or build scripts and doesn't
play well with Apple's (excellent) concept of bundles.

But then even checking which OS one is running on is difficult since Mono
reports UNIX when running on Mac OS (at least it did the last time I
checked).

How is the Gtk# implementation on Mac OS? Is it better than Windows Forms?
Would Gtk# be a good solution for a single binary for all three targets? (On
Windows, can I just include Gtk# DLLs or does the user have to install Mono
or Gtk# himself?)

I like Monobjc and the Cocoa GUI it makes available to .NET programs. But
porting the GUI part of an app to Monobjc is (doable but) an effort that
seems ironic considering .NET/Mono is inherently a cross-platform
development environment.

So what's the best way to go for cross-platform apps? Three separate GUIs?
Gtk# for all? And if the first, should it be a single binary checking the OS
and then using the right GUI or should it be separate binaries?
-- 
View this message in context: http://www.nabble.com/General-cross-platform-issues-and-considerations-tp25888867p25888867.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list