It obviously is possible to write almost any kind of application in almost any programming language, especially in such a powerful one as Lisp (be it Scheme or Common Lisp). But is it practical to use it for web development? If so, what should be a good starting point? Where can be found the proper resources (tools, libraries, documentation, best practices, examples, etc.) for a project of this nature?
For web development as for any other task, one can leverage Common Lisp's advantages: the unmatched REPL that even helps to interact with a running web app, the exception handling system, performance, the ability to build a self-contained executable, stability, good threads story, strong typing, etc.
Even progressive companies willing to use a more powerful language usually don't choose LISP. This is because many of the newer languages try and compromise by borrowing powerful features from LISP, while staying easy to learn for the masses.
Lisp empowers programmers to write faster programs faster. An empirical study shows that when programmers tackle the same problems in Lisp, C/C ++ and Java, that the Lisp programs are smaller (and therefore easier to maintain), take less time to develop and run faster.
A Lisp program tends to provide a much clearer mapping between your ideas about how the program works and the code you actually write.
Yes, web development is one of Common Lisp's strengths today.
As a web server, use Hunchentoot, formerly known as tbnl, by Dr. Edmund Weitz.
You can run it as a back-end to Apache using mod_proxy as a reverse proxy, or as a stand-alone server.
Various HTML generation solutions are available, from PHP-style templates to Lisp macro hacks to XSLT. Just take your pick.
HTML-TEMPLATE is one example.
Closure XML is available for XML parsing, serialization, XPath 1.0, XSLT 1.0. There is also Closure HTML for HTML tag soup parsing.
(Full disclosure: I'm the maintainer of Closure XML and Closure HTML.)
If you like, Parenscript can make your JavaScript experience lispier, but you can also write plain old JavaScript yourself, of course.
Another cool JavaScript enhancing solution in jwacs, which is written in Common Lisp and transforms JavaScript to add continuation support.
Web service projects might require an HTTP client in addition to a server.
Drakma is the library to use for that today.
PURI is useful for URI manipulation.
And there is more! One starting point is cliki, for example cliki.net/web.
On the web, nobody knows your server is written in Common Lisp :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With