Subject: Re: Web-page that does ONE complex thing
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 02 Jun 2006 22:19:33 -0500
Newsgroups: comp.lang.lisp
Message-ID: <3pednamnCctYYh3ZRVn-tg@speakeasy.net>
memius <thomasmh@gmail.com> wrote:
+---------------
| I am going to build an interactive web-page that has one very big,
| complex function. All the rest will be relatively trivial. I am going
| to code this one function in lisp, but I'm wondering whether to build
| the rest of the page in a more user-friendly language (Ruby), and try
| to interface it, or whether to build the whole thing in lisp. Any
| opinions? Any other language-recommendations for the mundane stuff?
+---------------

Might as well stay in Lisp -- it's certainly easy enough to
spit out HTML from it, e.g.:

    http://rpw3.org/hacks/lisp/minimal.lhp
    http://rpw3.org/hacks/lisp/appsrv-demo.lhp
or:
    http://rpw3.org/hacks/lisp/cmucl-demo.cgi

The ".lhp" (Lisp-Handled Pages) files talk to a persistent
application server (written in CMUCL) that handles caching
and automatic recompilation of pages, but if your request/sec
rate is very low the simpler ".cgi" approach [fork/exec a new
Lisp process per HTTP request] might be good enough.

There are all sorts of Common Lisp-based persistent application
server infrastructures readily available, some using Apache
[or eqv.] as a front-end, some being full standalone web servers.
See <http://www.cliki.net/web> for a wealth of resources. Peter
Breed's <http://www.cliki.net/A%20Short%20web%20application%20tutorial>
is a good place to start, as are the chapters on Web programming
(Ch. 26, 30, & 31) in Peter Seibel's "Practical Common Lisp"
<http://www.gigamonkeys.com/book/>.


-Rob

p.s. Oh, <http://www.cliki.net/web> also contains pointers to
packages for emitting HTML. I tend to use HTOUT, myself, but
CL-WHO and others are fine as well.

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607