Back to Table of Contents

Templating for HTML and Javascript

Happstack supports a number of third party templating and HTML libraries. It is easy to add support for additional libraries, if your favorite does not already have support.

Each templating system has it's own set of advantages and drawbacks.

BlazeHtml

The BlazeHtml library provides combinators for generating HTML 4 and HTML 5 in Haskell.

pros:

cons:

HSP

HSP allows you to embed literal XML syntax inside your Haskell code. A pre-processor rewrites the literal XML into normal haskell function calls, and then the code is compiled.

pros:

cons:

Hamlet
HStringTemplate
Heist
XSLT
more to come..
#include "HelloBlaze.lhs" #include "TemplatesHSP.lhs" #include "TemplatesHSPI18n.lhs" #include "TemplatesHeist.lhs" #include "JMacro.lhs"

Next: Request parameters and data