Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part 2: Getting real > Clojure and the web

10. Clojure and the web

This chapter covers

  • Creating web services with Clojure

  • An overview of Ring

  • Using Compojure on top of Ring

  • Generating HTML


HTTP is the lingua franca of the internet. If your project involves creating a dynamic website, you’ll need to use a suitable web application framework to get your job done. Even if you aren’t creating a website for end users to visit, writing an HTTP interface to your application can provide an easy-to-use API for other applications. In this chapter, we’ll explore doing that. First, we’ll write some framework code, and then we’ll use some open source libraries to enhance what we wrote. Specifically, after writing our own little framework, we’ll explore the Ring and Compo-jure projects. We’ll also look at clj-html, another open source library that allows HTML generation via Clojure code.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial