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
Beyond Compojure
Search
ayato
November 10, 2015
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Beyond Compojure
ayato
November 10, 2015
More Decks by ayato
See All by ayato
マイクロサービス内で動くAPIをF#で書いている
ayato0211
1
1.6k
Clojureという言語が私逹にもたらしたもの
ayato0211
6
3.2k
3年間考え続けてきたWebアプリケーションにおけるテストの話
ayato0211
3
310
Re:REPL-Driven Development
ayato0211
3
1.4k
Meta Template Engine
ayato0211
2
1.2k
超変換! Hiccup data structure!!
ayato0211
2
680
About Integrant
ayato0211
0
610
Muscle Assert
ayato0211
0
330
Clojureを用いたWebアプリケーション開発
ayato0211
2
3.2k
Other Decks in Programming
See All in Programming
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
100
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
220
源内ハンズオン概要編
hideg
0
210
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
170
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
今さら聞けない .NET CLI
htkym
0
210
メールのエイリアス機能を履き違えない
isshinfunada
0
250
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
430
Oxlintはいいぞ(続)
yug1224
1
400
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
11
39k
Writing Fast Ruby
sferik
630
63k
Statistics for Hackers
jakevdp
799
230k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
Documentation Writing (for coders)
carmenintech
77
5.5k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
ラッコキーワード サービス紹介資料
rakko
1
4.5M
4 Signs Your Business is Dying
shpigford
187
23k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Transcript
Beyond Compojure @_ayato_p
@_ayato_p
Compojure ͱ • ϧʔςΟϯάϥΠϒϥϦ • ಠࣗͷଋറػߏ • ϧʔτύϥϝʔλͷڧ੍ม • ϚΫϩͰϧʔςΟϯάఆٛ
• ؆୯ʹ͑Δ
͜Μͳײ͡ (ns example.routes (:require [compojure.core :refer [defroutes context GET POST]]))
(defroutes main-routes (GET "/" req (home)) (context "/user" req (GET "/" req (user-index)) (GET "/new" req (user-new)) (GET "/new" req (user-new-post))) (context "/user/:id" [id] (GET "/" req (user-show id)) (GET "/edit" req (user-edit id)) (POST "/edit" req (user-edit-post id))))
Ͱ...?
Πέͯͳ͍ • URI ͷੜ͕ग़དྷͳ͍ • ClojureScript Ͱ࠶ར༻ग़དྷͳ͍ • ֦ு͕͍͠ •
؆୯͚ͩͲγϯϓϧ͡Όͳ͍
ຊʹཉ͍͠ͷ?
ཉ͍͠ͷ • σʔλͱͯ͠ϧʔςΟϯάఆٛग़དྷΔ • URI ͷੜ͕ग़དྷΔ • ֦ு͕؆୯ • γϯϓϧͳͷ
ϧʔςΟϯάϥΠϒϥϦ • Compojure • Moustache • RouteOne • Pedestal •
gudu • secretary • silk • fnhouse • bidi
σʔλͱͯ͠ఆٛग़དྷΔ • Compojure • Moustache • RouteOne • Pedestal •
gudu • secretary • silk • fnhouse • bidi
֦ு͕؆୯ • Compojure • Moustache • RouteOne • Pedestal •
gudu • secretary • silk • fnhouse • bidi
bidi vs silk • ΄ͱΜͲಉ͡ • ΫΤϦʔύϥϝʔλ͖ URI ͷύʔεʹࠩ •
bidi αϙʔτͯ͠ͳ͍ • Έͷ https://carouselapps.com/2015/09/21/bidi-vs-silk/
bidi Λ͏
͋Ε͕͜͏એݴͰ͖Δ (ns example.routes) (def main-routes ["/" {"" :home "/user" {""
:user-index "/new" {:get :user-new :post :user-new-post}} ["/user/" [#"\d+" :id]] {"" :user-show "/edit" {:get :user-edit :post :user-edit-post}}}])
+α • ϋϯυϥʔΛఆٛ͢Δ • c.l.Keyword Λ֦ு͢Δ • ֤ϋϯυϥʔʹϝλσʔλΛՃ͢Δ http://qiita.com/ayato_p/items/8ed4688a4540491e87e0
·ͱΊ • Compojure ͚ͩ͡Όͳ͍ • Compojure ؆୯͚ͩͲউख͕ѱ͍ • bidi
silk ͷΑ͏ͳͷ͍͍͢