goo’ ERB ❖ Javascript rules over the web ❖ Web does not work without JS ❖ http://tobyho.com/ 2010/03/11/how-much-of-the- web-actually/ ❖ In fact, you are limited to StackOverflow, Amazon and Google Search
goo’ ERB ❖ Javascript rules over the web ❖ Web does not work without JS ❖ http://tobyho.com/2010/03/11/ how-much-of-the-web-actually/ ❖ In fact, you are limited to StackOverflow, Amazon and Google Search ❖ Actually, only paranoids disable JS in 2017
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write ❖ Roda
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write ❖ Roda - a challenger appears. No one noticed
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write ❖ Roda - a challenger appears. No one noticed ❖ Rack
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write ❖ Roda - a challenger appears. No one noticed ❖ Rack - maybe easier to rewrite the whole stack from scratch?
(rails-api). Still Rails. Still boring. Still overbloated. ❖ Sinatra is a new shiny OH WAI~~. A little too big ❖ Microframeworks like Cuba, NYNY - too much to write ❖ Roda - a challenger appears. No one noticed ❖ Rack - maybe easier to rewrite the whole stack from scratch? (And end up with buggy unfinished Rails)
Sean Cribbs ❖ More than 5 years old ❖ Still alive! Last commit - on 30 Jan 2017 ❖ 13 issues opened and 80 closed ❖ Author works with Erlang, Ruby and Elixir
Sean Cribbs ❖ More than 5 years old ❖ Still alive! Last commit - on 30 Jan 2017 ❖ 13 issues opened and 80 closed ❖ Author works with Erlang, Ruby and Elixir ❖ github://webmachine/webmachine-ruby.git
machine ❖ Each request is a flow through this state machine ❖ Most requests are pretty standard ❖ Functional behavior is more suiting case for this ❖ Define standards and override only needed things
predefined procedure. They are not your bros ❖ Webmachine determines facts about requests ❖ Uses finite state machine to determine proper response ❖ Each fact can easily be tested
predefined procedure. They are not your bros ❖ Webmachine determines facts about requests ❖ Uses finite state machine to determine proper response ❖ Each fact can easily be tested ❖ Webmachine is your bro
application/json" -u test -p test ❖ Does route /kudos/:id exist? ❖ Does resource with ID 1 exist? ❖ Is this user with this password allowed to execute this request on resource?
application/json" -u test -p test ❖ Does route /kudos/:id exist? ❖ Does resource with ID 1 exist? ❖ Is this user with this password allowed to execute this request on resource? ❖ Can this method be called for this resource?
application/json" -u test -p test ❖ Does route /kudos/:id exist? ❖ Does resource with ID 1 exist? ❖ Is this user with this password allowed to execute this request on resource? ❖ Can this method be called for this resource? ❖ Can this resource be rendered with this content type?
def content_types_provided [["application/json", :to_json]] end def resource_exists? kudo # Truthy or falsey end def to_json kudo.to_json end private def kudo @kudo ||= Kudo.find(id) end def id request.path_info[:id] end end