To Template Or Not To Template
Since developing the tutorial in the last few posts, I have been
working on developing a real web app in Haskell with HAppS. Now that
I know my way around the basics of HAppS, I need to move on to
generating actual HTML (as opposed to the plaint text messages that
the tutorial used). Before starting, I had to decide what methodology
I would use to generate the HTML. I'm new to web development, so I
may be missing something, but as I see it there are three main
possibilities: Serve static pages that use AJAX to load dynamic contentDynamically generate pages with Haskell and HAppSUse Haskell to populate static page templates with dynamic content Let's first take a look at the last option, static templates.
Most of the web frameworks that I've seen (ROR and several Python
frameworks) use templates. The main argument for them seems to be
that templates allow a separation (MVC style) of the view and
controller. The page template defines the view and the Python code is
the…