Hello all,

On page 423 of Jason Hunter's book he says "Avoid the unnecessary creation
of objects."

Because OO programming is Java's paradigm, I have been assigning the
parameter values to an object that represents the values in the request
parameters.  For example: I create an object that is GuestBook.  After
instantiating the GuestBook object as HTMLFormData, I then get the person's
name for the guest book from the HTML file with the following:

HTMLFormData.setName(req.getParameter("strName"));

The advantage's are that I have my guest book record as an object and can
pass the object to various method's with the object as a parameter (which is
far easier than passing about 15 or 20 different parameters if the data from
the HTML file were not an object).

However, now I am begging to worry about memory, etc., especially after
reading what Jason had to say on page 423.

Any advice on the disadvantages to what I am doing would be greatly
appreciated.  And any advice as to what kind of OO programming to avoid in
Servlets would be appreciated also.

Brad.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to