显然,可以用几乎任何编程语言编写几乎任何类型的应用程序,尤其是像 Lisp 这样强大的语言(无论是 Scheme 还是 Common Lisp)。但是,将它用于 Web 开发是否切实可行呢?如果是这样,什么应该是一个良好的起点?在哪里可以找到适合这种性质的项目的资源(工具、库、文档、最佳实践、示例等) ?
Paul Graham's company Viaweb wrote a product in Common Lisp that subsequently became Yahoo Shops. Apparently Yahoo subsequently re-wrote it in C++. There are quite a few web resources for Lisp progamming.
You can find some stuff about tooling for Lisp web applications in this question.
It might also be worth having a listen to Stack Overflow Podcast 27 where the Reddit guys talk a bit about their experience of runnig a website on Lisp (and their switch to Python).
The scheme people around DrScheme have spent a remarkable amount of time on it:
www.franz.com runs on their own Webserver (AllegroServer) and webframework (webactions)
If you are in doubt check the common lisp packages from Edi Weitz. They usually work.
So yes one can do "serious" web-programming with Common Lisp. I for my part am currently undecided to follow some Common Lisp route or Ruby on Rails. I prefer both over anything .NET....
Opinions vary. The common wisdom is: Better use a different language, or rather a different web stack, such as LAMP, .NET, Ruby on Rails, Java. The well-known successful web project in lisp was Paul Graham's ViaWeb. Reddit was initially implemented in lisp, but then switched to python. If you do decide to use lisp, try Seibel's book: Practical Common Lisp.
If you want well supported lisp tools then you'll need to pay for them. There just isn't a very big community around the open source tools so they don't have the same level of documentation/adoption as, say, Django on Python.
Its also worth noting that Reddit was initially built in Lisp, but the authors later migrated to Python, citing a lack of well used and documented libraries. (link)
I can't speak to other frameworks, but I've had very good luck using Hunchentoot for a webserver (it works fine on its own, or you can put it behind Apache). What really makes it shine (this will probably come as a shock to some) are the libraries!
Use CL-WHO to write effortless HTML in a lisp-style syntax
Parenscript allows you to write code that compiles to javascript
What I really like about using CL for the web is that you can tweak it all as it is running. You always have a REPL up and running your server code, you can then connect to that REPL and change or inspect how the code is working, all without having to stop anything. I've redefined functions while the site is running, the next time the function is called, it simply picks up the new code and works.
Obviously a lot of people seem to think Lisp is good enough for writing a lot of web frameworks.
I don't use or endorse any web frameworks. I prefer to build web applications by combining together orthogonal tools (David Lichteblau has mentioned some good ones) using design patterns in a way that is actually appropriate to the application you are building, and that is the approach I recommend. Common Lisp provides both a wealth of such tools, and an unmatched ability to combine them.
Adam Petersen published an excellent introductory tutorial for how to start building Lisp web applications in this style last year: