News

New Ruby Framework Offers Modular Approach

Engine Yard releases Merb, a new open source Web framework for building Ruby applications.

Engine Yard last month released the community version of a new Web framework for building Ruby applications. Dubbed Merb, the open source framework written in Ruby is "super-light and super-fast," according to the company, which is positioning it as an alternative to Rails.

Both Merb and Rails are model-view-controller (MVC) frameworks, but where Rails is monolithic, the Merb architecture is modular. It's based on an extensible, pluggable architecture, and the code base was kept to the bare minimum.

This modularity is the key difference between the two, and the need for it among Ruby developers was the driver behind the project's creation, explains Engine Yard's Yehuda Katz, chief maintainer of the Merb project. Katz, who works full time on Merb application development, sees the framework's modularity as a missing level of flexibility that Ruby developers need as they move into the enterprise and the cloud.

"Rails is great for getting up and running with an app that other people have built before using known technologies," Katz says. "It's highly tuned for specific cases. But once you get out of that zone, you have to fight with Rails quite a bit."

More Choices
Merb also provides developers working on smaller applications with a way to replicate common Rails tasks with less overhead and a higher degree of customizability, Katz says. The Merb architecture is object-relational-mapping-agnostic, and gives coders a wide range of choices among JavaScript libraries and template languages, he adds. Merb offers flexible routing and better control over groups of processes, and additional features can be plugged into the framework using standard gems. (RubyGems is a Ruby packaging system that provides a standard format for distributing Ruby programs and libraries.)

"This isn't one giant framework here," Katz continues, "so it's easy to opt out and just use the pieces you need."

More Efficiency
Another feature of the current Merb 1.0 release, Katz points out, is the "Merb Stack," a coherent, maintained stack designed to allow developers to start building new applications immediately; there's no time wasted putting together a complete stack of their own. Also, Merb 1.0 is built on a single master process, rather than several disparate processes. That approach makes it possible for groups of Merb processes to share memory. That memory-sharing capability leads to more efficient handling of multiple requests over short periods of time, Katz explains, and also to better control over groups of Merb processes.

Quote from Yehuda Katz, Chief Maintainer Merb Project, Engine Yard

San Francisco-based Engine Yard is also responsible for Rubinius, an open source virtual machine for running Ruby programs and a Ruby core library.

Merb is licensed under the MIT license. "Merb started out about two years ago as a little hack," Katz says. "As a fledgling project that went a little beyond the hack, we wanted to encourage adoption. We thought that this license would be better for enterprise adoption than the GPL [General Public License]. We didn't want people to be scared of the license."

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events