4 ms·
While I'm happy that the library is being broken down into smaller pieces, I am left wondering what is left in Compojure itself. Http is handled by ring, html i
by brehaut 17y ago
While I'm happy that the library is being broken down into smaller pieces, I am left wondering what is left in Compojure itself. Http is handled by ring, html is its own lib, routing is its own lib. Can someone clarify what the library provides now?
- icey 17y agoIt doesn't seem like much will be left. Glue code, and maybe session stuff?
- weavejester 17y agoFrom 0.4.0 onward, the main functionality of Compojure will be to provide a routing concise DSL: (GET "/books/:isbn" [isbn] (show-book isbn)) This actually produces a fairly complex handler function, so there's still a fair bit of Compojure-specific code left. But it's true that Compojure will be a significantly more lightweight framework than it currently is.
- brehaut 17y agoThanks for the clarification. I had been confused through a lack of understanding about where compojure's handler functions stopped and clout's routing started.
- weavejester 17y agoClout just handles the parsing of a string like "/books/:isbn" into a structure that can be matched against a URI (internally represented as a regex and a vector of keywords).
- brehaut 17y agoWill compojure let you specify an alternative route parsing/handling library via a binding, protocol or similar?
- weavejester 17y agoTheoretically, so long as that library produces the same output as Clout. This means the route needs to be able to be specified as a regular expression.