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
240
Other Decks in Programming
See All in Programming
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
210
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
120
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
240
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
900
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
250
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
200
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
1
160
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
470
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
NIKKEI Tech Talk#38
cipepser
0
340
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
900
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
A designer walks into a library…
pauljervisheath
209
24k
Documentation Writing (for coders)
carmenintech
76
5.1k
Bash Introduction
62gerente
615
210k
Optimizing for Happiness
mojombo
379
70k
Embracing the Ebb and Flow
colly
88
4.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
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