From: Andrew Ballantine Date: 2005-05-04T07:59:10+09:00 Subject: Re: Ruby, Rails and now og David, Thank you for a most comprehensive statement of the Rails point of view, which incidentally matches my own experience of application development. Kind regards, Andrew Ballantine. ----- Original Message ----- From: "David Heinemeier Hansson" To: "ruby-talk ML" Sent: Tuesday, May 03, 2005 10:49 PM Subject: Re: Ruby, Rails and now og > > What I like about this is I can write and evolve my application > > with a focus on objects and behavior, without thinking of what > > database, if any, I might be using, or what tables, if any, I might > > need to create. As I go along, I can easily add persistence to > > objects by adding a few lines of code to the class def. > > > > It helps avoid a lot of big upfront design. > > Heh. This would of course only be true be under the assumption that > you had to create your entire schema before starting on the object- > oriented part of the domain model. Which is false, of course. > > Active Record is imminently suited and created with special attention > for evolving designs. The Rails way of designing your schema is > column by column as they're needed by the domain model. I'll often > times start a new domain model with linked to a table with just a > single column. A person object birthed with just a name, for example. > > The great thing about working column by column is that the > "conversion" from object to database is transparent and happens all > the time. You write a few methods, add a few columns, write some more > methods, add another table, and on we go. There's no build phase > where the framework generates SQL, which then has to be loaded > against your database, and which will destroy the test data you've > been working with. > > Object-to-SQL conversions have their place. One of them is the > capability of generating multiple flavors of SQL from a single > definition. Preventing big upfront design is something you do by > choosing to. It's unrelated to the choice between Object-to-SQL or > SQL-to-object. > -- > David Heinemeier Hansson > http://www.loudthinking.com -- Broadcasting Brain > http://www.basecamphq.com -- Online project management > http://www.rubyonrails.com -- Web-application framework > > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.11.2 - Release Date: 02/05/2005 > >