3 ms·
From 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 a
by weavejester 17y ago
From 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.