Anyone using Lisp for a MySQL-backended web app?

只谈情不闲聊 提交于 2019-12-08 21:22:07

问题


I keep hearing that Lisp is a really productive language, and I'm enjoying SICP. Still, I'm missing something useful that would let me replace PHP for server-side database interaction in web applications.

Is there something like PHP's PDO library for Lisp or Arc or Scheme or one of the dialects?


回答1:


newLisp has support for mysql5 and if you look at the mysql5 function calls, you'll see that it's close to PDO.




回答2:


Since nobody has mentioned it, you can try Postmodern, which is an interface to PostgreSQL. It aims for a tighter integration with PostgreSQL and so doesn't pretend to portability between databases.

I've put it together with hunchentoot and cl-who and built a pretty nice website.




回答3:


newLISP - http://www.newlisp.org/ - has support for MySQL, but I haven't used it (newLISP).




回答4:


If you're happy with SQL as part of your life, CL-SQL provides a mapping into CLOS objects. It appears to be more mature than Elephant.

I'm using it on my own website.




回答5:


I've had good success with SBCL and CL-SQL. CL-SQL has a object mapping API, but I used the plain SQL API which simply returns lists and this worked well enough. And in the Clojure language, you interact with JDBC through a maps or structs {:col1 "a", :col2 "b"}, so a generated class library doesn't get you any simpler code, the language handles it nicely. In my experience, there is less cruft between lisp and sql than between more static languages and sql.




回答6:


our Common Lisp ORM solution is http://common-lisp.net/project/cl-perec/

the underlying SQL lib is http://common-lisp.net/project/cl-rdbms/ (fully tested with PostgreSQL, has a toy SQlite backend and a somewhat tested Oracle backend)

we started out using CLSQL, but after some struggle we decided to roll our own.

these libs and PostgreSQL are used in a clustered web application developed for the Hungarian government for planning the budget of the municipalities. it has about 4000 users, 500 at peek time. a little more info is available at http://common-lisp.net/project/cl-dwim/




回答7:


Cliki is a good resource for Common Lisp libraries: http://www.cliki.net/database

There is a project named Elephant (http://common-lisp.net/project/elephant/index.html), which is an abstraction for object persistence in CL.




回答8:


As long as you're switching your Webapp on Lisp, consider using persistence: you now have a constantly running Lisp image that holds everything about your application. I personnally used Elephant for that.

Elephant can use CL-SQL or BDB as it's backend, which means that you can use MySQL if you have one running. I found using SQLite really practical, though.




回答9:


We use SBCL, UCW, CL-SQL and MySQL as our back-end for Paragent.com. It has worked very well for us. We also have a number of clients using UCW/CL-SQL/MySQL for custom sites we have built them through our consulting arm Bitfauna.



来源:https://stackoverflow.com/questions/64953/anyone-using-lisp-for-a-mysql-backended-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!