3 ms·
Rails was a massive innovation [1] because making a CRUD webapp in other contemporary mainstream environments, like Struts, ASP, PHP4, or fresh PHP5, was either
by niftich 9y ago
Rails was a massive innovation [1] because making a CRUD webapp in other contemporary mainstream environments, like Struts, ASP, PHP4, or fresh PHP5, was either unnecessarily repetitive, or filled with having to tinker with external config files that bootstrapped the frameworks and taught the stack how to map the incoming http requests to transactions in your database.
Sinatra was something else entirely; it was a REST router DSL. The two are not, and never were directly comparable, except in the sense that they came up as good answers when someone asked "How do I make a web-exposed application with Ruby?". It's unfortunate how often they're compared, when they were both revolutionary in their respective categories, and both went on to inspire many other frameworks in other languages that borrowed their ideas.
[1] https://news.ycombinator.com/item?id=12763681 https://news.ycombinator.com/item?id=12763681
- grandalf 9y agoBefore I heard about rails (pre 1.0) I had been doing some stuff in PHP that was quite similar to Rails simply as my preferred convention. So when I saw Rails the thing I was most impressed by was Ruby, a very nice (aesthetically) language. It took me longer to realize that I would prefer not to use ActiveSupport or to allow any of the monkey patching and metaprogramming-because-i-can that became en vogue in the Rails community for a while. I think that if DHH had known about REST sooner, Rails controller layer would have been identical to Sinatra. The convention for building controller classes in Rails involves several more layers of indirection than Sinatra... the routes.rb file becomes a lookup table for classes whose names all fit a pattern that the programmer should not have to be aware of. The flexibility of the router is still nothing beyond what Sinatra accomplishes with its matching DSL.