Jamis Buck wrote:
Well, but that's just ActiveRecord, right? Not Rails as a whole. You can use any other ORM you want with Rails, if AR doesn't fit your style of thinking.
Yes, I would imagine. But then one is no longer really dealing with Rails but with, well, some custom arrangement of libraries. Which may be the better way to look at it anyway, even if one uses AR.
For me, I really like that AR doesn't clutter my model classees with extraneous definitions. I like looking at a two or three line model class, that only defines the behavior of the class and the foreign key relationships. Others (like yourself, James) obviously prefer the model to be everything, including the explicit definition of the data itself. And that's cool.
Clutter? Interesting. When I'm looking to see what values I can obtain from an object passed to a view, or what it expects passed to the constructor when instantiated, th AR-based class code won't tell me. I have to go look at a .sql file or open up some DB admin tool to locate such extraneous details.
Worse, if I go change object behavior, I have to bounce back to some other file or application to ensure I'm making changes in all the right places. (I know this has all been discussed on the Rails list; different strokes, and all that.)
But yah, ActiveRecord does not do the Og-thang and allow you to define your schema in your model (at least, not so that the database can be created from the model).
Which is basically what I was looking for. But I have to go poke around with migrations, because it may make a few Rails things simpler.
Thanks,
James
···
--
http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys