Publication date: October, 2015

Developers are discovering the immense power of Clojure's functional programming model to quickly solve problems in domains ranging from social networking to Big Data. Targeting the Java Virtual Machine, Clojure also leverages the Java platform's maturity and enormous ecosystem. Clojure Recipes is a "code recipe book" for this increasingly popular language.

Julian Gamble focuses on practical and complete examples that illuminate Clojure's key features and show step-by-step how to solve real-world problems with it. Clojure Recipes provides a series of "learn by doing" step-by-step projects, you'll learn how to:

  • Write your own DSL
  • Build a website with Pedestal
  • Add Clojurescript to your website
  • Abstract boilerplate code into a macro
  • Get started with Storm
  • Build an application with Datomic
  • Build log readers, web app monitors, web
    testing suites, customized Ant tasks, and more

From reviewers:

"Clojure Recipes is a fresh and simple approach to building useful projects with Clojure. The chapters are complete and carefully explained. This is a great addition to any bookshelf."

Leonardo Borges, Lead Consultant at ThoughtWorks and author of the upcoming book Clojure Reactive Programming


"A tour of modern techniques used in computing and how they can be implemented quickly in Clojure. There's something for everyone here. You will cut-n-paste a lot of this book - I did so immediately when I read it."

Steve Buikhuizen, Independent Consultant


"You can pick Clojure Recipes up and build an industry standard system in a weekend. It has everything you need to get started with a new project. I found it helpful in reviewing the structure of existing projects. I highly recommend Clojure Recipes."

Timothy Pratley, Developer


WHAT?

Clojure Recipes is a book of recipes that deliver concrete end-to-end solutions that assist you in building your applications. It's perfect for getting started with Clojure, or to give to your friends so they can get up and running.

WHY?

If you wanted to get started with Clojure on your weekend project, or in your workplace, then you need some clear examples to get started with. Clojure Recipes provides step-by-step instructions to get you up and running quickly, and the understanding to know how this fits into the bigger picture.

HOW?

Each chapter of the book contains a self-contained solution that guides you through, step by step, explaining each concept as you go. At the end of the chapter you'll have a working application.

Table of Contents

Preface

Chapter 1: Starting Your Project with Leiningen
Chapter 2: Packaging Clojure for a Java EE Environment
Chapter 3: Creating a REST Server in Compojure
Chapter 4: Creating a REST Server with Liberator
Chapter 5: A REST Client in ClojureScript
Chapter 6: A Simple JSON Server
Chapter 7: A Simple Server using the Pedestal Framework
Chapter 8: A Stock Ticker on the Pedestal Framework Server
Chapter 9: Simplifying Logging with a Macro
Chapter 10: Extending the Compiler with a Macro
Chapter 11: Simplifying Datomic Syntax by Writing a DSL
Chapter 12: Reading the SASS DSL and Generating CSS with Clojure Zippers
Chapter 13: Introduction to Cascalog
Chapter 14: Cascalog and Hadoop
Chapter 15: Loading a Data File into Cascalog
Chapter 16: Writing Out a Data File with Cascalog
Chapter 17: Cascalog and Structured Data
Chapter 18: Loading Custom Data Formats into Cascalog
Chapter 19: Connecting to Datomic from Your Application
Chapter 20: Getting Started with Storm
Chapter 21: Getting Started with JMS in Clojure
Chapter 22: Integrating Storm and JMS
Chapter 23: A CSV Reader
Chapter 24: Detecting Errors with a Log Monitoring Application
Chapter 25: Bundling Clojure as an Ant Plugin
Chapter 26: Bundling Clojure as an Maven Plugin
Chapter 27: Integrating Clojure by Scripting Web Tests
Chapter 28: Monitoring Availability with a Website
Appendix A: Debugging Macros

Developers are discovering the immense power of Clojure's functional programming model to quickly solve problems in domains ranging from social networking to Big Data. Targeting the Java Virtual Machine, Clojure also leverages the Java platform's maturity and enormous ecosystem. Clojure Recipes is a "code recipe book" for this increasingly popular language.

WHAT?

Clojure Recipes is a book of recipes that deliver concrete end-to-end solutions that assist you in building your applications. It's perfect for getting started with Clojure, or to give to your friends so they can get up and running.

WHY?

If you wanted to get started with Clojure on your weekend project, or in your workplace, then you need some clear examples to get started with. Clojure Recipes provides step-by-step instructions to get you up and running quickly, and the understanding to know how this fits into the bigger picture.

HOW?

Each chapter of the book contains a self-contained solution that guides you through, step by step, explaining each concept as you go. At the end of the chapter you'll have a working application.

Julian Gamble focuses on practical and complete examples that illuminate Clojure's key features and show step-by-step how to solve real-world problems with it. Clojure Recipes provides a series of "learn by doing" step-by-step projects, you'll learn how to:

  • Write your own DSL
  • Build a website with Pedestal
  • Add Clojurescript to your website
  • Abstract boilerplate code into a macro
  • Get started with Storm
  • Build an application with Datomic
  • Build log readers, web app monitors, web

ABOUT THE AUTHOR

Julian Gamble (Sydney, Australia) is a software engineer who has worked in the financial services industry for more than a decade. When he's not enabling billions of dollars to orbit the globe, he writes and presents on all things software related.

Follow Clojure Recipes on Twitter at @ClojureRecipes