Programming Books C Java PHP Python Learn more Browse Programming Books
Enterprise Rails and over one million other books are available for Amazon Kindle. Learn more
  • List Price: $44.99
  • Save: $10.91 (24%)
FREE Shipping on orders over $35.
In Stock.
Ships from and sold by
Gift-wrap available.
Enterprise Rails has been added to your Cart
Condition: :
Comment: Paperback. Cover shows signs of wear to the edges. corners and spine. Binding tight. Pages clean.
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Enterprise Rails Paperback – November 3, 2008

ISBN-13: 978-0596515201 ISBN-10: 0596515200 Edition: 1st

Buy New
Price: $34.08
28 New from $8.39 32 Used from $0.01
Amazon Price New from Used from
"Please retry"
"Please retry"
$8.39 $0.01
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Spring Books
The Big Books of Spring
See our editors' picks for the books you'll want to read this season, from blockbusters and biographies to new fiction and children's books.
$34.08 FREE Shipping on orders over $35. In Stock. Ships from and sold by Gift-wrap available.

Frequently Bought Together

Enterprise Rails + Advanced Rails + Rails Cookbook (Cookbooks (O'Reilly))
Price for all three: $89.65

Buy the selected items together

Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 352 pages
  • Publisher: O'Reilly Media; 1 edition (November 3, 2008)
  • Language: English
  • ISBN-10: 0596515200
  • ISBN-13: 978-0596515201
  • Product Dimensions: 7 x 0.7 x 9.2 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (21 customer reviews)
  • Amazon Best Sellers Rank: #1,201,072 in Books (See Top 100 in Books)

Editorial Reviews


Enterprise Rails is indispensable for anyone planning to build enterprise web services. It's one thing to get your service off the ground with a framework like Rails, but quite another to construct a system that will hold up at enterprise scale. The secret is to make good architectural choices from the beginning. Chak shows you how to make those choices. Ignore his advice at your peril. --Hal Abelson, Prof. of Computer Science and Engineering, MIT

About the Author

Dan Chak's varied education in real-world web architecture gives him a unique perspective on the challenges of building rock-solid web applications. Dan has worked at, the world's biggest online retail store, where seemingly small technology problems become big ones due to enormous scale. Dan also directed software development at CourseAdvisor Inc., a Ruby on Rails startup company. A nearly instant success, CourseAdvisor was acquired by the Washington Post Company in October 2007. You can hear his thoughts on his blog at

Customer Reviews

4.7 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 21 customer reviews
Dan Chak's writing style is very readable and his examples are clear and well documented.
Michael Kintzer
I wish I had read it way back when I started as I have made many of the mistakes he warns about and had to learn the hard way.
Amazon Customer
As Dan Chak recommends, if you are new to rails, first read Agile Development for Rails, then start with Enterprise Rails.

Most Helpful Customer Reviews

20 of 20 people found the following review helpful By Scott Burton on April 6, 2009
Format: Paperback Verified Purchase
Dan Chak has written a really excellent introduction to enterprise web application architecture, and a worthy candidate for your technical bookshelf.

Calling it "Enterprise Rails" is a bit misleading, though. Rails only makes fleeting appearances. There's a great introduction to Rails plugin writing, which rightfully urges developers to move any decorator code to plugin modules. He talks a little about segmenting class files along Physical, Logical and Service boundaries, the point of which I have yet to understand completely. And there's a chapter on pushing Rails' application-layer polymorphism down to the data layer, which is good advice, but more on that later.

The bulk of Enterprise Rails is devoted to building a solid data layer. Again, good advice. The Rails team decided that referential integrity and validation belongs in the application layer, which Chak contends is dangerous (and I believe him). However, this is where things start to get a little hairy - enforcing referential integrity and validation in the data layer requires an early and continued adherence to SQL, and Chak makes it clear that any old SQL won't do: it's PostgreSQL or nothing.

This makes fully half of the book a dissertation on SQL domain description language from the Postgre perspective, domain data, third normal form and other data layer topics. I have greatly enjoyed the introduction to Postgres DDL, but it wasn't exactly what I expected from a Rails book.

The last few chapters are mostly about Service Oriented Architecture (which I suspect is why most people buy this book) and caching. Chak shows why he's an expert in enterprise software architecture here. But again, he takes a decidedly anti-Rails approach, emphasizing ActionWebService and XML-RPC.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
8 of 8 people found the following review helpful By Larry on December 18, 2008
Format: Paperback
Dan Chak is obviously one smart guy, and I agree with the other reviewers in that this book provides a lot of information not found in any other Rails books.

I have neither the advantage nor experience of working on a large, complex site like Amazon (where Dan worked), so for all I know maybe all of his ideas border on necessity for a site of that complexity. But there does seem to be a lot of straying from the normal philosophies espoused in virtually every other Rails book.

For example, he eschews migrations and instead does all schema manipulation via SQL DDL statements. And choosing PostgreSQL over MySQL means that on more than one occasion MySQL users are left trying to figure out how to accomplish what he has just covered.

None of which is bad; heck, Rails is Latin for "opinionated", right? But if you're in a fairly small shop working on non-Amazon-size websites (which most of them are), I question how many of these fairly complex strategies will be implemented given the perpetual "behind schedule" state we all seem to be in most of the time, not to mention the pressures of "getting something out the door" as soon as possible.

Regarding this issue, I think he himself put it best during his discussion of REST vs. XML-RPC vs. SOAP: "... we must remind ourselves that in the enterprise practicality is at least as important as purity." (Ada, anyone?)

While we all know that "pay me now or pay me later" and "an ounce of prevention is worth a pound of cure" are absolute truths, the real world often dictates we ditch these proverbs.

Regardless, I think this book is a must-read for serious Rails developers. Dan raises a heckuva lot of good points that you won't find anywhere else.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 3 people found the following review helpful By Tom on February 5, 2010
Format: Paperback Verified Purchase
The author provides an important perspective that can easily be forgotten in the rails community. You may not put into practice everything you find in the book but it is an invaluable, intelligent description of design strategies that need to be re-aquired in the rails community if it wants to survive beyond "this is a really cool language!" ;)
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
1 of 1 people found the following review helpful By Ersin Akinci on November 2, 2013
Format: Paperback
Many of the other reviews have sung this book's praises, so I will only add that as of 11/2/2013, this book is still deeply relevant and is still unique. Its primary value is to remind us Rails and Rubists, who look down on PHP and tend to think that we live in a city upon the hill, that convention over configuration is not enough to make a rock solid enterprise web app. In fact, you must delve into SQL, you must twist Rails' arm a bit to get your namespaces implemented correctly, etc. You will still be able to apply 90%, if not 100%, of the tutorials and lessons in this book in Rails 4.0 with Ruby 2.0.

The most helpful part for me was the four chapters devoted to database design and theory, especially Dan's introduction to third normal form. I suspect that new readers will find his advice to eschew Ruby migrations in favor of straight SQL to be the most controversial aspect of this book, but his argument is solid.

As another reader mentioned, there are a few typos, but none that get in the way of understanding the material. The book's most important "shortcoming" in 2013 is that Rails' plugin architecture has changed dramatically, and almost no one seems to be using the old Rails 2-style plugins discussed in the book. The community has instead moved toward gems and mountable engines, and a lot of gems have since been created that address some of Rails' problems. I actually created one myself (enterprise_mti, search on GitHub or download with RubyGems) for implementing multiple table inheritance using the principles and code found in this book. (Also, check out SchemaPlus, SchemaValidations, and SchemaAssociations for implementing database referential integrity in migrations.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews

More About the Author

Discover books, learn about writers, read author blogs, and more.

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
Enterprise Rails
This item: Enterprise Rails
Price: $44.99 $34.08
Ships from and sold by