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
270
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
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
CI改善もDatadogとともに
taumu
0
120
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
390
Domain-Driven Transformation
hschwentner
2
1.9k
sappoRo.R #12 初心者セッション
kosugitti
0
250
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
280
SpringBoot3.4の構造化ログ #kanjava
irof
2
1k
Pulsar2 を雰囲気で使ってみよう
anoken
0
240
GoとPHPのインターフェイスの違い
shimabox
2
190
Featured
See All Featured
The Language of Interfaces
destraynor
156
24k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Writing Fast Ruby
sferik
628
61k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
440
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
The Pragmatic Product Professional
lauravandoore
32
6.4k
For a Future-Friendly Web
brad_frost
176
9.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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