Cedric Beust wrote:
>
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Al Fogleson
>
> > We have a naming convention for all our classes. (Be they EJB or not)
> > basically it is a 3 letter company code,
> > the if it is an entity bean there is a capital E if a Stateful session a
> > capital S and stateless gets a small S.
>
> I guess the standard Hungarian Notation arguments are going to show up here
> sooner or later, so here is a quick summary of the thread to come :-)
>
> Pro: this kind of notation it makes it easy to know right away what a bean is,
> based on its name
>
> Con: what if you suddenly decide to change a SLSB to a SFSB? You end up doing
> search/replace all across your code.
>
> Pro: well, that's exactly the point. Such a radical design change must be
> accompanied by a thorough reexamination of your code, and who can be better
> than ejbc at pointing out all the occurrences of your bean?

I don't really like the idea of using the type of bean in the naming of
the bean. Hungarian notation is a very bad idea, and imho goes against
all the ideas of OOP. Changing a bean from stateless to statefull might
not have any implications in client's contract with the bean but if
having to change all the client code form MySillyNamedsBean to
MySillyNamedSBean would probably get a lot of people very mad ;-)

IMHO, the idea is to use nouns. It woul be entirely possible to have two
entities, ClientBean and SupplierBean that use the same statefull bean
as a fa�ade to process inclusion to your table, for Example AdminBean or
RegistrarBean. This imho is the whole idea behind EJB. Reusability of
code.

Therefore I agree with the cons, but disagree with the pro. Use a short
comment as the first line of the code to describe the bean and to
indicate wether it's Statefull Stateless of Entity.

sven


--
======================================================================================
Sven van 't Veer                                              http://www.cachoeiro.net
Java Developer                                                      [EMAIL PROTECTED]
======================================================================================

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to