From: Florian Gross Date: 2004-11-12T07:13:27+09:00 Subject: Re: advice for a class implementation? ( ugh, long... ) I think the problem is that you want to make the SQL adapter more efficient than just pulling all the Objects out of the database and then operating on them in RAM. I'd suppose you want to use SQL queries here instead. I would expect the problem space to get a lot simpler if you'd decide to use a prevalence system instead. If you really want to use a SQL backend, this might work: Have QuoteCollection::SQL and QuoteCollection::XML both implementing the same interface that always return Quotes. I don't think an abstract base class (QuoteCollection::Base) would make much sense here because it doesn't seem like there's any functionality that those classes would share. If you would base your application on a prevalence system you would just need to provide different constructors (.from_xml and .from_db) for one single QuoteCollection class that just uses Quotes internally. I'm not sure if this is the best or most professional way of doing things, but I would expect it to work.