Merb vs Ruby on Rails
From WikiVS, the open comparison website
| Merb | Ruby on Rails | |
|---|---|---|
| VS
|
|
| http://www.merbivore.com/ | http://rubyonrails.org/ |
Merb and Ruby on Rails are MVC web application frameworks written in and for Ruby. Both have similar directory structures and concepts. Ruby on Rails is more featured while Merb aims to be simpler and more modular.
Contents |
[edit] Focus
Rails is focused on rapid development for the web programmer. This means that oft-requested features and helpers are included in Rails itself or in a plugin. Also, this means that Rails comes configured in "the Rails way," which emphasizes convention. Because Rails comes bundled with so many tools and functions, the web programmer can focus more on his business logic and design rather than on how to implement the logic and the design.
Merb is focused on speed and extensibility. These two factors are the most complained about "problems" with Ruby on Rails. Users who would want a faster, leaner server should go for Merb since less time is spent inside the framework stack and more in the users' code. Merb, although similar in structure to Rails, provides less of the helpers in its core (called merb-core). Merb-core only includes the basic necessities for building an MVC web server. In fact, it doesn't even come with an ORM for the "M" in "MVC."
[edit] Speed
Merb intentionally is lighter than Rails and thus is faster. Faster means that processing time is spent less inside Merb's code and more inside the users' own code; users' own code is still executed at the same speed.
[edit] Stability
Rails is at version 2.1.0 and is very stable. There are currently many production servers using Rails. Not as many use Merb for production servers as it is still in version 0.9.2, and many changes are in line for the pre-1.0 release that might break backwards compatibility.
[edit] Modularity
Both Merb and Rails support plugins. Although the plugin structure is different for Merb and Rails, Merb can also use Rails plugins where applicable.
Rails includes more features and helpers in its core, while Merb separates all non-basic functionality into merb-more.
Like Ruby on Rails, Merb is an MVC framework. Unlike Rails, Merb is ORM-agnostic, JavaScript library agnostic, and template language agnostic, preferring plugins that add in support for a particular feature rather than trying to produce a monolithic library with everything in the core. In fact, this is a guiding principle of the project, which has led to third-party support for the ActiveRecord, DataMapper, and Sequel ORMs.
— Merb , http://www.merbivore.com/
[edit] Commands
| Action | Ruby on Rails | Merb |
|---|---|---|
| Create new application 'app1' | rails app1 | merb-gen app1 |
| Start server | script/server start | merb |
| Start cluster of 3 beginning at port 3000 | N/A | merb -p 3000 -c 3 |
| Interactive console | script/console | merb -i |
[edit] File Organization
| Action | Ruby on Rails | Merb |
|---|---|---|
| Routes configuration | config/routes.rb | config/router.rb |
| Server configuration (host, port, authentication, etc.) | config/environment.rb | config/merb.yml |
| Initialization code | config/environment.rb & config/initializers/* | config/init.rb |
| Dependencies (load path, plugins) | config/environment.rb | config/dependencies.rb |
| Plugins | vendor/plugins | gems |
| Migrations | db/migrate | schema/migrations |
| Testing | test | spec & test |
| Public | public | public |
| Models | app/models | app/models |
| Controllers | app/controllers | app/controllers |
| Views | app/views | app/views |
| Helpers | app/helpers | app/helpers |
| Custom Libraries | lib | lib |


BlogMarks
del.icio.us
digg
Furl
reddit
Segnalo
Simpy
Slashdot
Spurl