Rodrigo Flores's Corner Code, Cats, Books, Coffee

Book Review: Clojure Applied

The following blog post is about the book Clojure Applied written by Ben Vandgrift and Alex Miller. I have not received a free copy of the book to review it.

As Clojure is becoming more and more popular these days, we have a lot of programmers learning to write code in Clojure, and almost all books tell you how each part works: functions, macros, maps, lists, records, multi-methods, agents, refs, transducers, reducers. But how can you apply all these concepts together ?

I like to think of Clojure like a infinite Lego box: you can build your system using the pieces, but can you make smart choices to select the best tool for each part of your system ? Some parts appear to be similar: lists and vectors, maps and records, multi-methods and protocols, but how do I select one instead of another ?

Clojure Applied is the first Clojure Book I read which wasn't targeted for people initiating in the Clojure world, so it considers that you have some experience. I like to think of it like a book of answers to questions that if you deal with Clojure frequently you will probably wonder about. I particularly liked the chapter 6 "Creating Components": on how to structure your application in an organized way.

Another cool thing is that it not only covers features of the language but also some well-known parts of the ecosystem like the core async library, Stuart Sierra's component library, the schema library and transit and EDN as data serializers. It also covers how to deploy your code to a production server using a platform, a IAAS or using your own servers.

I strongly recommend you to not read this book cover to cover, but to try to write a small application after each chapter applying what you have learned: I did it this way and I really think it was worth it.

comments powered by Disqus