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
250
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
230
Other Decks in Programming
See All in Programming
株式会社ゼネテック
genetec
0
130
Try creating your own orderedmap
kazamori
1
290
GoでParserを書く
karupanerura
3
450
Powerfully Typed TypeScript
euxn23
4
1.8k
Enjoy Creative Coding with Ruby (RubyKaigi2024)
chobishiba
0
1k
Good first issues of TypeProf
mame
4
920
How to implement a RubyVM with PHP?
memory1994
PRO
2
1.1k
HonoのRPCで真の型安全が欲しかった
kosei28
1
160
スタックトレース始めてみた
kuro_kurorrr
5
1.2k
JS RPCを理解する
yusukebe
5
310
RailsConf 2024: Riffing on Rails: sketch your way to better designed code
kaspth
1
220
欠陥を早期に発見するための Software Engineer in Test とその重要性 / What is Software Engineer in Test and How they works
orgachem
PRO
19
2.5k
Featured
See All Featured
KATA
mclloyd
16
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
84
45k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Code Reviewing Like a Champion
maltzj
516
39k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
9
1.3k
Building Effective Engineering Teams - LeadDev
addyosmani
33
1.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.7k
Web Components: a chance to create the future
zenorocha
306
41k
Ruby is Unlike a Banana
tanoku
96
10k
How GitHub (no longer) Works
holman
305
140k
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