

Lisp for the Web, Part II - matthewsnyder
http://msnyder.info/posts/2011/07/lisp-for-the-web-ii/

======
ScottBurson
I have been writing a Web app using Weblocks, and I have been very pleasantly
surprised at the breadth and depth of the libraries available for the purpose.
I would go so far as to say that the Common Lisp library problem has been
solved, at least as far as writing Web apps is concerned. Here are the
highlights of the packages on which my app directly or indirectly depends:

    
    
      CLSQL: database interface (I'm using PostgreSQL)
      Weblocks: widget-oriented app framework with AJAX
        Hunchentoot: web server
          CL+SSL: SSL foreign interface layer
          Babel: charset conversion
        PURI: Portable URI library
        CL-JSON
        CL-WHO: HTML generation
        CL-PPCRE: regular expressions
      CL-OAUTH: OAuth implementation
        Drakma: HTTP client
      CL-SMTP: programmatically send email
      Monkeylib-bcrypt: bcrypt foreign function interface
    

And almost all of these (and many more I haven't listed) are easily downloaded
and installed with Quicklisp.

------
maximilianburke
I've been hacking together a site using Hunchentoot, Postmodern + PostgreSQL,
CL-WHO for HTML generation, and CL-JSON + Backbone.js for client interaction.
I'm probably duplicating a lot of functionality that would already be done
with Rails or Django but I'm having a lot of fun doing it this way :)

------
mtraven
Allow me to flog WuWei, <http://wuwei.name>, a toolkit for doing Ajax web UIs
in Common Lisp, now in production use on <http://biocyc.org> .

~~~
mark_l_watson
Very nice. It would have been a little easier to setup if mtlist and wuwei
where Quicklisp installable. Thanks!

~~~
asdr
According to README, quicklisp installation is available for wuwei.

<https://github.com/mtravers/wuwei/blob/master/README.md>

------
mahmud
Just use RESTAS, closure-template & Postmodern.

~~~
icey
What makes this stack superior to the other suggested libraries?

~~~
mahmud
RESTAS is written by someone who knows both Lisp and the web _really_ well.
It's a good sign when a developer resists the urge to invent a new templating
syntax (specially a lisper, come'on) and chooses to use a boring semi-
standard, like Google's Closure Template.

RESTAS is MVC, in the loosest sense of the word. The author, archimag, went
way out of his way to make the "C" part, the controller, as flexible as
possible.

RESTAS created its own module system on top of the Lisp package system.
Importing a Lisp package from within an application also _mounts_ that
package's controller URLs underneath your app's.

He wrote one of the most authentic clones for Closure Template language. In
fact, it generates HTML and JavaScript.

I could go on and on, but to put in a nutshell: the author actually _looks_ at
other web frameworks for inspiration, and is not someone trying to bolt an
idealized "Lisp way" on top of the web. No continuations, no pretending that
the web is a GUI, none of that crap. You want web, you get web: clean,
modular, RESTful web.

------
sigil
Great article! The only thing I'd do differently is just serve up the js as a
static file instead of using code transformation. That seems likely to break
for non-trivial amounts of js.

~~~
funcall
I beg to differ. I've used ClojureJS (a Clojure to JavaScript translator) for
building a non-trivial web app front end, and the result has not only been
robust but also a pleasure to build (from a Lisp programmer's point of view).

[Disclosure: I'm the author of the ClojureJS library]

~~~
sigil
Interesting. What's the site, and is the original Clojure source before -> js
transformation published somewhere?

~~~
funcall
We're not launched yet (but, close). I'll definitely post about it when we're
live. I'm not sure how much of the Clojure (subset) code we'll publish, but
I'll write more about our process and experience once we're launched.

