Re: [Haskell-cafe] Building GUIs for Haskell programs
Can anyone attest to the sense (or otherwise) of the following programming pattern - program all back end stuff in Haskell and compile to library - program all GUI stuff in *insert imperative language of choice and link to the library for back end functionality It seems the ultimate decoupling of interface from logic. Matt On 12/01/2005, at 2:33 PM, Duncan Coutts wrote: On Tue, 2005-01-11 at 21:05 +0100, Dmitri Pissarenko wrote: Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? wxHaskell is good for building portable GUIs. It has an extensive selection of widgets and has a good API. gtk2hs is good for building GUIs that target the Linux/Gtk/Gnome platform (though it is portable to Windows). It is also an extensive toolkit. It allows you to visually design GUIs with the Glade user interface builder. The API style is currently more low level than that of wxHaskell or FLTK. There is also a binding to FLTK which is a much simpler, more light weight portable graphics toolkit. As far as I know, these are the only actively maintained GUI toolkits for Haskell at the moment. Duncan (gtk2hs developer) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
On 12 Jan 2005, at 11:10, Matthew Roberts wrote: Can anyone attest to the sense (or otherwise) of the following programming pattern - program all back end stuff in Haskell and compile to library - program all GUI stuff in *insert imperative language of choice and link to the library for back end functionality It seems the ultimate decoupling of interface from logic. This is roughly how I handled a recent project, in a mixture of ML and Java. Frankly I regret it: if I did it again, I would do the whole thing in ML (or perhaps haskell). Once you get used to languages with real higher-order features and powerful abstraction notions, it is a real pain reverting to a language like Java (or C or C++ or perl or...) ML, despite being thought of as a primarily functional language, is still (IMO, of course) a 'better' imperative language than Java, because of features like closures and local declaration of functions. I think the same holds of haskell using an appropriate monad instead of ML's imperative features. All this is of course entirely dependent on having a suitable GUI library or set of bindings for haskell. I haven't tried wxHaskell yet so I can't comment there. (And for some applications, some languages may be too slow, but I was ignoring efficiency in the above) Jules ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
On Wed, 2005-01-12 at 11:34 +, Jules Bean wrote: On 12 Jan 2005, at 11:10, Matthew Roberts wrote: All this is of course entirely dependent on having a suitable GUI library or set of bindings for haskell. I haven't tried wxHaskell yet so I can't comment there. (And for some applications, some languages may be too slow, but I was ignoring efficiency in the above) The nice thing about all the GUI binding libraries we have at the moment is that they are wrappers over C libraries so the speed of the GUI should be pretty good unless you install a really slow event handler that gets fired all the time. I'd go as far as to say that a wxHaskell or gtk2hs GUI should be faster than an equivalent Java AWT/Swing gui. :-) Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
Hello! I don't think there is a simple answer. It probably depends on your experience, your development platform, and where you want to be able to distribute your application to. My goal behind experimenting with Haskell-based GUIs is to determine whether UI development in Haskell is much better (for instance, simpler, testable, maintainable) than in an imperative language. Up to now I have the impression that there are lots of things, which one can do in Haskell easier than in an imperative language. IMO user interfaces are very hard to test in imperative language. One needs to be very disciplined in order to test the behaviour of UIs thoroughly. It is possible, for instance, using the Abbot framework in Java, but it requires so much effort that, in most cases, I a) either don't write the test case for a UI behaviour, or b) write a test case on the non-UI part, which would fail, if the UI behaviour would work in a wrong way. For instance, imagine you want to test that a table contains value X in row Y and column Z. You can display this table, then navigate to the cell in the table and look what value is displayed there. This is hard. In most cases, I test the component, which is responsible for providing data for display (in Java they are called table models). A table model is just a class, which you can test with plain JUnit without any special extensions. So I want to try to write a GUI in Haskell and then decide whether writing GUIs in Haskell is really much better than writing them in an imperative language. Best regards Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
Hello! I want to thank all list participants for answering my questions concerning GUIs and unit testing. Best regards Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
Dmitri Pissarenko wrote: My goal behind experimenting with Haskell-based GUIs is to determine whether UI development in Haskell is much better (for instance, simpler, testable, maintainable) than in an imperative language. You might also be interested in wxFruit... http://zoo.cs.yale.edu/classes/cs490/03-04b/bartholomew.robinson/ ...although still a research project, it takes a more functional approach to GUI's. Greg Buchholz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Building GUIs for Haskell programs
Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? Thanks Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
You will find this page useful for finding libraries: http://www.haskell.org/libraries/ As for GUI stuff, I believe wxHaskell is the most actively maintained toolkit, and probably your best bet. Alistair. Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? Thanks Dmitri Pissarenko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
Here is an answer from a newbie at both Haskell and GUI -- I don't think there is a simple answer. It probably depends on your experience, your development platform, and where you want to be able to distribute your application to. I would say that wxHaskell is probably a good choice. It depends on wxWindows, which seems to be fairly well developed, and is said to work on all reasonable platforms. Here is my story: I've done little GUI programming -- some MS Visual C++ and visual basic years ago, a little perlTK more recently. I have some familiarity with TCL/TK from my perlTK experience. I'm developing on a Linux platform (Slackware 9) and have GHC 6.2.2. I looked at, and tried several of the Haskell libraries as listed at http://www.haskell.org/libraries/#guis Because of my previous experience with TCL/TK, I wanted to use a TK based solution initially. I had problems (I've forgotten what :-) with TCLHaskell, and went on to HTk. The HTk package seems pretty nice, but probably because of my inexperience with Haskell, I found it difficult to understand. wxHaskell seems to be the most popular vehicle, so I decided to look into it, partly based on some advice I got from this list. I had no trouble compiling and installing wxWindows (specifically, wxGTK-2.4.2). I also compiled from source wxHaskell with no problem. Although the documentation is a bit cryptic (for my level of experience, at least), and even though I have no past experience with wxWindows, I am able to figure out how to do what I want to do, so far. So, based on my experience, I can recommend wxHaskell. Best regards, John Velman On Tue, Jan 11, 2005 at 09:05:43PM +0100, Dmitri Pissarenko wrote: Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? Thanks Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
Hi, I can recomment wxHaskell [1] Georg [1] http://wxhaskell.sourceforge.net/ On Tue, 11 Jan 2005 21:05:43 +0100, Dmitri Pissarenko [EMAIL PROTECTED] wrote: Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? Thanks Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Georg Martius, Tel: (+49 34297) 89434 --- http://www.flexman.homeip.net - ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Building GUIs for Haskell programs
On Tue, 2005-01-11 at 21:05 +0100, Dmitri Pissarenko wrote: Hello! I want to learn to create GUIs with Haskell. Which GUI frameworks can you recommend? wxHaskell is good for building portable GUIs. It has an extensive selection of widgets and has a good API. gtk2hs is good for building GUIs that target the Linux/Gtk/Gnome platform (though it is portable to Windows). It is also an extensive toolkit. It allows you to visually design GUIs with the Glade user interface builder. The API style is currently more low level than that of wxHaskell or FLTK. There is also a binding to FLTK which is a much simpler, more light weight portable graphics toolkit. As far as I know, these are the only actively maintained GUI toolkits for Haskell at the moment. Duncan (gtk2hs developer) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe