

Build a Web 2.0-like application in haskell, with HAppS.  - tphyahoo
http://www.happstutorial.com

======
bootload
_"... There is one minor detail... Unfortunately, the documentation for HAppS
is cringeworthy ..."_

Nothing kills the urge to learn something quicker than incomplete docs. But it
doesn't have to be this way. John Resig of JDoc fame, gets around this problem
by concentrating on writing good documentation of the core API ~
[http://blog.jquery.com/2006/09/02/taking-jquery-
documentatio...](http://blog.jquery.com/2006/09/02/taking-jquery-
documentation-to-the-next-level/) (along with doing stacks of talks, demos)
leaving the gaps for others to fill ~
<http://www.html.it/articoli/johnresig/index.html>

~~~
tphyahoo
I totally agree.

It's not really a "minor detail."

There's a "getting organized" thread on the happs googlegroup about this at
the moment, and I really hope it bears fruit.

This should be done via haddock of course, but haddock won't build HAppS
documentation at the moment because it doesn't work with template haskell (as
discussed in the googlegroup). Optimistically, this should be working again
after ghc 6.10.2, which also targets a haddock fix.

Even without working haddock though, the api should be better documented in
the source. If haddock suddenly started working there still would be a lot of
undocumented functions.

------
delano
A detailed error message is not a good introduction for an application
framework: "Server error: templates: changeWorkingDirectory: does not exist
(No such file or directory)"

~~~
joe_the_user
Yeah, I'll add load-testing to my to do in releasing web frameworks.

But how ever solid one might think one's app is, there's no reason not to make
one's front page static or at least have apache cache it.

~~~
delano
This story is going from bad to worse. The site was up again and I made it to
page 5 looking for code examples (I was pretty interested to see some
Haskell). The closest I found was a shell call for find. Page 6, "Server
Error". The site is down again.

So yeah, load test and do whatever it takes to ensure you're ready for
traffic.

~~~
tphyahoo
This will be the first time I'm doing load testing so gimme some time to get
it right :)

~~~
delano
Ah okay. Try Tsung, the Grinder, or JMeter if you have extra machines. For
less heavy-duty testing try httperf. Siege and Apache bench are okay for basic
testing. And _always_ use a separate machine to generate load.

~~~
tphyahoo
I think I finally fixed this problem.

[http://groups.google.com/group/HAppS/browse_thread/thread/cf...](http://groups.google.com/group/HAppS/browse_thread/thread/cff2b9098c2b7a14/2b64b94525cd28a4#2b64b94525cd28a4)

Basically it was a lazy io issue in haskell, fix was using a strict version of
readFile for templates.

Hope it stays up now!

------
vlad
Great stuff. You mentioned rails, django, catalyst, and php; I think you want
a framework like CakePHP or CodeIgniter in place of php in that list. Also,
just for kicks, you could mention that Smalltalk has a framework as well:
Seaside.

------
michaelneale
Nice - but one thing I noticed - the ORM link points back to the same page
(probably was meant to be wikipedia? )

------
tphyahoo
I am announcing happstutorial 5 on hackage and in darcs.

There are new chapters on various macid topics, utf8 gotchas, cookies, and
various improvements all over.

Please continue to report errors and inconsistencies as they come up.

This version is "close to final". At least for my purposes, it has boilerplate
that covers nearly all the important important use cases for a web 2.0 app. OK
I missed a few -- eg, there's still no email confirmation with registration --
but there's a hell of a lot.

So... don't use ruby for your next web 2.0 app -- use haskell!

thomas.

~~~
whalliburton
live demo?

~~~
tphyahoo
The tutorial site happstutorial.com is a demo. Of a job board. Check it out.

