Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Om/React.js/Clojurescript: An introduction
Search
Peter Brachwitz
May 21, 2014
Programming
1
290
Om/React.js/Clojurescript: An introduction
An introduction to Om/React.js/ClojureScript
Peter Brachwitz
May 21, 2014
Tweet
Share
More Decks by Peter Brachwitz
See All by Peter Brachwitz
Core.async
pebrc
0
58
Introduction to Clojure for Java Devs
pebrc
1
71
Other Decks in Programming
See All in Programming
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.8k
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
900
Inside of Swift Export
giginet
PRO
1
250
KoogではじめるAIエージェント開発
hiroaki404
1
220
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
contribution to astral-sh/uv
shunsock
0
570
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.2k
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
250
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
300
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.3k
EMこそClaude Codeでコード調査しよう
shibayu36
0
510
ビルドプロセスをデバッグしよう!
yt8492
0
170
Featured
See All Featured
Side Projects
sachag
455
43k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Agile that works and the tools we love
rasmusluckow
331
21k
RailsConf 2023
tenderlove
30
1.3k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
How to Ace a Technical Interview
jacobian
280
24k
Code Review Best Practice
trishagee
72
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Transcript
OM AN INTRODUCTION / Peter Brachwitz @p_brc
WHAT? ... WHY? A new way of building web UIs
using Facebook's new React.js library ... but in ClojureScript with added "functional" benefits.
PARTIES INVOLVED 1. ClojureScript 2. React.js 3. Om
CLOJURESCRIPT A Clojure compiler that emits JavaScript code
Its output can be optimized with Google's Closure compiler
ALL OF CLOJURE? Almost. Excluded are the bits that don't
make sense in a JavaScript environment.
THINGS THAT WON'T WORK: Concurrency : Refs, Agents Data types:
BigDecimal, BigInteger, Ratio Host (Java, CLR) IO related things: *out* Full list of differences on GitHub
REACT.JS? A JavaScript library for building user interfaces
MVC? No.
MVP? No.
MVVM? No.
SIMPLE Just the view. No models. No controllers.
REACTIVE Data flow into the UI
FAST Let v be a virtual DOM dif f (
, ) = Δ v 0 v 1
WHY? JavaScript is fast DOM mutation is slow Minimize DOM
mutation and gain performance
OM A ClojureScript interface to React.js written by David Nolen
IMMUTABLE, PERSISTENT DATA STRUCTURES Snapshots, Undo, efficient rendering
xs d b g a c f h ys d'
g' f' e Source http://en.wikipedia.org/wiki/File:Purely_functional_tree_after.svg
TYPICALLY: CENTRALIZED APPLICATION STATE Using Clojure's atom (CAS) and om's
transact!
NO (VIEW) MODELS Cursors into global application state
LET'S LOOK AT SOME CODE!
SOURCES Om on Github Basic Om Tutorial React on Github
Comparing JavaScript and ClojureScript A ClojureScript tutorial by David Nolen