4 ms·
I really wish Sinatra were more practical for big projects. It's so much more pleasant to work with, but between the speed advantage that Rails gives for doing
by jackowayed 17y ago
I really wish Sinatra were more practical for big projects. It's so much more pleasant to work with, but between the speed advantage that Rails gives for doing a lot of the normal big-app tasks and all the plugins, it seems like Rails is too good for most big apps to make Sinatra a reasonable choice.
I guess if you were doing something very weird, where Rails would really get in the way, it might make sense. And I've seen it end up being a piece of big apps, just not the main web interface.
- thibaut_barrere 17y agoI'm using it exactly for something weird where Rails get in the way - it's truely useful.
- grandalf 17y agoI like it for big apps precisely because of all the stuff that doesn't end up in the app. I have found that I can write 10-20 lines of code and replace just about any plugin, and that makes the app far less complex, particularly when you think of how messy and undisciplined many rails plugins are. I realized that rails offers the biggest benefit if your site uses TONS of forms. It's really not that big a deal to write a few forms by hand, and it makes using client side validation easier and cleaner. I also love datamapper.
- cschneid 17y agoMay I suggest Monk, which is built on top of Sinatra, and provides a nice basis to organize your code.
- jackowayed 17y agoThat's pretty cool. I could see using the dm skeleton for something pretty big. Here's the link for the lazy: http://monkrb.com/ http://monkrb.com/
- donw 17y agoMy Rails app is very likely to be moved on to Sinatra, specifically for this reason. Sinatra's codebase is really only about 1600 lines of Ruby, so it's very easy to understand, and very easy to extend, and it's threadsafe. There just aren't that many moving parts, so there's very little that can go wrong, and there's no hidden magic, which is what has been making my life hell in the Rails 3 beta. Also, Sinatra is fast. I just did a quick benchmark (ab -n 1000 -c 5 -k) on my laptop, and the scores were impressive. In the same rackup server, a bare Rack app did 4932 req/sec, Sinatra did 3169 req/sec, and the Rails 3 beta managed... 214 req/sec.