Skip to Content
Clojure Applied
book

Clojure Applied

by Ben Vandgrift, Alex Miller
August 2015
Intermediate to advanced
220 pages
5h 53m
English
Pragmatic Bookshelf
Content preview from Clojure Applied

Implementing with Component

For each component, we need to consider the required configuration, runtime state, and connections to other components. Once we’ve defined our components and their life-cycle methods, we’ll see how to assemble the components into a running system.

Let’s start with the social media feeds. Each feed needs authentication configuration to connect to the feed. Depending on the system, this can be a username, password, or other access key. We’ll also maintain some runtime state as to whether the feed should be active or paused. Finally, we expect to push new messages on a core.async channel and receive outgoing messages on another channel. We define our component as a record with this information:

 
(​defrecord​ Feed [auth ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Clojure Programming

Clojure Programming

Chas Emerick, Brian Carper, Christophe Grand
Living Clojure

Living Clojure

Carin Meier
Clojure Cookbook

Clojure Cookbook

Ryan Neufeld, Luke VanderHart

Publisher Resources

ISBN: 9781680501476Errata Page