Book Image

Clojure Reactive Programming

Book Image

Clojure Reactive Programming

Overview of this book

Table of Contents (19 chapters)
Clojure Reactive Programming
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Bibliography
Index

A respondent application


This chapter would not be complete if we didn't go through the whole development life cycle of deploying and using the new framework in a new application. This is the purpose of this section.

The application we will build is extremely simple. All it does is track the position of the mouse using the reactive primitives we built into respondent.

To that end, we will be using the excellent lein template cljs-start (see https://github.com/magomimmo/cljs-start), created by Mimmo Cosenza to help developers get started with ClojureScript.

Let's get started:

lein new cljs-start respondent-app

Next, let's modify the project file to include the following dependencies:

[clojure-reactive-programming/respondent "0.1.0-SNAPSHOT"]
[prismatic/dommy "0.1.2"]

The first dependency is self-explanatory. It's simply our own framework. dommy is a DOM manipulation library for ClojureScript. We'll briefly use it when building our web page.

Next, edit the dev-resources/public/index.html file to...