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
Single Page Webapps in ClojureScript with Pedestal
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tero Parviainen
August 28, 2013
Technology
4
89k
Single Page Webapps in ClojureScript with Pedestal
Including a Clojure Cup status report.
Presented at ClojuTRE 2013, August 28 at Tampere, Finland.
Tero Parviainen
August 28, 2013
Tweet
Share
More Decks by Tero Parviainen
See All by Tero Parviainen
Hot Loading in Angular 2
teropa
0
100
Refactoring Angular Apps to Components (HelsinkiJS 11/15)
teropa
1
430
Immutable Java
teropa
4
7.8k
Clojure Cup Update
teropa
0
180
Vältä sulkeutuneen softan toimittajaloukut
teropa
2
330
Clojure: An Introduction
teropa
11
380
The Age of Our Mutant Overlords is Over
teropa
11
20k
Other Decks in Technology
See All in Technology
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.1k
2026-02-25 Tokyo dbt meetup プロダクトと融合したCI/CD で実現する、堅牢なデータパイプラインの作り方
y_ken
0
170
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
大規模な組織におけるAI Agent活用の促進と課題
lycorptech_jp
PRO
5
7.7k
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
22k
型を書かないRuby開発への挑戦
riseshia
0
150
WBCの解説は生成AIにやらせよう - 生成AIで野球解説者AI Agentを実現する / Baseball Commentator AI Agent for Gemini
shinyorke
PRO
0
320
パネルディスカッション資料 (at Tableau Now! - 2026-02-26)
yoshitakaarakawa
0
1k
Kiro のクレジットを使い切る!
otanikohei2023
0
110
マルチロールEMが実践する「組織のレジリエンス」を高めるための組織構造と人材配置戦略
coconala_engineer
2
300
AWS CDK の目玉新機能「Mixins」とは / cdk-mixins
gotok365
2
320
自動テストが巻き起こした開発プロセス・チームの変化 / Impact of Automated Testing on Development Cycles and Team Dynamics
codmoninc
1
940
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
250
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
130
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.3k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
310
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
So, you think you're a good person
axbom
PRO
2
1.9k
The SEO Collaboration Effect
kristinabergwall1
0
380
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Transcript
Clojure and ClojureScript programming competition September 28-29 Signup opens September
7, 03:00 EEST clojurecup.com @clojurecup
@abedra @amitrathore @marick @cemerick @ibdknox @chrishouser @cgrand @lisperati @swannodette @deanwampler
@garybernhardt @hlship @weavejester @w01fe @antiheroine @nrrrdcore @lynaghk @michaelklishin @bmf @nathanmarz @neal4d @usabilitycounts@technomancy @samaaron @venkat_s
None
Help Needed • Monitoring, IRC ops, contestant support during the
competition. • May not participate in compo • Ping me at
[email protected]
Single Page Webapps in ClojureScript with Pedestal Tero Parviainen clojuTRE
2013
Tero Parviainen @teropa Freelance software maker. Clojure, Java, Ruby, JavaScript.
Web, Android, iOS, WP.
tinyurl.com/vertxbook September 2013 Packt Publishing
Webapps: A Personal History
Web Frameworks
AJAX
http://www.flickr.com/photos/andrec/109984452/
Google Web Toolkit
http://www.flickr.com/photos/seattlemunicipalarchives/8284074749/
Single-page
http://hipstergrammers.tumblr.com/
ClojureScript
http://www.flickr.com/photos/32820477@N02/3619048502/
Pedestal
The Hook (ns hello-world (:require [domina :as dom])) (def application-state
(atom 0)) (defn render [old-state new-state] (dom/destroy-children! (dom/by-id "content")) (dom/append! (dom/by-id "content") (str "<h1>" new-state " Hello Worlds</h1>"))) (add-watch application-state :app-watcher (fn [key reference old-state new-state] (render old-state new-state))) (defn receive-input [] (swap! application-state inc) (.setTimeout js/window #(receive-input) 3000)) (defn ^:export main [] (receive-input))
“If you have ever built a ClojureScript application, this is
the way you start.”
None
What Pedestal Is Pedestal Services Pedestal Applications Clojure ClojureScript Web
Services Tooling Browser Applications Tooling
What Pedestal Is Pedestal Applications ClojureScript Browser Applications Tooling
Three Models Google http://domain.com Web Page Title DERP ERP Human
Resources 90% Process Compliance 300Hz Big Data Synergy 20 clouds Data Model Application Model DOM
Data Model {:todos ["one" "two" "three"]}
Application Model {:main {:todos ["one" "two" "three"] :todo-count 3}}
Application Model [:node-create [] :map] [:node-create [:main] :map] [:node-create [:main
:todos] :map] [:value [:main :todos] nil ["one" "two" "three"]] [:node-create [:main :todo-count] :map] [:value [:main :todo-count] nil 3] Deltas
DOM <h2> 3 ToDos </h2> <ul> <li>one</li> <li>two</li> <li>three</li> </ul>
Verbs over Nouns Data Model Messages User actions HTTP responses
SSEs WebSocket input Timer events Transforms Transforms
Verbs over Nouns Application Model Data Model Transforms Data Flow
Verbs over Nouns DOM Application Model Render Google http://domain.com Web
Page Title DERP ERP Human Resources 90% Process Compliance 300Hz Big Data Synergy 20 clouds
Decoupling http://www.flickr.com/photos/marfis75/5983944342/
Models from Processes Data Model Messages User actions HTTP responses
SSEs WebSocket input Timer events Transforms Transforms Pure functions
Models from Processes Application Model Data Model Transforms Data Flow
Pure functions
Messages from Events Data Model Messages User actions HTTP responses
SSEs WebSocket input Timer events Transforms Transforms Simulated Simulated Simulated Simulated Simulated
App Model From DOM Data UI Application Model Render Google
http://domain.com Web Page Title :metrics :human-resources :compliance :big-data-synergy Automated {:amt 90 :unit “%”} {:amt 300 :unit “Hz”} {:amt 20 :unit “Clouds”}
Dispatch from Execution Messages Transforms Data Flow Data Model Application
Model Rendering DOM Input Queue App Model Queue
Dispatch from Execution Messages Transforms Data Flow Data Model Application
Model Rendering DOM Input Queue App Model Queue Foreground Background Web Worker
Code
Resources https://github.com/pedestal/app-tutorial/ http://pedestal.io/ twitter.com/teropa