Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. URL Routing and Template Rendering

So far, we've looked at the basics of getting our codebase into a state where we can start developing some of the meat of our application. It hasn't been very exciting, I know. In this chapter, however, we will start building our application, creating actual endpoints that process HTTP requests, which return something we can look at. In this chapter, we will:

  • Learn what the Compojure routing library is and how it works

  • Build our own Compojure routes to handle an incoming request

  • Learn what the Selmer rendering library is and how it works

  • Create our own Selmer HTML template

    Note

    What this chapter won't cover, however, is making any of our HTML pretty, client-side frameworks, or JavaScript. Our goal is to understand the server-side/Clojure components and get up and running as quickly as possible. As a result, our templates are going to look pretty basic, if not downright embarrassing.