thanks Ted,


-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: can Struts tags create a bean using constructor instead of
setter


Struts does check to see if an ActionForm bean in the appropriate scope
already exists before creating another, and then calls the standard
reset() method before populating it from the current request (which is
one reason why we have a reset() method ;-). 

Struts tries to be parsimonious with object creation wherever it can.
Only one Action object per class is created per application, the mapping
and message resources are used application-wide, the locale resources
are not loaded until needed, and so forth. 

Another rather unlikely optimization is the use of introspection. While
it can be more expensive than other strategies, the way it is used in
the framework reduces the number of objects and custom tags needed by a
deployment, simplyfing the overall application.

Also by relying heavily on standards, Struts automatically gains
whatever optimizations containers provide for those standards. Case in
point are Javabeans. While maps seems like they would be more efficient
at first, field reports indicate that many containers are optimized for
JavaBeans can be more perfomant than maps.

Likewise, as the new standard JSP tags are finalized, we will move
quickly to leverage those within the framework, since the JSP processors
will undoubtedly be optimized for the standard tags.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


From: "Trieu, Danny" <[EMAIL PROTECTED]>

Object construction is expensive as well.  This is an interesting
question and I like to add some.  I hope that Craig, Ted, Martin and
some others senior member can answer the scalabilities of struts.  I
wonder if
struts use instant poolling for from bean.  If so, then how do strusts
reset the from bean?  And if it is all 
possible can you point out all the optimization or scalability issues
that struts has overcome.

Reply via email to