www.SmarteGuru.com
  Home | Blogs | Recipe | Find a Friend | Discussion Board | Resources | Developers Area | Articles | Health |  Login | Register Now 

Rolling Ruby on rails With Merb framework

Engine Yard, the leader in cloud deployment and open-source tools for Ruby and Rails applications, today announced the first major release of its open-source framework, Merb

Merb is designed for building fast, high performance Ruby applications. Ruby on Rails is more featured while Merb aims to be simpler and more modular.

Built from the ground up and designed for speed, Merb relies on an extensible, pluggable architecture. Though Merb’s code base is kept to the bare minimum, it offers powerful features such as flexible routing, more control over groups of processes, and a coherent maintained stack. Additional features can be plugged into the framework using standard gems. Moreover, Merb is agnostic when it comes to object-relational mapping (ORM) tools, JavaScript libraries, and template languages, thus giving programmers a wide
range of choice.

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.

Merb is tuned for developers who want a higher degree of configurability and modularity than that offered by Rails. Thanks to extensive community involvement and an ever-growing pool of plugins, Merb allows developers working on smaller applications to replicate common Rails tasks with less overhead and a higher degree of customizability.

A key feature in Merb 1.0 is the “Merb Stack,” a gem for fast,out-of-the-box deployment. This lets developers start building new applications immediately, rather than needing to spend time cobbling together a complete stack on their own. In addition, Merb 1.0 is built on a single master process rather than several disparate processes, which allows groups of Merb processes to share memory. This produces more efficient handling of multiple requests over short periods of time and better control over groups of Merb processes.

Features of Merb:

Plugins

Plugins in Merb are implemented as simple gems, which are distributed in the merb-plugins Git repository, by third parties, or via the Merb Plugin Nursery on RubyForge. That means that plugins can take advantage, out of the box, for Rubygems’ versioning and dependency control. Plugins can either be installed to the system’s repository or bundled into the gems directory in an application’s distribution; Merb applications simply add the /gems folder as an alternate repository.

Controllers

Merb’s controllers are made up of two components. First, an AbstractController, which handles layout- and template-finding, instance variable assignment, and before/after filters. Second, a Merb::Controller, which handles request/response semantics. Because the components are separate, it is possible to inherit from AbstractController, which Merb does for Mailers and Parts (again, more on that later).

Controllers also support excellent content-type negotiation. You can specify in your controllers, or in individual actions, what MIME-types should be supported via provides :x ml, :html. Once that information is provided, the controller has a number of ways to automatically render the appropriate content. If a template called foo.html.erb exists, it will automatically be rendered for all content-type text/html, and so on.

Mailers

Merb’s Mailers are implemented on top of AbstractController, so you get all the default controller behavior (including templates, assigns, and before/after filters) for free in the Mailer. But instead of calling render, you call render_mail, which takes options like: render_mail :html => :foo, :text => :bar.

A number of options are supported, including attachments via an #attach method, so you can build up your multi-part mails with attachments and site-wide layouts fairly trivially.

Labels: rails, plugins, applications, processes, stack, controllers, render, framework, abstractcontroller, mailers, content, controller, template, features, building, control, groups, developers, repository, content type, render mail, merb plugins, merb processes, merb core, higher degree, open source

Related Posts

Tags: , , , , , , , , , , , ,


Viewed: 537 views

3 Responses to “Rolling Ruby on rails With Merb framework”

  1. admin Says:

    The rise of Merb comes as Ruby itself is on the ascent, with developer search engine Koders.com claiming that Ruby is now the fourth-most popular language, following Java, C/C+ and C#.

  2. Jeremy Nicoll Says:

    Merb 1.0’s out! I’m excited, it’s such an awesome framework.

  3. admin Says:

    Engine Yard has rolled out Merb, a Web framework designed to be lighter and more agile than Ruby on Rails. One key feature is the “Merb Stack,” a gem for fast, out-of-the-box deployment. Another feature is a single master process rather than several disparate processes, which allows groups of Merb processes to share memory.

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.

Home - About Us - Help - Terms and Conditions - Site Map - Link to Us - Resources - Contact Us
Google Rank Calculator | Suggest developer resource | Suggest Article
All rights reserved © 2007 SmarteGuru.com.