Re: Mixing OO and DB

From: David Cressey <cressey73_at_verizon.net>
Date: Thu, 06 Mar 2008 14:42:33 GMT
Message-ID: <tpTzj.6016$H%3.1231_at_trndny01>


"Robert Martin" <unclebob_at_objectmentor.com> wrote in message news:2008030319211770933-unclebob_at_objectmentorcom...
> On 2008-03-02 14:30:45 -0600, "David Cressey" <cressey73_at_verizon.net>
said:
>
> >
> > "Robert Martin" <unclebob_at_objectmentor.com> wrote in message
> > news:2008030212474116807-unclebob_at_objectmentorcom...
> >> On 2008-02-28 10:36:03 -0600, topmind <topmind_at_technologist.com> said:
> >>
> >>>
> >>>>
> >>>> Of course we can implement other kinds of 'find' methods.
> >>>> find_by_date, find_by_salary, etc, etc. Every different query we use
> >>>> on a regular basis, we can create a verb for in our DSL. That verb
is
> >>>> a function call of some kind.
> >>>
> >>> Such only makes sense if you do the same kind of query in *multiple*
> >>> spots. One-usage wrappers are a waste of code in my opinion and just
> >>> creates tedious red-tape accessor clutter.
> >>
> >> Not if they are explanatory. Employee.find("Bob") is a lot easier to
> >> understand than Select * from Employee_Table where Name = 'Bob';
> >
> > You have to be kidding!
>
> Perhaps you'd rather see: get_employee("Bob"); That's fine with me.
> It's much easier to read than the corresponding SQL. No kidding.
>

De gustibus non disputandum est. Received on Thu Mar 06 2008 - 15:42:33 CET

Original text of this message