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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Peter Brachwitz
May 21, 2014
Programming
300
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Om/React.js/Clojurescript: An introduction
An introduction to Om/React.js/ClojureScript
Peter Brachwitz
May 21, 2014
More Decks by Peter Brachwitz
See All by Peter Brachwitz
Core.async
pebrc
0
78
Introduction to Clojure for Java Devs
pebrc
1
90
Other Decks in Programming
See All in Programming
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
2
220
Vite+ Unified Toolchain for the Web
naokihaba
0
330
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.5k
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.7k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
730
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
120
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Oxcを導入して開発体験が向上した話
yug1224
4
330
Creating Composable Callables in Contemporary C++
rollbear
0
160
1B+ /day規模のログを管理する技術
broadleaf
0
110
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
52k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
My Coaching Mixtape
mlcsv
0
150
Amusing Abliteration
ianozsvald
1
210
How STYLIGHT went responsive
nonsquared
100
6.2k
30 Presentation Tips
portentint
PRO
1
330
How to build a perfect <img>
jonoalderson
1
5.7k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
440
How GitHub (no longer) Works
holman
316
150k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
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