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
57
Introduction to Clojure for Java Devs
pebrc
1
71
Other Decks in Programming
See All in Programming
CSC305 Lecture 08
javiergs
PRO
0
280
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
290
KoogではじめるAIエージェント開発
hiroaki404
1
140
Ktorで簡単AIアプリケーション
tsukakei
0
120
マンガアプリViewerの大画面対応を考える
kk__777
0
410
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
880
Vue 3.6 時代のリアクティビティ最前線 〜Vapor/alien-signals の実践とパフォーマンス最適化〜
hiranuma
2
230
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
450
CSC305 Lecture 09
javiergs
PRO
0
320
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
140
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
160
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Building Adaptive Systems
keathley
44
2.8k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
Fireside Chat
paigeccino
41
3.7k
Writing Fast Ruby
sferik
630
62k
YesSQL, Process and Tooling at Scale
rocio
173
15k
For a Future-Friendly Web
brad_frost
180
10k
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