- Paperback: 238 pages
- Publisher: Pragmatic Bookshelf; 1 edition (September 6, 2015)
- Language: English
- ISBN-10: 1680500740
- ISBN-13: 978-1680500745
- Product Dimensions: 7.5 x 0.5 x 9.2 inches
- Shipping Weight: 12.6 ounces (View shipping rates and policies)
- Average Customer Review: 9 customer reviews
- Amazon Best Sellers Rank: #637,521 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Clojure Applied: From Practice to Practitioner 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
"Rebound" by Kwame Alexander
Don't miss best-selling author Kwame Alexander's "Rebound," a new companion novel to his Newbery Award-winner, "The Crossover,"" illustrated with striking graphic novel panels. Pre-order today
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
From the Publisher
Q&A with Ben Vandgrift and Alex Miller, authors of Clojure Applied
Why did we write Clojure Applied?
When Ben was first getting to know Clojure, he found himself awash in tutorials about syntax, toy example applications, and a few places to start. These things were immensely helpful, and he was grateful to their authors.
Eventually, there came a time when he wanted to apply Clojure to a real-world application. Something for a client. Something production-quality and deployable. The publicly available information grew a bit thin. Ben wanted to learn how to think in Clojure, not just at the function level, but across the board. He wanted to take this beautiful language and apply it to something bigger than a bread box.
Fast forward a couple of years. On several occasions, Ben and Alex had spoken about this problem. They referred to it as the 201 Problem. Programmers who understood the basic syntax and had a fair amount of experience in software development couldn't connect the dots up to a large-scale project in Clojure.
During one of these conversations Alex said, “We need to decrease the angle of the ramp,” and the phrase stuck. Clojure is perfectly capable of solving life-size problems—wonderfully and elegantly—but developers needed a few more lines between the dots.
We joined forces on a quest to go beyond the syntax and provide a guide to practical application of the Clojure language.
Is this book's approach idiomatic?
Together, we have used Clojure to build a number of applications from small to large. While we believe the style and forms we describe are in wide use, it’s difficult to say what is and isn’t idiomatic, especially among members of an innovative and opinionated community.
Every application is unique, but they share common problems and patterns. Whether you begin with the data structures and push outward, or at the component or subsystem level and slice downward, you’re going to need to make decisions about which processes to push into the background, how to manage state, component life cycles, inter-process communication, etc. There are many common points of decision when constructing an application.
Instead of laying down hard and fast rules, we focus on the Clojure-specific tradeoffs related to each topic. We recommend some practices, introduce several advanced concepts as options, and provide context to help support good decision-making. This approach will apply to all Clojure developers in their professional practice.
Additionally, we try and impress on the readers the flow of Clojure development. Developing in Clojure means adopting some of its values and history. We want them to be able to swim with the current, rather than against it.
As a growing community, why call out libraries and tools that may change?
In Clojure Applied, we point out several libraries that we use regularly for communication, configuration management, validation, and other functionality most applications will need. Yes, they may change, and our recommendations might change with them. That’s the nature of open source software. We have chosen libraries that are useful right now.
Over time, we might choose differently. Other tools may come to the fore.
When that happens, we’ll update the readers via the book's web site, and through digital updates and future editions. Clojure is mature for its age, but much of its ecosystem is still a moving target. As authors and contributors, we have to move with it.
Our goal was to provide a leg up, a good start. A talented software developer will do their own homework and make their own choices around tooling. It’s nice, however, to have a few places to start. As we mentioned earlier, our goal is to decrease the angle of the ramp. It’s equally important that we don’t try and reinvent wheels—especially early in our practice when learning a new language.
Any final words?
Solving a life-size problem is entirely possible in Clojure—simpler, in fact, than it would be in many other languages. Getting to that point from bare syntax is the journeyman's tale. We've had the good fortune to work alongside many skilled Clojurists, and learn from their examples.
Not everyone is this lucky, and so we're passing on our hard-won knowledge. This is why we’ve written Clojure Applied. We hope you enjoy the journey, and we'll see you on the other side.
"Starting your first Clojure job? Kicking off your first big open source Clojure project? This is the book you need to get started building Clojure projects." - Bridget Hillyer
"While other Clojure books enumerate the beautiful, pristine qualities derived from immutability and functional programming, this book is about getting your hands very dirty. Clojure Applied takes you step by step through the process of designing, writing, and shipping robust high-performance production systems." - David Nolen
About the Author
Ben Vandgrift struggles daily with a compulsion to solve problems. His decades-old journey has most recently led him to Clojure, allowing him to solve many software problems elegantly and efficiently. He works as a software engineer when he's not being mauled by his rescue panther.
Alex Miller was about to give up on programming as irretrievably complex when he found Clojure, which renewed his love for code. Alex works by day on improving Clojure and spends his off hours organizing the Strange Loop conference and playing music with his kids.
Author interviews, book reviews, editors picks, and more. Read it now
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
Several corners of the book were damaged in transit but this doesn't detract from the content of course.
So far this is definitely an intermediate -> advanced level book (which is fantastic, btw!)
1. The book conveys how to write programs in "Clojure style" exhibiting good judgment and taste. Clojure is not an especially difficult language to learn in terms of its constructs and syntax, but for many newcomers, it is difficult to learn how think and solve problems in the natural Clojure way. Furthermore, there are often several features in Clojure with overlapping functionality (e.g., protocols vs multimethods, records vs maps), and this book provides clear guidelines about the tradeoffs and which features are better to use when.
2. The book is quite open about a number of "gotchas" in the language, and helps you avoid those pitfalls.
Overall, the book is the next best thing to pairing with an expert Clojure programmer, and will likely shave months off of your Clojure ramp-up time.
I rated the book 5 stars because there's nothing else on the market that offers exactly what this book does, and I consider this book an important step forward for the Clojure community. However, I should note that the book is by no means perfect. There is still room for improvement:
* Chapter 6 is too high-level, and doesn't give enough specific examples. For example, the chapter talks about the importance in large projects of breaking out protocols, data structures, and implementations into separate namespaces, but doesn't really show how to do this. I personally have found it incredibly difficult to break large projects into separate namespaces without creating cyclic dependencies, and I consider this a real weakness of Clojure. Yet, I've heard Alex Miller and a few others say it's not really a big deal to accomplish this separation of concerns without creating cyclic dependencies. I was truly looking forward to discovering from this book how he pulls that off, figure out what he does differently than I, but the book contained no concrete details on this important matter.
* No discussion of debugging strategies, and what does and does not work for debugging when using Clojure on large-scale projects. Specifically, I expected this book to address the question of how to handle errors in core.async-driven programs. It is not at all obvious how to use channels in a robust way that is fault-tolerant, and given the amount of coverage this book gives to core.async, fault tolerance should also have been covered.
* There were a few random things that I thought were misleading and could benefit from an additional sentence or two of clarification. For example, "The keep function combines the capabilities of map and filter in one convenient package, applying a function to each element and keeping any non-nil results." The problem with this sentence is that if you combine map and filter, you would end up keeping all non-falsey results, not all non-nil results. I think most readers will either not notice the clarifying "non-nil" and think keep works just like map+filter, or they will notice "non-nil" but incorrectly assume that filter behaves the same way and filters out nil values (as opposed to all falsey values).
I have met Alex Miller in person and have taken a couple day course from him (which was absolutely excellent). It isn't surprising to me that this book ended up being as clear in text as he can be in person doing presentations.
Overall I feel like the information from this book is really essential for me as my team moves forward in our Clojure projects. It has helped me get to the next level in my learning and application of Clojure to our projects, and it bridges a lot of gaps for me between several intro tutorials and real-life work.
Anyhow I definitely recommend this book, for me it's a required modest investment in my journey.
or as book to fill holes which possibly has left after reading even some
advanced texts like Joy Of Clojure.
In my case it serves this purpose perfectly. The most helpful stuff for me
was on structuring bigger applications.
As the book states anyway, this should not be your first book on Clojure.