Clojure Programming Cookbook

Handle every problem you come across in the world of Clojure programming with this expert collection of recipes

Clojure Programming Cookbook

This ebook is included in a Mapt subscription
Makoto Hashimoto, Nicolas Modrzyk

1 customer reviews
Handle every problem you come across in the world of Clojure programming with this expert collection of recipes
$0.00
$20.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785885037
Paperback618 pages

Book Description

When it comes to learning and using a new language you need an effective guide to be by your side when things get rough. For Clojure developers, these recipes have everything you need to take on everything this language offers.

This book is divided into three high impact sections. The first section gives you an introduction to live programming and best practices. We show you how to interact with your connections by manipulating, transforming, and merging collections. You’ll learn how to work with macros, protocols, multi-methods, and transducers. We’ll also teach you how to work with languages such as Java, and Scala.

The next section deals with intermediate-level content and enhances your Clojure skills, here we’ll teach you concurrency programming with Clojure for high performance. We will provide you with advanced best practices, tips on Clojure programming, and show you how to work with Clojure while developing applications.

In the final section you will learn how to test, deploy and analyze websocket behavior when your app is deployed in the cloud. Finally, we will take you through DevOps. Developing with Clojure has never been easier with these recipes by your side!

Table of Contents

Chapter 1: Live Programming with Clojure
Introduction
REPL up!
Working with primitive data types
Using bindings of vars, conditions, loops, and error handling
Using and defining functions
Using third-party libraries
Using namespaces
What's next?
Chapter 2: Interacting with Collections
Introduction
Clojure collections and their basic functions
Accessing and updating elements from collections
Filtering elements from collections
Transforming and sorting collections
Merging and splitting collections
How to become lazy
Chapter 3: Clojure Next
Introduction
Using destructuring techniques
Using functional programming style
Using threading macros
Defining simple macros
Defining more advanced macros
Using protocols
Defining multimethods
Transducers for dummies
Logic programming in Clojure
Chapter 4: File Access and the Network
Introduction
Manipulating files and directories
Manipulating various formats of files - XML, JSON, YAML, and EDN
Making use of Clojure HTTP client
Using queues and topics in the RabbitMQ
Using Kafka
Using MQTT
Streaming access to provide high performance
Using Apache Camel to connect everything
Chapter 5: Working with Other Languages
Introduction
Calling Java methods and accessing Java objects from Clojure
Extending Java superclasses and implementing Java interfaces
Calling Clojure from Java
Calling Scala from Clojure
ClojureCLR
ClojureScript
Chapter 6: Concurrency and Parallelism
Introduction
Solving concurrent problems using Clojure
Distributed actor-based dev with Akka
Using Spyglass and Couchbase to share state between JVMs
Reactive programming with meltdown
Bridging core.async
On Quasar/Pulsar
Chapter 7: Advanced Tips
Introduction
Hacking the Clojure code
Using Reader Conditionals, compile to Clojure, and ClojureScript
Real-time shared development with an REPL
Declarative data descriptions and validations with plumatic/schema
Chapter 8: Web Applications
Introduction
Clojure with Vaadin - easy web widgets
Quickly create a REST API with Liberator
Working with Immutant - reusing infrastructure
Developing with om.next, the next-generation ClojureScript library
Chapter 9: Testing
Introduction
Behavior-driven development
Testing with random inputs and pattern-based testing
Benchmarking with Criterium, performance tips, and other tools
Chapter 10: Deployment and DevOps
Introduction
Riemann - monitoring deliverance and slacking
Deploying Clojure with Docker
Clojure on Amazon Web Services

What You Will Learn

  • Manipulate, access, filter, and transform your data with Clojure
  • Write efficient parallelized code through Clojure abstractions
  • Tackle Complex Concurrency easily with Reactive Programming
  • Build on Haskell abstractions to write dynamic functional tests
  • Write AWS Lambda functions effortlessly
  • Put Clojure in use into your IoT devices
  • Use Clojure with Slack for instant monitoring
  • Scaling your Clojure application using Docker
  • Develop real-time system interactions using MQTT and websockets

Authors

Table of Contents

Chapter 1: Live Programming with Clojure
Introduction
REPL up!
Working with primitive data types
Using bindings of vars, conditions, loops, and error handling
Using and defining functions
Using third-party libraries
Using namespaces
What's next?
Chapter 2: Interacting with Collections
Introduction
Clojure collections and their basic functions
Accessing and updating elements from collections
Filtering elements from collections
Transforming and sorting collections
Merging and splitting collections
How to become lazy
Chapter 3: Clojure Next
Introduction
Using destructuring techniques
Using functional programming style
Using threading macros
Defining simple macros
Defining more advanced macros
Using protocols
Defining multimethods
Transducers for dummies
Logic programming in Clojure
Chapter 4: File Access and the Network
Introduction
Manipulating files and directories
Manipulating various formats of files - XML, JSON, YAML, and EDN
Making use of Clojure HTTP client
Using queues and topics in the RabbitMQ
Using Kafka
Using MQTT
Streaming access to provide high performance
Using Apache Camel to connect everything
Chapter 5: Working with Other Languages
Introduction
Calling Java methods and accessing Java objects from Clojure
Extending Java superclasses and implementing Java interfaces
Calling Clojure from Java
Calling Scala from Clojure
ClojureCLR
ClojureScript
Chapter 6: Concurrency and Parallelism
Introduction
Solving concurrent problems using Clojure
Distributed actor-based dev with Akka
Using Spyglass and Couchbase to share state between JVMs
Reactive programming with meltdown
Bridging core.async
On Quasar/Pulsar
Chapter 7: Advanced Tips
Introduction
Hacking the Clojure code
Using Reader Conditionals, compile to Clojure, and ClojureScript
Real-time shared development with an REPL
Declarative data descriptions and validations with plumatic/schema
Chapter 8: Web Applications
Introduction
Clojure with Vaadin - easy web widgets
Quickly create a REST API with Liberator
Working with Immutant - reusing infrastructure
Developing with om.next, the next-generation ClojureScript library
Chapter 9: Testing
Introduction
Behavior-driven development
Testing with random inputs and pattern-based testing
Benchmarking with Criterium, performance tips, and other tools
Chapter 10: Deployment and DevOps
Introduction
Riemann - monitoring deliverance and slacking
Deploying Clojure with Docker
Clojure on Amazon Web Services

Book Details

ISBN 139781785885037
Paperback618 pages
Read More
From 1 reviews

Read More Reviews