Clojure Cookbook

Book description

With more than 150 detailed recipes, this cookbook shows experienced Clojure developers how to solve a variety of programming tasks with this JVM language. The solutions cover everything from building dynamic websites and working with databases to network communication, cloud computing, and advanced testing strategies. And more than 60 of the world’s best Clojurians contributed recipes.

Each recipe includes code that you can use right away, along with a discussion on how and why the solution works, so you can adapt these patterns, approaches, and techniques to situations not specifically covered in this cookbook.

  • Master built-in primitive and composite data structures
  • Create, develop and publish libraries, using the Leiningen tool
  • Interact with the local computer that’s running your application
  • Manage network communication protocols and libraries
  • Use techniques for connecting to and using a variety of databases
  • Build and maintain dynamic websites, using the Ring HTTP server library
  • Tackle application tasks such as packaging, distributing, profiling, and logging
  • Take on cloud computing and heavyweight distributed data crunching
  • Dive into unit, integration, simulation, and property-based testing

Clojure Cookbook is a collaborative project with contributions from some of the world’s best Clojurians, whose backgrounds range from aerospace to social media, banking to robotics, AI research to e-commerce.

Book content

Chapter 1. Primitive Data
Chapter 2. Composite Data
Chapter 3. General Computing
Chapter 4. Local I/O
Chapter 5. Network I/O and Web Services
Chapter 6. Databases
Chapter 7. Web Applications
Chapter 8. Performance and Production
Chapter 9. Distributed Computation
Chapter 10. Testing

About Author, Q&A with Ryan Neufeld, co-author of "Clojure Cookbook" Q. Why is the this book important right now? More so now, than ever before, Clojure and its community are expanding and growing. As simple tools and techniques are developed and composed higher and higher, it’s important to have a strong foundation both intellectually and pragmatically. Clojure Cookbook is a great tool for developing upon both those axes; its recipes provide quick, useful solutions, while diving deep on why and how. Q. What do you hope your readers walk away with? Readers of Clojure Cookbook are going to walk away with a strong sense of how to apply Clojure’s functional techniques in a practical manner and a solid, long-term resource for kick-starting solutions Q. What’s the most exciting or important thing happening in your space? Web development in Clojure is really taking off on two fronts. On one hand, the ecosystem is broadening and getting more stable and easy to approach. On the other hand, exciting new tools and techniques are breaking onto the scene, including core. async, React/om, and Hoplon.

Ebooks download available as