Overview

Our example project will be an implementation of tic-tac-toe. The main components of the stack are

  • ClojureScript, along with the excellent shadow-cljs.
  • clara-rules will serve as the forward-chaining rules engine.
  • The DSL and some extensions to clara-rules defined in the maali project. Maali also makes heavy use of Clojure spec to enforce constraints around the data supplied to the rules engine.
  • rum for rendering the UI. rum is ClojureScript wrapper around React.

We made these choices because they are convenient, and other than the use of spec, nothing we do here is particularly specific to Clojure(Script). Replace ClojureScript with the client language of your choice, assuming there exists an implementation of a rules engine. Multiple implementations exist for JavaScript, such as rule-reactor, so pretty much any language that runs on the JS runtime is fair game. maali contains minor extensions to clara-rules, and isn't even strictly necessary. rum is a thin wrapper around ReactJS, replace as you like, and as we'll see there's nothing even specific to ReactJS (or even the HTML/JS/CSS stack) in R³. Even our use of Clojure spec is much more in line with static typing practices. So we expect the ideas discussed here are easily portable to other stacks.

results matching ""

    No results matching ""