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

Building a stock market monitoring application


Our stock market program will consist of three main components:

  • A function simulating an external service from which we can query the current price—this would likely be a network call in a real setting

  • A scheduler that polls the preceding function at a predefined interval

  • A display function responsible for updating the screen

We'll start by creating a new leiningen project, where the source code for our application will live. Type the following on the command line and then switch into the newly created directory:

lein new stock-market-monitor
cd stock-market-monitor

As we'll be building a GUI for this application, go ahead and add a dependency on Seesaw to the dependencies section of your project.clj:

[seesaw "1.4.4"]

Next, create a src/stock_market_monitor/core.clj file in your favorite editor. Let's create and configure our application's UI components:

(ns stock-market-monitor.core
  (:require [seesaw.core :refer :all])
  (:import (java.util.concurrent...

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