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.