Re: Mixing OO and DB
From: Robert Martin <unclebob_at_objectmentor.com>
Date: Mon, 3 Mar 2008 19:17:02 -0600
Message-ID: <2008030319170297157-unclebob_at_objectmentorcom>
Date: Mon, 3 Mar 2008 19:17:02 -0600
Message-ID: <2008030319170297157-unclebob_at_objectmentorcom>
On 2008-03-03 06:59:57 -0600, "David Cressey" <cressey73_at_verizon.net> said:
>
> "Bob Bad Odor" <bbadour_at_pei.sympatico.ca> wrote in message
> news:47cb2504$0$4034$9a566e8b_at_news.aliant.net..
>>>> Not if they are explanatory. Employee.find("Bob") is a lot easier to
>>>> understand than Select * from Employee_Table where Name = 'Bob';
>>
>> How exactly does Employee.find(string) inform the reader that the method
>> will return a single employee with a matching name? People understand
>> things better when they are informed.
Well, if you think 'find' is not evocative enough, then you could call the function find_single_employee_matching_name("bob");
-- 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 Tue Mar 04 2008 - 02:17:02 CET