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
310
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
250
Other Decks in Programming
See All in Programming
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
270
AI時代もSEOを頑張っている話
shirahama_x
0
170
関数の挙動書き換える
takatofukui
4
750
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
280
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
Atomics APIを知る / Understanding Atomics API
ssssota
1
210
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
460
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
2.5k
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.3k
Duke on CRaC with Jakarta EE
ivargrimstad
0
240
Private APIの呼び出し方
kishikawakatsumi
3
900
Featured
See All Featured
Optimizing for Happiness
mojombo
379
70k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Pragmatic Product Professional
lauravandoore
36
7k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
For a Future-Friendly Web
brad_frost
180
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Speed Design
sergeychernyshev
33
1.3k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
The Cult of Friendly URLs
andyhume
79
6.7k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6.1k
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