Re: Mixing OO and DB
Date: Sun, 02 Mar 2008 20:30:45 GMT
Message-ID: <V7Eyj.217$oy2.81_at_trndny07>
"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! Received on Sun Mar 02 2008 - 21:30:45 CET