Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the limit of Sinatra?

I've been learning the Ruby web framework Sinatra lately, and I'm finding it great to use. Most of the articles and blogs I have read about it seem to assume that it is good only for small websites, or 'tiny' web-apps. Is this true? Can a complete web application be built in Sinatra, or is Ruby on Rails the way to go?

like image 404
bennybdbc Avatar asked Jun 18 '10 08:06

bennybdbc


2 Answers

You could, in theory, build an entire web application using Sinatra, and it would offer you more precision control than Ruby on Rails would.

That said, it also removes all of the nice features ruby on rails gives you, such as the Model-View-Controller architecture.

If you're looking to build a web application with database interaction, I strongly advise you use Ruby on Rails.

If you're looking to build a very simple API or something that just takes some data and throws it up onto Twitter or something, go ahead and use Sinatra.

like image 125
Jamie Wong Avatar answered Oct 25 '22 20:10

Jamie Wong


There is no reason that it couldn't be used to build an enterprise website. It's fast and intuitive. Two key things in building a larger web application. While it does lack many of the features of Rails, I am yet to run into a road block.

I personally like the slim nature of Sinatra. It embraces routing instead of making it a headache.

I usually find myself wrestling with Rails, whereas I configure Sinatra to my liking.

As for database interaction, mongo_mapper + Sinatra works very well.

like image 32
agentargo Avatar answered Oct 25 '22 20:10

agentargo