I’ve been playing around with merb [1] recently (version 0.4 was released last week [2]). Merb is a small ruby MVC web framework. It concentrates on providing a small core of features and leaves it up to you to do the rest either through plugins or custom code. For example, it doesn’t provide a database ORM layer but you can can use ActiveRecord, DataMapper, or Sequel by selecting the appropriate plugin. The Merb code is small and easy to understand. One of the nice things about it is that you can dive in and understand what’s going on in a very short amount of time.
From initial impressions, what I like so far:
- Small, easy to understand, clean code.
- Mailers make a lot more sense than in Rails
- Parts: the return of components
- Agnostic with regard to database ORM and templating language
- A more flexible routing system than rails
- Better handling of file uploads than rails
- ‘provides’ method for handling multiple content types is nice
Looking at the latest release it looks like merb has reached a state where it’s a viable framework for building your entire application (rumour has it that hulu.com is built on merb). Other uses that I’ve heard of are to combine merb with a rails application to speed it up e.g. using merb to handle file uploads or api calls, but using rails for the other parts of the application.
The downside to merb is that there is very little documentation at the moment. The following are some good resources to get started (Some of it is a little out of date as merb has had a lot of changes over recent months).
Overviews
- Merb (and why you potentially should care) [3]
- Merb features [4]
- High Performance Ruby MVC: Merb [5]
- Merb website [6]
Docs
- merb Rdocs [7]
- Merb wiki [8]
Intro Tutorials
- merb tutorial [9]
- Tutorial: Taking Merb for a Spin [10]
- Merb Crud Controller [11]
A series of articles on why merb is great
- Merb 0.4 — The One That Rocks! [12]
- Merb’s Mailer is Awesome (if I do say so myself) [13]
- Merb’s Parts are pretty rocking too [14]
- Merb Plugins? Oh yeah… they’re pretty frickin’ cool too [15]
File uploads
- File Uploads via Merb inside a Rails Application = part 1 [16], part 2 [17]
- ROR File Uploading Using EC2, S3, and MERB! [18]
- File Uploads in Merb versus Rails [19]
Misc
- Testing Various Configurations of Rails, Merb, Swiftiply, and Nginx [20]
- Merb 0.4 - Installing Edge Merb and using new Generators [21]
- rSpec on Merb! [22]