Re: DTOs are evil

2005-08-05 Thread Laurie Harper
Michael Jouravlev wrote: On 8/4/05, Laurie Harper <[EMAIL PROTECTED]> wrote: The idea of a DTO is to encapsulate the persistence logic so that it can be independent of the model representation and business logic, and easily replaceable. I thought that this is the idea of DAO. Oops, typo, I m

Re: DTOs are evil

2005-08-05 Thread Dakota Jack
The operative word here is "if". An "if-then" statement says nothing unless the "if" clause is true, which it is not in this case. If you think it is, then, instead of hitchhiking on Rod, please explain how it is. I cannot see the slightest resemblance myself. On 8/3/05, Michael Jouravlev <[EMA

RE: DTOs are evil

2005-08-05 Thread Daniel Perry
> employeeDAO.updateEmployee( employee ); > > From what I recall the real OO way would be... > > employee.update(); > > and employee takes care of updating itself. > I made a BaseBO using OJB, which has the create, update, softDelete, hardDelete, findById, findByCriteria methods. It also has an

Re: DTOs are evil

2005-08-04 Thread Adam Hardy
Rick Reumann on 04/08/05 19:12, wrote: In particular, CRUD actions are not behaviour of the business object ('save employee object to the database' is not an operation that makes sense in the context of the business domain, it's an implementation artifact [speaking broadly]). That's partly wha

Re: DTOs are evil

2005-08-04 Thread Michael Jouravlev
On 8/4/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > The idea of a DTO is to encapsulate the persistence logic so that it can be > independent of the model representation and business logic, and easily > replaceable. I thought that this is the idea of DAO. > There's nothing saying you can't put

Re: DTOs are evil

2005-08-04 Thread Frank W. Zammetti
On Thu, August 4, 2005 2:12 pm, Dave Newton said: > Frank W. Zammetti wrote: > >>ArrayList getClientList(); >>ClientDTO getClientInfo(String id); >>boolean saveClient(ClientDTO client); >>boolean deleteClient(String id); > > (Hey, shouldn't getClientList return a List? ;) Yep, I suppose it should

Re: DTOs are evil

2005-08-04 Thread Rick Reumann
Laurie Harper wrote the following on 8/4/2005 12:58 PM: Looking up lists of things is sort of a meta-concern; you're right, putting that on the Employee object would clutter things up, especially when you start needing more complex queries -- e.g. getEmployeesEligibleForPerformanceBonus() etc.

Re: DTOs are evil

2005-08-04 Thread Dave Newton
Frank W. Zammetti wrote: ArrayList getClientList(); ClientDTO getClientInfo(String id); boolean saveClient(ClientDTO client); boolean deleteClient(String id); In any case, only these FBs know anything about how the data is stored. I do much the same thing defined as an interface so I can swi

Re: DTOs are evil

2005-08-04 Thread Laurie Harper
Rick Reumann wrote: I do agree, though, with what others have said that DTOs/ValueObjects aren't really that OO. It's funny that the subject comes up because I was a late bloomer to the programming world (started about 6 years and was a waiter and science teacher before that:), and when I first

RE: DTOs are evil

2005-08-04 Thread Frank W. Zammetti
ew EmployeeManager(); > ArrayList employees = manager.getEmployees(); > > And the method gets all the keys in a separate piece of SQL and then calls > the code I have shown above. > > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: 04 August 2005

Re: DTOs are evil

2005-08-04 Thread Michael Jouravlev
On 8/4/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > Rick Reumann wrote: > > Michael Jouravlev wrote the following on 8/3/2005 9:07 PM: > >> http://www.theserverside.com/news/thread.tss?thread_id=35233 > > Just curious what are Rod's exact views on the DTO? I searched for DTOs > > on that link you

Re: DTOs are evil

2005-08-04 Thread Laurie Harper
Rick Reumann wrote: Michael Jouravlev wrote the following on 8/3/2005 9:07 PM: http://www.theserverside.com/news/thread.tss?thread_id=35233 Just curious what are Rod's exact views on the DTO? I searched for DTOs on that link you posted but only saw posts by other people. Mechael's referring t

RE: DTOs are evil

2005-08-04 Thread Mark Benussi
o: Struts Users Mailing List Subject: Re: DTOs are evil Michael Jouravlev wrote the following on 8/3/2005 9:07 PM: > http://www.theserverside.com/news/thread.tss?thread_id=35233 > Just curious what are Rod's exact views on the DTO? I searched for DTOs on that link you posted but only saw

Re: DTOs are evil

2005-08-04 Thread Rick Reumann
Michael Jouravlev wrote the following on 8/3/2005 9:07 PM: http://www.theserverside.com/news/thread.tss?thread_id=35233 Just curious what are Rod's exact views on the DTO? I searched for DTOs on that link you posted but only saw posts by other people. I do agree, though, with what others ha