I like Rails. I like Web services. I even like making a strong distinction between GET and POST for all the standard reasons. However, I do not like the REST religion. It's a simple fact of life that Web browsers don't currently support DELETE and PUT. Rails compensates for this by passing a parameter _method=DELETE. The REST religion contends that REST is simple because it cooperates with how the Web is supposed to work. However, the Web as most people use it is browser-based, and my current browser doesn't support DELETE and PUT. In fact, I'm going to have to deal with browsers that don't support DELETE and PUT for many years to come. Hence, Rails' use of _method=DELETE is a HACK in order to try to force the Web to be something it isn't, all the while claiming that RESTful routing is the way the Web is meant to work. Nowhere is this more evident than in this code: <%= link_to "Delete", project_path(@project), :method => :delete %&
This is a purely technical blog concerning topics such as Python, Ruby, Scala, Go, JavaScript, Linux, open source software, the Web, and lesser-known programming languages.
Ad maiorem Dei gloriam inque hominum salutem.