Clojure Recipes

Author: Julian Gamble
Publisher: Addison-Wesley
Pages: 288
ISBN: 978-0321927736
Print: 0321927737
Kindle:B016QDCNRC
Audience: Clojure programmers
Rating: 4 
Reviewer: Alex Artmstrong

A cookbook for a difficult language like Clojure - can that work?

You might want to argue with my characterization of Clojure as being a difficult language. However, it is based on Lisp and most people regard it as not a beginner's language. The problem is that if you can program in Clojure you probably don't want the usual cookbooks that go through simple things like how to reverse a string or remove spaces. Fortunately, this isn't really a traditional cookbook and to call what it presents you with "recipes" is a bit misleading. They are more like small case studies or tutorials on getting something specific done.

Banner

To give you an idea of what sort of thing is covered there is little choice but to list the chapters. Each one takes a standard format with variations as necessary:

  1. Assumptions
  2. Benefits
  3. The Recipe—Code
  4. Testing the Recipe
  5. Notes on the Recipe
  6. Conclusion

The first  two chapters are about getting started with Clojure and using the basic tools:

1. Starting Your Project with Leiningen 

2. Packaging Clojure for a Java EE Environment

 

The following six chapters are about creating servers of one kind or another:

3. Creating a REST Server in Compojure

4. Creating a REST Server with Liberator

5. A REST Client in ClojureScript

6. A Simple JSON Server

7. A Simple Server Using the Pedestal Framework

8. A Stock Ticker on the Pedestal Framework Server

 

Two chapters introduce macros and the way that they can be used:

9. Simplifying Logging with a Macro

10. Extending the Compiler with a Macro

 

From this point in the book the topics become increasingly applied and general. They serve to show how Clojure can be used to do a job:

11. Simplifying Datomic Syntax by Writing a DSL

12. Reading the SASS DSL and Generating CSS with Clojure Zippers

13. Introduction to Cascalog

14. Cascalog and Hadoop

15. Loading a Data File into Cascalog

16. Writing Out a Data File with Cascalog

17. Cascalog and Structured Data

18. Loading Custom Data Formats into Cascalog

19. Connecting to Datomic from Your Application

20. Getting Started with Storm

21. Getting Started with JMS in Clojure

22. Integrating Storm and JMS

 

The final few chapters are mostly about deploying and developing with Clojure:

23. A CSV Reader

24. Detecting Errors with a Log Monitoring Application

25. Bundling Clojure as an Ant Plug-in

26. Bundling Clojure as a Maven Plug-in

27. Integrating Clojure by Scripting Web Tests

28. Monitoring Availability with a Website Status Checker

 

 

You can tell from the chapter list that this book is mostly about the infrastructure that surrounds Clojure and, as already stated, it isn't a traditional language based recipe book. It doesn't tell you much about Clojure itself but it does tell you about using Clojure with other Clojure- based tools. It goes without saying that you need to be able to program in Clojure and reasonably well before reading it. This book would suit the Clojure programmer who wants to move on from programming toy examples to something real. Of course, how useful it is going to be depends on whether or not any of the recipes apply to you. If even just one does then it is almost certainly worth buying a copy of this book. 

 

Related Reviews

Seven More Languages in Seven Weeks

Web Development with Clojure

 

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Learn dbatools in a Month of Lunches

Author: Chrissy LeMaire et al
Publisher: Manning
Pages: 400
ISBN: 978-1617296703
Print: 1617296708
Kindle: B0B39PCHL8
Audience: SQL Server DBAs
Rating: 5
Reviewer: Ian Stirk 

This book aims to make it easier to manage your SQL Server estate, how does it fare? 



Beautiful C++

Author: J. Guy Davidson and Kate Gregory
Publisher: Addison-Wesley Professional
Date: December 2021
Pages: 352
ISBN: 978-0137647842
Print: 0137647840
Kindle: B09HTH1X38
Audience: C++ developers
Rating: 5
Reviewer: Mike James
Can C++ be beautiful?


More Reviews

 

Last Updated ( Tuesday, 27 June 2017 )