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
300
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
株式会社 Sun terras カンパニーデック
sunterras
0
270
CSC509 Lecture 06
javiergs
PRO
0
260
All About Angular's New Signal Forms
manfredsteyer
PRO
0
110
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
150
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
2.4k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
2
130
What's new in Spring Modulith?
olivergierke
1
140
Software Architecture
hschwentner
6
2.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
dynamic!
moro
10
7.2k
XP, Testing and ninja testing ZOZ5
m_seki
3
600
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
390
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.8k
Automating Front-end Workflow
addyosmani
1371
200k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Making Projects Easy
brettharned
119
6.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Balancing Empowerment & Direction
lara
4
680
A Tale of Four Properties
chriscoyier
160
23k
Building an army of robots
kneath
306
46k
Gamification - CAS2011
davidbonilla
81
5.5k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
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