From: Avdi Grimm Date: 2008-08-05T00:54:18+09:00 Subject: Re: unit testing advice On Sun, Aug 3, 2008 at 2:23 PM, David A. Black wrote: > I'm afraid I don't see the advantage of that, at least in every case, > over bootstrapping at least part of a database schema and model > structure first. Certainly the kind of thing you're describing does > happen, but if I'm creating an Order model and I know that it's going > to belong to Customer, I'm not averse to saying so up front. Also, > with a large table, you could get into an awful lot of migrations. I've seen a lot of Rails coders completely lose track of the fact that "Model" means "Domain Model" because of thinking like that. To the point of getting confused when you start talking about models that don't derive from ActiveRecord::Base. They've begun to identify "Model" with "table in the database" rather than "model of a domain entity". I challenge any Rails developer to start a a web app without a database, leaving persistence for iteration 2. It can be an eye-opening experience, forcing you to think more about domain concerns and less about keeping MySQL happy. -- Avdi Home: http://avdi.org Developer Blog: http://avdi.org/devblog/ Twitter: http://twitter.com/avdi Journal: http://avdi.livejournal.com