Is it possible to "easily" connect Haskell to JavaScript/JavaFX in the browser and use a browser as a Windows GUI? :)

Is it possible to "easily" connect Haskell to JavaScript/JavaFX in the browser and use a browser as a Windows GUI? :)

If your Haskell can talk XML it can be accessed with AJAX.
Cheers,
G
------------------
-----Original Message-----
From: caseyh@istar.ca
Sender: haskell-cafe-bounces@haskell.org
Date: Wed, 20 Oct 2010 13:56:48
To: haskell-cafe

Claus Reinke posted this a while ago - see the attachment at the bottom of the message: http://www.haskell.org/pipermail/haskell-cafe/2007-July/029275.html

On Wed, Oct 20, 2010 at 3:11 PM, Stephen Tetley
Claus Reinke posted this a while ago - see the attachment at the bottom of the message:
http://www.haskell.org/pipermail/haskell-cafe/2007-July/029275.html
Thanks for that. Here's the relevant website that he posted later in that thread: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/browsing/ Of course, it would be nice to be able to write the "javascript" parts in Haskell, and even use a Haskell framework for generating the HTML. I'm sure this is possible with things like Yesod, etc. Just wanted to mention, currently I am working on a project (not in Haskell) that takes a similar approach of starting up an HTTP server and using the browser for the GUI. We are thinking about including a copy of Chromium in the binary release, and launching it on double-click with the "--app" flag which opens a "chromeless" browser window (i.e just a window border containing an HTML renderer) looking just like a local application. Another option is XULRunner, which you can use to create an application with native menus and widgets around the border, and add a "<browser>" element to the GUI which points at your Haskell web server. You could probably even generate the XUL layout code in the Haskell server if you wanted, which would provide a totally native-looking app. (At least for those who don't consider Firefox very awful-looking, I know there are some Cocoa pedants around who would complain.. ;) Steve

On Wed, Oct 20, 2010 at 4:27 PM, Stephen Sinclair
On Wed, Oct 20, 2010 at 3:11 PM, Stephen Tetley
wrote: Claus Reinke posted this a while ago - see the attachment at the bottom of the message:
http://www.haskell.org/pipermail/haskell-cafe/2007-July/029275.html
Thanks for that. Here's the relevant website that he posted later in that thread: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/browsing/
Of course, it would be nice to be able to write the "javascript" parts in Haskell, and even use a Haskell framework for generating the HTML. I'm sure this is possible with things like Yesod, etc.
Just wanted to mention, currently I am working on a project (not in Haskell) that takes a similar approach of starting up an HTTP server and using the browser for the GUI. We are thinking about including a copy of Chromium in the binary release, and launching it on double-click with the "--app" flag which opens a "chromeless" browser window (i.e just a window border containing an HTML renderer) looking just like a local application.
Another option is XULRunner, which you can use to create an application with native menus and widgets around the border, and add a "<browser>" element to the GUI which points at your Haskell web server. You could probably even generate the XUL layout code in the Haskell server if you wanted, which would provide a totally native-looking app. (At least for those who don't consider Firefox very awful-looking, I know there are some Cocoa pedants around who would complain.. ;)
P.s., it would be wrong not to also mention the latest development in UHC, which might exactly let you write the JavaScript part of the app in Haskell: http://utrechthaskellcompiler.wordpress.com/2010/10/18/haskell-to-javascript... I haven't tried it, so can't comment on the readiness of this interpreter.. Steve

On 20 Oct, 2010, at 22:30 , Stephen Sinclair wrote:
P.s., it would be wrong not to also mention the latest development in UHC, which might exactly let you write the JavaScript part of the app in Haskell:
http://utrechthaskellcompiler.wordpress.com/2010/10/18/haskell-to-javascript...
I haven't tried it, so can't comment on the readiness of this interpreter..
The intention is to have the next release of UHC include a first working version of the Javascript backend. I am currently busy with providing FFI based interfacing to Javascript and a set of basic libraries for this. When released I expect it to be sufficient for initial experiments and simple programs, but to provide a proper interface to XML/HTML DOM (see http://www.haskell.org/haskellwiki/Haskell_in_web_browser), or a GUI abstraction around it (perhaps a subset of wxHaskell?) will take more work & time. I hope this can be done as part of a studentproject, or maybe picked up during a Hackathon. cheers, - Atze - Atze Dijkstra, Department of Information and Computing Sciences. /|\ Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands. / | \ Tel.: +31-30-2534118/1454 | WWW : http://www.cs.uu.nl/~atze . /--| \ Fax : +31-30-2513971 .... | Email: atze@cs.uu.nl ............ / |___\
participants (5)
-
Atze Dijkstra
-
caseyh@istar.ca
-
Gaius Hammond
-
Stephen Sinclair
-
Stephen Tetley