Re: Mixing OO and DB
Date: Thu, 6 Mar 2008 01:32:59 -0600
On 2008-03-05 00:35:16 -0600, Marshall <marshall.spight_at_gmail.com> said:
>> 1. We don't need a class for each, we need a method for each.
> What columns of the Employees table does Employees.find("Bob")
> fill in for the Employee class? If the table has ten columns, there
> are 1024 possibilities. Which one of them will you pick?
Which ever ones we need. I'm quite certain it will be fewer than 1024.
> If the relationship is so close, then in what sense is any decoupling
> taking place?
A function has a name.
A function can be polymorphically dispatched.
-- Robert C. Martin (Uncle Bob) | email: unclebob_at_objectmentor.com Object Mentor Inc. | blog: www.butunclebob.com The Agile Transition Experts | web: www.objectmentor.com 800-338-6716 |Received on Thu Mar 06 2008 - 08:32:59 CET