What You’ve Learned

You’ve now learned some basics about writing Clojure web applications. Next we’ll take a look at adding a bit of structure for our service end points. The guestbook application has a very simple service API, and using undecorated Compojure routes is not a problem here. However, a more complex application may have a large number of service end points. Each of these will take its own set of parameters and return different kinds of data.

In the next chapter, we’ll see how to use the Compojure-api library to define service end points in our application.[54] This library will allow us to annotate each route using a schema. This schema will provide documentation and validation for each service operation, ensuring that the API ...

Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.