I suppose this is a strange question to the huge majority of programmers that work daily with Java. I don't. I know Java-the-language, because I worked on Java projects, but not Java-the-world. I never made a web app from scratch in Java. If I have to do it with Python, Ruby, I know where to go (Django or Rails), but if I want to make a web application in Clojure, not because I'm forced to live in a Java world, but because I like the language and I want to give it a try, what libraries and frameworks should I use?
当前回答
你也可以尝试Clojure线圈,http://github.com/zubairq/coils -免责声明:我是作者
其他回答
Compojure是我用来创建一个小型博客应用程序的工具。它以Sinatra为蓝本,Sinatra是一个最小的、轻量级的Ruby web框架。我主要使用的是路由,就像Sinatra的一样。它看起来是这样的:
(GET "/post/:id/:slug"
(some-function-that-returns-html :id :slug))
没有ORM或模板库,但它有将向量转换为HTML的函数。
声明:我是作者。
我把一个leiningen模板结合luminusweb和栗子模板。 所以你得到了一些东西,你可以用它来构建clojure代码以及前端和后端clojurescript代码。 此外,它还提供用户管理、一些简单的CRUD生成和一些更小的功能:https://github.com/sveri/closp
到目前为止,我所遇到的最好的Clojure web框架是Compojure: http://github.com/weavejester/compojure/tree/master
它很小,但功能强大,并且具有漂亮优雅的语法。(它在底层使用Jetty,但它对您隐藏了Servlet API,除非您需要它,但这种情况不会经常发生)。去看看那个URL的README,然后下载一个快照并开始播放。
你也可以尝试Clojure线圈,http://github.com/zubairq/coils -免责声明:我是作者
Webjure, Clojure的web编程框架。
特性:分派servlet调用Clojure函数。动态HTML生成。SQL查询接口(通过JDBC)。
这个答案是Webjure信息的占位符。