Skip to content
0:00 / 0:00

#clojurescript#webfui#virtualdom

Functional Client-Side ClojureScript UI Programming with Webfui - Conrad Barski

ClojureTV

111K subscribers • 159 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2013 to 2017.
  • Presented by Conrad Barski
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

10K views13 years ago2 recommendations

Web developmentProgramming languagesLisp and ClojureVue, Svelte, Angular and othersFunctional programming

Conrad Barski introduces Webfui, a library that treats the browser DOM as an immutable Clojure data structure with functional event handlers.

What if the inventor of the web browser had been a Clojure programmer? Probably, client-side web programming would work differently than it does now... but in what ways? For one thing, we might want the DOM to be just a plain old Clojure data structure... but how would we modify it? Also, we might want browser event handlers to be purely functional functions... but what type of data would they return? Finally, how would we do AJAXy stuff, without sacrificing our beautiful functional code to the demons of imperativism? Webfui is a set of libraries that tries to answer these questions. With Webfui, you can pretend your program is actually running inside of this hypothetical Clojure-friendly web browser... and the libraries take care of the rest.

Why it's here

2 people recommend this

What people say. Recommended as an early exploration of the immutable virtual DOM concept in ClojureScript, predating React.

u/yogthosin r/Clojure • Recommends

On “Is the React.js reactive model just spreadsheet programming?”

It's worth noting that there is prior art for the immutable virtual DOM idea in webfui that was presented at the 2012 Clojure Conj. React was announced in 2013 as I recall. Another interesting approach is what Hoplon is doing. It mounts actual DOM components, but the state is managed using a DAG implemented in the javelin library. As the changes propagate through the DAG, the components that need to be repainted are notified.

u/dannysatanin r/Clojure • Recommends

On “Conrad Barski has just added some documentation to WebFUI (angular.js in ClojureScript) library ”

Exactly, his work looks very interesting. They published his talk on WebFUI on ClojureTV channel: link to this video