Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If I were undertaking this, I think I would start by creating a ring adapter for RESTEasy. After this is done, Compojure will know how to handle and respond to http requests in a way that works with RESTEasy. Here's some information to help you get started.</p> <p>Ring is a clojure library that represents http requests and responses in a standard way. This standard is detailed <a href="https://github.com/mmcgrana/ring/blob/master/SPEC" rel="nofollow">here</a>.</p> <p>It works by receiving an http request from any of a variety of libraries (ie. jetty, netty, finagle) and translating it into the standard representation. It then hands the request off to a request handler (often this is defined using Compojure). The handler then returns a response (also defined in the above spec). This response is translated by ring back into a form that jetty, netty, etc. can understand.</p> <p>This translation is done by ring adapters. There are a few listed <a href="https://github.com/mmcgrana/ring/wiki/Third-Party-Libraries" rel="nofollow">here</a>, and ring comes with an adapter for jetty built in. Maybe you can use one of them as a template for creating a RESTEasy adapter. After you've done that you can use compojure in the standard way.</p> <p>Ring and compojure are great examples of how to create a DSL. Like all good DSLs, it simplifies creating solutions in its problem domain (HTTP servers in this case). They are great examples of how to think in terms of DSLs. If you study them, you'll be well on your way towards thinking in terms of DSLs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload