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 (informit.com/ruby), ISBN 0321606388, Copyright 2009 Pearson Education, Inc. Safari Books Online subscribers can access the book here: http://safari.informit.com/9780321601636.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS