What does it mean to be a micro framework? [closed] What does it mean to be a micro framework? [closed] ruby ruby

What does it mean to be a micro framework? [closed]


There isn't a perfect dictionary definition for "micro framework", but the python micro framework, Flask has a decent explanation here: what does micro mean.

As to whether or not it would be appropriate for a complex website, experience will guide you. As your project grows in complexity, you may find that you outgrow the micro framework, and may prefer something that promotes better code organization in a large project. But if this is a side project, don't let the fear of outgrowing it prevent you from starting with a micro framework that you're comfortable with.


A micro definition: To me, a micro framework does less for you and leaves more freedom on how you write and organize your code.

When using Rails, you pretty much have to use a relational DB and use the conventional naming and directory structure it builds on. It also includes much more functionality out-of-the-box.

Sinatra, on the other hand, lets you have the flexibility you want and pick-and-choose your functionality. For example, I used Sinatra to create a CouchDB-backed website/service while doing so in Rails would have been much more complex.


I'm a big fan of Sinatra and have used it on several small projects. If you don't have a lot routes or resources within the project, it is a good solution. There are also a lot of plugins and helpers out there that will help with the "cookie-cutter" code and reduce your workload (and keep the code-base smaller).

Keep in mind, you don't get things like migrations or models out-of-box. These features can be introduced to your project with ease but you may find yourself reinventing the wheel in a lot of cases.

As I am writing this I am actually porting a Sinatra based project to Rails 3.1. The project started small but slowly became to difficult to manage as I added features over time.