[Haskell-cafe] Re: Which windowing toolkit to use?

GüŸnther Schmidt gue.schmidt at web.de
Wed Jun 17 16:46:40 EDT 2009


Hi Patai,

there is one other alternative to gtk2hs and wxhaskell: .NET Forms

It is accessable through Sigbjorn Finne's hs-dotnet package.

I am right now *starting* to use it myself, so just consider it an option.

Both of the others are quite usable, wxhaskell has very easy to use 
layouts and looks fine on windows (native look) but lacks any support 
for MVC, ie. a click on a list will only give you back which position 
was clicked and it's up to you what "object" that should map to.

Gtk2hs also has layouts, IMO not as nice as wxhaskell, does not look as 
nice on XP, (no true native look and feel), but does have support for mvc.

Both (gtk2hs and wxhaskell) have a "multithreading" problem, cause it's 
not possible to call gui code outside the main gui event loop, and 
believe me, the wish for that does occur, so it's kinda hard to code a 
gui that is not sluggish with long computations.

With the threading part, .NET Forms can handle that much easier.

Günther



Patai Gergely schrieb:
> Hi all,
> 
> I intend to start coding the UI of the heap profiling toolkit I'm
> working on [1] soon. I'd be happy to get some advice on choosing the
> right windowing toolkit for this task. The main requirements are:
> 
> - portability and native look & feel if possible
> - easy to distribute executables under Windows
> - relatively slow code rot
> - sane interface that doesn't need wild workarounds even if what I'm
> doing is not trivial or elementary
> - trouble-free source installation in case someone wants to contribute
> 
> As I see, at the moment there's no serious alternative besides GTK and
> wx, so my question is which do you think is better suited to this task?
> I have absolutely no development experience with GTK, and while I used a
> bit of wx in the past (in C++), I'm not really familiar with it either,
> especially not the Haskell bindings. I noticed that installing the wx
> binding with user rights doesn't seem to work directly from hackage
> (doesn't pass --user to ghc-pkg?), but it looks like a problem that can
> be solved with some hand editing. I'm a bit more afraid of setting up a
> development environment under Windows; is there any major pain involved
> with either of these libraries if I use MinGW?
> 
> And how about their interface? Is there any significant difference? I'd
> especially like to hear the opinion of someone who's reasonably familiar
> with both.
> 
> Thanks,
> 
> Gergely
> 
> [1] http://code.google.com/p/hp2any/
> 




More information about the Haskell-Cafe mailing list