Synopses & Reviews
Developers are discovering the exceptional power of Clojure’s functional programming model to quickly solve problems in domains ranging from social networking to Big Data. It is fast and efficient—ideal for rapid prototyping and lean development. And Clojure is highly expressive and extremely extensible, which makes it one of today’s leading tools for software innovation. Since it targets the Java Virtual Machine, Clojure also leverages the Java platform’s maturity and enormous ecosystem.
Clojure Recipes is the first wide-ranging, up-to-date “code recipe book” for this increasingly popular language. Through practical and complete examples, author Julian Gamble illuminates Clojure’s key features and best practices, showing how to solve real-world problems one step at a time. Focusing on Clojure 1.5 and higher, Gamble fully reflects recent enhancements that have rendered many web-based examples obsolete.
Gamble first walks you through the essential steps required to set up your Clojure development environment, from setting up the Leiningen interface to packaging Clojure for J2EE environments. He then shows you how to build both basic and advanced REST servers, before turning to a wide range of increasingly sophisticated applications.
In this book you will find
- Innovative Clojure code for diverse web, security, administration, and development tasks, from log reading and app monitoring to software testing
- Detailed instructions for using concurrency primitives, writing new DSLs, simplifying cloud database development, and more
- “Learn by doing” projects, which offer practical experience with Clojurescript, Storm, Pedestal, Datomic, and other advanced tools
- Coverage of using Clojure with Cascalog 2.0 to write complex Hadoop queries with minimal code
The breadth, depth, and quality of Gamble’s examples make Clojure Recipes uniquely valuable both to developers who are exploring Clojure for the first time and those already using it in production.
Synopsis
"There's something for everyone here. . . . You can pick up and read this book and build an industry-standard system in a weekend: It has everything you need to get started with a new project. I also found it helpful in reviewing the structure of existing projects."
--Timothy Pratley, developer
Developers are discovering the exceptional power of Clojure's functional programming model to quickly solve problems in domains ranging from social networking to Big Data. Clojure is fast and efficient--ideal for rapid prototyping and lean development. And it is highly expressive and extremely extensible, which makes Clojure one of today's leading tools for software innovation. Since it targets the Java Virtual Machine, Clojure also leverages the Java platform's maturity and enormous ecosystem.
Clojure Recipes is a wide-ranging, up-to-date "code recipe book" for this increasingly popular language. With practical and self-contained examples, author Julian Gamble illuminates Clojure's key features and best practices, showing how to solve real-world problems one step at a time. Focusing on Clojure 1.7 and higher, Gamble fully reflects recent enhancements that ensure you're getting the most up-to-date code for your project.
Gamble first walks you through the essential steps required to set up your Clojure development environment, from setting up the Leiningen build tool to packaging Clojure for Java EE environments. He then shows you how to build both basic and advanced REST servers, before turning to a wide range of increasingly sophisticated applications.
In this book you will find
- Innovative Clojure code for diverse web, security, administration, and development tasks, from log reading and app monitoring to software testing
- Detailed instructions for using concurrency primitives, writing new DSLs, simplifying cloud database development, and more
- "Learn by doing" projects, which offer practical experience with Clojurescript, Storm, Pedestal, Datomic, and other advanced tools
- Coverage of using Clojure with Cascalog 2.0 to write complex Hadoop queries with minimal code
The breadth and quality of Gamble's examples make
Clojure Recipes uniquely valuable both to developers who are exploring Clojure for the first time and to those already using it in production.
Synopsis
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
About the Author
Julian Gamble 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 at juliangamble.com/blog. He lives in Sydney, Australia.
Table of Contents
Preface
About the Author
Chapter 1: Starting Your Project with Leiningen
Chapter 2: Packaging Clojure for a J2EE 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
Index