

Happstack 0.4: A scalable framework for developing web applications in Haskell - dons
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071083.html

======
smanek
I know HAppS advocated an approach of using static HTML with Javascript for
content/dom stuff. From <http://happs.org/>:

 _HAppS does not come with a server-side templating system. We prefer the
pattern of developing static web pages and using AJAX to populate them with
dynamic content._

Does Happstack take the same approach? Can anyone comment on how this
architecture affects googlebot and other spiders?

~~~
baguasquirrel
You can pretty much use any old approach you'd like with Happstack. I am using
it right now and it is _very_ modular.

You could conceivably use the Text.HTML module to make your own pages in the
functional style. You can use HStringTemplate a la psp and php. Or you can do
the fun, bloated and awful web 2.0 thing and write an ass-ton of javascript to
do everything in the ajax-y fashion, and just use happstack to serve up json.

A similar situation holds for the MACID data store. It looked ok to me, but I
wanted to play with some distributed DBs instead (e.g. Mongo and Couch), and
it works just fine there too.

The important thing is that if you understand how HTTP works, how requests are
served up, etc., then you can pretty much hit the ground running with
happstack, without having to set up Apache and learn cgi or set up Tomcat and
figure out how to get the default permissions on Ubuntu to work. So in that
regard, it seems much closer to RoR than the traditional approach.

------
kunley
Really scalable?

<http://tutorial.happstack.com/tutorial/macid-limits>

"A realistic way to use Happstack with macid is to write an alpha version of
an application using macid (no database), and then add some other type of
persistent hard drive storage (probably database) outside of macid only if it
becomes necessary.

This raises the question: if you are eventually going to have to put in a
database back end, why use macid at all?

The -- perhaps slightly depressing answer -- is that you probably won't have
to put in a database back end, because your app won't be so successful that
this is required."

Now this is ridiculous. That's the way you guys are going to convince people
to use Haskell for reald world apps?

Don't get me wrong, I'd like to see Haskell winning in territories occupied by
other languages, but this looks just like another piece of Haskell code
written for the sake of being written in Haskell.

~~~
dons
Happstack's been around for a long time, and has been used in a number of
production systems (including at Deutsche Bank). They're certainly trying some
interesting things.

> convince people to use Haskell for reald world apps?

The project is not the language.

If you want regular old approaches to web apps, there's libraries for that (
[http://hackage.haskell.org/packages/archive/pkg-
list.html#ca...](http://hackage.haskell.org/packages/archive/pkg-
list.html#cat:web) ) in Haskell. But there's also happstack if you like their
approach.

The vision all along was that the vast majority of web apps could be written
in a MACID style -- they're not huge sites -- so make that as easy as
possible.

~~~
kunley
Yeah I should have said Happstack not the language, but it isn't my point.

Point is that the tutorial section I cited discouraged serious use of the
stuff it's supposed to promote.

------
aufreak3
Incredibly happy to see this. This could tip the balance in favour of Haskell
as a viable platform for web development, given it is as or better performing
than something like Go.

------
nearestneighbor
I'm curious, which web sites are currently running on Haskell?

~~~
dons
<http://patch-tag.com/> is a github for darcs, that happens to be running in
happstack. <http://gitit.net/> is a wiki based on gitit running in happstack.
DB used happs for analytic sites for day traders (
<http://cufp.galois.com/2008/abstracts.html#PolakowJeff> ), and notable,
JanRain (the OpenID company) used Haskell on the server side for some
components.

