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
Webmachine (Ruby)
Search
Paweł Pacana
March 12, 2013
Programming
1
260
Webmachine (Ruby)
presented on KRUG
Paweł Pacana
March 12, 2013
Tweet
Share
More Decks by Paweł Pacana
See All by Paweł Pacana
DRUG Facts
pawelpacana
2
240
Other Decks in Programming
See All in Programming
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.9k
선언형 UI에서의 상태관리
l2hyunwoo
0
270
情報漏洩させないための設計
kubotak
5
1.3k
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
570
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.2k
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
テストコード書いてみませんか?
onopon
2
340
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
13
2.3k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
96
5.3k
Optimising Largest Contentful Paint
csswizardry
33
3k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Rails Girls Zürich Keynote
gr2m
94
13k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Practical Orchestrator
shlominoach
186
10k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Visualization
eitanlees
146
15k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Building Your Own Lightsaber
phodgson
104
6.2k
Transcript
WEBMACHINE THE HTTP TOOLKIT IN RUBY @pawelpacana
I’m not a native speaker DISCLAIMER
HTTP 1.1 SPEC RFC2616
TOOLKIT • „A toolkit for easily creating well- behaved HTTP
applications” • not a framework • Sinatra vs. Rails • extracted from Riak
RACK INTERFACE app = proc { |env| [ 200, #
Status {'Content-Type' => 'text/plain'}, # Headers ["Hello World!"] # Body ] }
RACK MIDDLEWARE • Head, ContentLength, ContentType, Deflater, …
HTTP IS HARD
WEBMACHINE • FSM modelling HTTP • negotiate hard decisions transparently
HTTP IS RESOURCES • data or service • identified by
URI • representations
WEBMACHINE • resources as a core building block • declare
resources, don’t perform actions • resource callbacks
EXAMPLES show me the code
ADAPTERS • WEBrick • Mongrel • Rack* • Reel •
Hatetepe
ECOSYSTEM • webmachine-test • webmachine-linking • webmachine-actionview • webmachine-sprockets •
irwebmachine
MY OBSERVATIONS • good as HTTP content delivery mechanism in
Ports and Adapters architecture • good for Hypermedia APIs • small enough to read and trust it
GOING DEEPER http://bit.ly/resources-for-real-this-time
THANK YOU @pawelpacana
DRUG #40 NEXT MONDAY 19:00 http://drug.org.pl