There are a contingent of Lisp users who really, really, really like this fgen style, for EVERYTHING. I—as someone who's worked in the industry on lots of startup-level projects—think it's only useful for small, regular snippets. There is also this false-metric effect in play; there are only 45ish lines in one file here, so it must be elegant and great amirite?
But a real webapp would have lots of templates and lots of files.
Where Clojure really shines in web development is when you mix it with cgrand's Enlive templating engine (http://github.com/cgrand/enlive), which is an amazing project with lots of active development. This approach is so cool that even a lot of the Rails and Python startup folks are starting to copy it.
I think the point of the article is to cover the absolute basics using Ring, not advocate any particular style of development. I mean the title of the blog post does say it all.
Having written a lengthy Enlive tutorial, http://github.com/swannodette/enlive-tutorial, I of course swear by it and scoff at inline html generation :D So I prefer coupling Ring+Enlive+Moustache (and tasty Aleph) myself but that would be an awful lot to cover in a single blog post now wouldn't it ;)
I suspect we could do it easily. Talk to me on twitter (my name here is my name on twitter) and let's see if we can hammer out an elegant way to describe that coupling.
But a real webapp would have lots of templates and lots of files.
Where Clojure really shines in web development is when you mix it with cgrand's Enlive templating engine (http://github.com/cgrand/enlive), which is an amazing project with lots of active development. This approach is so cool that even a lot of the Rails and Python startup folks are starting to copy it.