Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Clojure Reactive Programming
  • Toc
  • feedback
Clojure Reactive Programming

Clojure Reactive Programming

By : Leonardo Borges
4.3 (13)
close
Clojure Reactive Programming

Clojure Reactive Programming

4.3 (13)
By: Leonardo Borges

Overview of this book

If you are a Clojure developer who is interested in using Reactive Programming to build asynchronous and concurrent applications, this book is for you. Knowledge of Clojure and Leiningen is required. Basic understanding of ClojureScript will be helpful for the web chapters, although it is not strictly necessary.
Table of Contents (13 chapters)
close
11
B. Bibliography
12
Index

A minimal CES framework


Before we get start on the details, we should define at a high level what minimal means.

Let's start with the two main abstractions our framework will provide: behaviors and event streams.

If you can recall from Chapter 1, What is Reactive Programming?, behaviors represent continuous, time-varying values such as time or a mouse position behavior. Event streams, on the other hand, represent discrete occurrences at a point in time T, such as key press.

Next, we should think about what kinds of operations we would like to support. Behaviors are fairly simple so at the very minimum we need to:

  • Create new behaviors

  • Retrieve the current value of a behavior

  • Convert a behavior into an event stream

Event streams have more interesting logic in play and we should at least support these operations:

  • Push/deliver a value down the stream

  • Create a stream from a given interval

  • Transform the stream with the map and filter operations

  • Combine streams with flatmap

  • Subscribe to a stream

This is a...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete