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
290
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
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
390
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
2
430
Global Azure 2025 @ Kansai / Hyperlight
kosmosebi
0
140
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
240
flutter_kaigi_mini_4.pdf
nobu74658
0
150
Optimizing JRuby 10
headius
0
580
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
3
5.3k
はじめてのPDFKit.pdf
shomakato
0
100
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
600
「理解」を重視したAI活用開発
fast_doctor
0
300
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
5.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
The Invisible Side of Design
smashingmag
299
50k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
GitHub's CSS Performance
jonrohan
1031
460k
The Cult of Friendly URLs
andyhume
78
6.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.6k
Statistics for Hackers
jakevdp
799
220k
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