you have mentioned that
"You're going to have an object in memory no matter what"
If we are using Resultset how/when is the Object getting created? I was
under the impression that it will get the data directly from the DB.
what are these DTO, GC and IMO?
I do remember reading somewhere that if this approach is used then we'll be
breaking the MVC architecture.
any reference links for this?
Thanks.
From: Dave Newton <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: [OT] Re: design question
Date: Mon, 30 Jan 2006 15:56:31 -0500
fea jabi wrote:
> But as I mentioned earliar I am creating an object which I am planning
> to instanciate for each row of data. When I told about this to my team
> they were concerned about the objects being in memory and advised to
> use the resultset directly. In the sessionbean probably we can create
> these rowobjects before it's sent to the webserver.
You're going to have an object in memory no matter what. In most cases
DB connections are a more limited resource than memory. Besides, once
the ResultSet is translated into a DTO, it is free for GC anyway, so
you've really only lost the conversion time, which is worth it IMO.
I think that using a POJO (or POJO+) for the DTO more than pays for the
conversion time with easier code, generally more robust code, etc.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]