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
280
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
Ruby's Line Breaks
yui_knk
2
520
Going Structural with Named Tuples
bishabosha
0
200
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
470
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
270
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
740
custom_lintで始めるチームルール管理
akaboshinit
0
210
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
170
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
200
PHPで書いたAPIをGoに書き換えてみた 〜パフォーマンス改善の可能性を探る実験レポート〜
koguuum
0
140
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
170
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
1k
趣味全開のAITuber開発
kokushin
0
200
Featured
See All Featured
Producing Creativity
orderedlist
PRO
344
40k
Being A Developer After 40
akosma
91
590k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Six Lessons from altMBA
skipperchong
27
3.7k
Code Review Best Practice
trishagee
67
18k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
520
Facilitating Awesome Meetings
lara
54
6.3k
Navigating Team Friction
lara
184
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.2k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
The Invisible Side of Design
smashingmag
299
50k
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