Merb is a discontinued
model–view–controller web framework
A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and ...
in
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called ...
, notable as a precursor to Rails 3. It brought increased focus on speed and modularity to Rails 3.
The name Merb is a contraction of "
Mongrel
A mongrel, mutt or mixed-breed dog is a dog that does not belong to one officially recognized breed and including those that are the result of intentional breeding. Although the term ''mixed-breed dog'' is sometimes preferred, many mongre ...
" and "
Erb
Erb, ERB or ErB may refer to:
People
* Edgar Rice Burroughs (1875–1950), American author
* Erb of Gwent (–), king of Gwent and Glywysing
Surname
* Abraham Erb (1772–1830), American-born Canadian settler
* Albrecht Erb (1628–1714), Aus ...
".
Precursor to and merge with Rails 3
Merb began as a "clean-room" implementation of the
Rails
Rail or rails may refer to:
Rail transport
*Rail transport and related matters
*Rail (rail transport) or railway lines, the running surface of a railway
Arts and media Film
* ''Rails'' (film), a 1929 Italian film by Mario Camerini
* ''Rail'' ( ...
controller stack but grew to incorporate several ideas that deviated from Rails's spirit and methodology at the time, most notably
component modularity, extensible
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
design, and
vertical scalability. It was developed by Ezra Zygmuntowicz and Yehuda Katz. Most of these capabilities were added to Rails during the Rails 3/Merb merger.
Merb was first released at the 2008
RubyConf and development has since stopped; Rails 3 ,therefore, serves as both the successor to Rails 2 and the successor to Merb.
Differences from Ruby on Rails
Merb's design attempted to address several criticisms of
Rails
Rail or rails may refer to:
Rail transport
*Rail transport and related matters
*Rail (rail transport) or railway lines, the running surface of a railway
Arts and media Film
* ''Rails'' (film), a 1929 Italian film by Mario Camerini
* ''Rail'' ( ...
2:
* lack of component modularity (
monolithic design)
* lack of an extensible API
* lack of vertical scalability
Modularity
Merb itself encompassed only the controller layer in
MVC architecture, and used a suite of complementary, optional plugins together to assemble applications. The primary integration points were the web server interface, the model layer, the view layer, and controller extensions and add-ons. Merb's default application stack incorporated
Datamapper In software engineering, the data mapper pattern is an architectural pattern. It was named by Martin Fowler in his 2003 book ''Patterns of Enterprise Application Architecture''. The interface of an object conforming to this pattern would include f ...
for models, ERB for views, and
Rack
Rack or racks may refer to:
Storage and installation
* Amp rack, short for amplifier rack, a piece of furniture in which amplifiers are mounted
* Bicycle rack, a frame for storing bicycles when not in use
* Bustle rack, a type of storage bi ...
and Mongrel as the web server layer.
Well-defined API
Before the Merb / Rails 3 merge, Rails lacked a well-defined, documented, public API for extensions and plug-ins, leading to issues when Rails changes broke
monkey-patches performed by plug-ins. With the Rails 3 / Merb merge, Rails gained a defined public API with a test suite,
giving users and plugin developers a clearer, more stable API to build against, reducing plugin breakage from release to release.
Performance and scalability
Some early versions of Rails received bad publicity for lack of performance, frequently due to developer confusion about ActiveRecord queries.
David Heinemeier Hansson
David Heinemeier Hansson is a Danish programmer, and the creator of the popular Ruby on Rails web development framework and the Instiki wiki. He is also a partner at the web-based software development firm Basecamp.
Hansson co-wrote ''Agil ...
, the creator of Rails, stated that Merb re-wrote many core Rails pieces to be faster,
and incorporated those changes from Merb in the Rails 3 merge, promising users that "Rails 3 will get all the performance attention that the Merb guys are known for".
References
External links
Merbivore - Official Merb Site
{{Application frameworks
Free computer libraries
Free software programmed in Ruby
Web frameworks
Software using the MIT license