3 ms·
A few people have already commented that Sinatra is great for quick small projects. One person has mentioned that they prefer it for larger projects. My knee-
by n8agrin 17y ago
A few people have already commented that Sinatra is great for quick small projects. One person has mentioned that they prefer it for larger projects. My knee-jerk reaction to Sinatra for the last year has been that it would be fun for building small apps as well, which got me thinking:
Why wouldn't it be good for large projects?
After reading the current docs, I really don't have a good answer to this question. Anyone have any opinions or thoughts? I know Rails gives you a ton out of the box (for example, 304 etag caching) but how hard could it be to implement that stuff as necessary? More and more I find myself focusing on HTTP as the actionable interface to my model and less as simply an HTML delivery protocol.
- petercooper 17y agoWhy wouldn't it be good for large projects? It is for some, but it doesn't provide enough structure and opinion for some people. With Sinatra, you either need to come up with and fully grok your own structure (always a good thing, IMHO) or a myriad of plugins and middlewares. Sinatra vs Rails is like a house with one big empty space vs a house with predefined rooms ready to decorate. With Sinatra, you need to be much more of an "architect" than you need to be with Rails. I'd much rather define my own walls and internal structures and Sinatra lets me do that more easily than Rails does.
- adriand 17y ago> With Sinatra, you either need to come up with and fully grok your own structure (always a good thing, IMHO) or a myriad of plugins and middlewares. This is a good assessment. If it's a big project with a lot of CRUD on a large variety of models in a complex database, by the time you'd added all the stuff to Sinatra that would be useful, you'd have recreated Rails. You could still very much use Sinatra for a large project, but it would be best for a large project that is not a standard CRUD- and form-heavy web app. For example, if you wanted to build, say, an online video encoding service.
- jamesbritt 17y ago"Sinatra vs Rails is like a house with one big empty space vs a house with predefined rooms ready to decorate. With Sinatra, you need to be much more of an "architect" than you need to be with Rails. " That's why Ramaze has hit the sweet spot for me. Hyper-fast and feature complete.
- bmizerany 17y agoSinatra has had etag support for years; longer than Rails (http://bit.ly/9rBLut http://bit.ly/9rBLut now http://bit.ly/d3ir1T http://bit.ly/d3ir1T). Sinatra is well suited for large apps. I suggest using it for them. :)
- n8agrin 17y agoAwesome and thank you for the relevant links!