To be devil's advocate...Why should you append the word "Bean" to your class 
name?  Should every class that's used as a bean have this word appended to 
it?  PersonBean, AccountBean, etc...

I see nothing wrong with the current name of ActionForm but Form or FormBean 
seem appropriate as well.  In this case, adding Bean to the end is 
appropriate because it's not meant to be used outside of a web framework.

Dave


>From: Eddie Bush <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: Re: struts 2.0 naming conventions?
>Date: Fri, 27 Sep 2002 14:29:38 -0500
>
>Calling it "RequestParameterBean" causes a disconnect too.  Call it what it 
>is - we are OO folks after-all - a FormBean.  It *is* intended to be used 
>with <html:form> - though you may find it handy for other things.
>
>Sorry :-) Let's not start a religious debate over expected convention. I 
>name things deliberately by their expected context.  Following this 
>convention "FormBean" is not only an acceptable name, but a very 
>descriptive one.  It states that it is a bean which models a form.  Is this 
>not why we have them?  Good OO tells us to name things after their 
>real-world counterparts to avoid a disconnect - thus Form is a good name.  
>Java convention for naming beans is to append Bean to the name (so the name 
>is indicative of it's attributes).  Putting the two together ... well, I'm 
>beating a dead horse ... :-)
>
>I thought your complaint was that there were too many Action* classes ...
>
>I really think the conventions I state are sound.  You can't expect to be 
>able to determine a classes full function just by looking at it's name -- 
>that is why we have javadocs, etc ... I know people gripe about the quality 
>of documentation, but I seriously wonder how many of the have truly taken 
>the time to actually *look* at the javadocs.
>
>I'll agree to disagree if you will ;-)
>
>Bartley, Chris P [PCS] wrote:
>
>>No, my point is that any use of the word "form" in the name of the class 
>>is
>>potentially confusing because apparently sometimes people mistakenly think
>>"Oh, i have to use a <form>...</form> in the page that calls this action".
>>
>>>Then, the name of the class goes well with what people call it.  You 
>>>don't have a disconnect.
>>>
>>
>>Well, i think that people casually refer to it as a "form bean" because 
>>it's
>>currently named "ActionForm".  If the class had been named
>>"RequestParametersBean" from the start, i doubt very much that today 
>>people
>>would be calling it a "form bean".  I think it's the word "form" in there
>>that's causing so much confusion for newbies (and at least part of the
>>reason why there are so many questions that read something like "how can i
>>call my action from a link and still have my form bean populated?").
>>
>>chris
>>
>
>--
>Eddie Bush
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to