views:

221

answers:

2

I'm considering writing a cross-platform desktop app, initially for Mac/Windows, but eventually for Linux as well.

Currently, I plan to structure it like so:

  • Mac UI using Cocoa/Objective C/Interface Builder
  • Windows UI using WPF
  • In future, Linux UI using GTK#
  • Business/data access layers in C# - i.e. .NET on Windows, Mono on Mac/Linux

This will obviously be fine on Windows, I'm pretty sure it'll be fine on Linux/Gnome based on the GTK# apps I've seen. Calling into Mono on the Mac, however... I figure I've got these options:

  • ObjC#
  • Dumbarton (looks kinda dead)
  • Monobjc (this would mean writing the Mac UI in C# instead of Objective C - not so keen on this)

My question: has anyone had any experience building apps in a similar fashion? Any recommendations? Am I insane?

FYI - I'm pretty fussy about desktop UIs being "at one" with their host operating systems, so I'm not interested in clunky WinForms/Java/QT solutions...

+1  A: 

For what it’s worth, I’m coming from the Mac side here., but I think my comments are universally applicable.

Given your stated desire to write applications with platform-specific UI, I think ObjC# is the only reasonable choice. There are oodles of resources on implementing Mac-side UIs in Objective-C; I think it’d be a waste of your time to try to translate all the advice you find to Monobjc, especially when you run into an API that wants you to twiddle some pointers and pass a function handle and oh no what do you do now. The only thing you can share between apps is model code; I postulate that there’s no reason to try to keep things in the same language on the presentation side unless you think you can’t or won’t be able to familiarize yourself with Objective-C.

Ben Stiglitz
Yeah, I tend to agree - I do have a bit of Objective C experience, and I'd definitely prefer to build the Mac UI in Objective C.So, does anyone out there have any experience with ObjC# or Dumbarton, i.e. calling into the Mono CLR from Objective C to access models compiled with C# (rather than the other way around, which seems to the the usage of Monobc/Cocoa#)?
Mark Beaton
+1  A: 

If anyone stumbles on this...

MonoMac looks like it will be the obvious way forward.

Mark Beaton