Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

I've ported an app from Winforms to Gtk-Sharp.

At first, I ran with the Mono reimplementation of Winforms on Linux. That didn't work very well. There are a lot of little incompatibilities, like differences in how keystrokes are translated, and very buggy text boxes.

So I reimplemented the UI in Gtk-Sharp. That was mostly a matter of translating existing Gtk documentation to the OO API presented by the C# wrapper. I could write this in Visual Studio and run using Gtk on Windows to test; Mono itself wasn't actually needed here.

I then ran the app using Mono on Windows. Once all the DLLs were in the right places, it mostly just worked. Running it on Linux - specifically, Ubuntu 12.04 LTS - was a little trickier, as Ubuntu has split out many of the different assemblies into separate packages, and you have to grovel around a bit to get what you want, if you don't want everything. But again, it mostly just worked.

Compiling using Mono took a little bit of figuring out - mainly, finding out I had to use dmcs rather than mcs or gmcs to enable the right language features. But again, once the right assemblies were referenced on the command line, it mostly just worked.

Writing a cross-platform app in Mono? I wouldn't really try that. Having a separate UI layer for each platform gets you a much better experience. Gtk programming itself is extremely clunky compared to Winforms, which itself is quite clunky - albeit in different dimensions - compared either with Delphi's VCL or WPF. But it was the only way I could see to go to get a reasonable experience on Linux.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: