Skip to content

Routing libraries

Application Logicλ︎

Ring - Compojure routes

Ringλ︎

Ring is the defacto library for server-side web applications. Even if not using the Ring library, the contents that Ring established are used by other libraries.

Compojureλ︎

Compojure is a library that works with Ring to manage Compojure also has convenience functions that make ring responses easier to generate.

In this section we will update our project to use Compojure.

Bidi - Bi-directional URI dispatchλ︎

https://github.com/juxt/bidi Clojure and ClojureScript

bidi is written to do 'one thing well' (URI dispatch and formation) and is intended for use with Ring middleware, HTTP servers (including Jetty, http-kit and aleph) and is fully compatible with Liberator.

yada - resources as dataλ︎

yada is a web library for Clojure, designed to support the creation of production services via HTTP.

It has the following features:

  • Standards-based, comprehensive HTTP coverage (content negotiation, conditional requests, etc.)
  • Parameter validation and coercion, automatic Swagger support
  • Rich extensibility (methods, mime-types, security and more)
  • Asynchronous, efficient interceptor-chain design built on manifold
  • Excellent performance, suitable for heavy production workloads

yada is a sibling library to bidi - whereas bidi is based on routes as data, yada is based on resources as data.

Reititλ︎

A data approach to routing