webjure vs compojure?

后端 未结 8 1340
囚心锁ツ
囚心锁ツ 2021-02-13 22:28

I\'ve heard of two Clojure based web application frameworks: Webjure and Compojure. Can someone let me know which is better?

8条回答
  •  无人共我
    2021-02-13 23:05

    Compojure is based on Ring, which is a low-level framework that doesn't attempt to hide much of HTTP. It's similar to WSGI (Python) or Rack (Ruby). Ring has a concept of middleware, small pieces of code that can do something meaningful with an HTTP request and/or response, such as dump header infos, manage cookies etc. Compojure is a higher-level framework, somewhat similar to Ruby's Sinatra. Its aim is to provide a convenient API (or DSL, if you prefer) for most tasks a Web app developer faces. It's usually used together with an HTML generation library, such as Hiccup.

    I haven't heard much about Webjure in the last few months, I'm not sure it's in active development (but I'd be interested to find out more). It precedes Ring, AFAICT, which seems to have become somewhat of a standard for Clojure Web frameworks.

提交回复
热议问题