[Haskell-cafe] JavaScript in a browser as a Windows GUI?
Andrew Coppin
andrewcoppin at btinternet.com
Wed Oct 20 17:10:50 EDT 2010
On 20/10/2010 09:48 PM, Anton van Straaten wrote:
> It's pretty easy to get the basics going. There are a bunch of
> options. Start here:
>
> http://www.haskell.org/haskellwiki/Web
>
> For what you're asking about, I'd suggest looking at the following
> options from that page. All of these options involve linking a web
> server library into your Haskell app, so it's self-contained and all
> you need is a browser to talk to it:
>
> #6: Snap + custom code: Snap is simple to get started with, and is
> good if you know exactly what HTML/Javascript you need to generate and
> don't mind doing it more or less manually. If you're looking for
> richer library support for developing HTML UIs, consider the next option.
>
> #2: Snap + Yesod: Yesod will give you many of the framework features
> you might want for developing web UIs. (Not sure about JavaFX though.)
>
> #1: Happstack: an ambitious web server / framework with some fancy
> features like its own data persistence system.
>
> One other tool worth considering if you're doing a lot of Javascript
> with Haskell is JMacro: http://www.haskell.org/haskellwiki/Jmacro
>
> It lets you embed Javascript code directly in Haskell, and easily
> embed Haskell data into that code.
I'd like to have a go at writing CGI in Haskell. However, I don't really
want to install and configure the likes of Apache just to quickly test a
simple CGI script. I was hoping that I could find a trivial little HTTP
server on Hackage somewhere that would be just a simple binary that I
can execute and feed CGI binaries to. But alas, the closest thing I can
find is
http://hackage.haskell.org/package/hws
Alas, this does not work on Windows since it depends on the "unix"
package. (In fact, almost every network-related package on Hackage
depends on "unix", for reasons beyond my powers of comprehension...)
(I also looked at non-Haskell lightweight web servers, but they all
unanimously don't support CGI at all, or only support CGI _scripts_, but
arbitrary executables...)
Does anybody know of a solution that works on Windows?
More information about the Haskell-Cafe
mailing list