Working with Modeled Objects in Merb

Working with Modeled Objects in Merb

he new Merb MVC framework offers developers exceptional scalability, agility, flexibility, and performance, particularly developers who have been working with Ruby and Rails. In The Merb Way, author Foy Savas has written a comprehensive guide to using, extending, and deploying Merb. The book covers everything developers need to know to build production-quality Merb applications, offering code examples to jumpstart virtually any project.

Within the scope of a typical Merb application, examples of modeled objects may include users, posts, entries, or comments. These objects are most often persisted in a database through the use of an object-relational mapper (ORM). The default ORM included as part of the standard Merb stack is DataMapper, an ActiveRecord-like ORM that aims to push the boundaries of object/data interaction even more significantly toward the object side.

Chapter 5 of The Merb Way shows you how to work with modeled objects in Merb. Given its acceptance as part of the standard Merb stack, the chapter covers the use of only DataMapper. However, as agnosticism is central to Merb’s design, application developers are free to integrate whatever Ruby ORM they may need. For example, you can use ActiveRecord, Sequel, or any of the other options; each of these ORMs is capable of creating, retrieving, updating, and deleting persisted data and is fully supported by the Merb core.

Read an excerpt of “Chapter 5: Models” from The Merb Way.

Editor’s Note: This excerpt is from the new book, The Merb Way, authored by Foy Savas, published by Addison-Wesley Professional as part of The AW Professional Ruby Series (, ISBN 0321606388, Copyright 2009 Pearson Education, Inc. Safari Books Online subscribers can access the book here:

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of