<sarcasm> I would think to fit in with hungarian notation one would want a prefix instead of a suffix, something more like for a bean names Foo IRFoo - Remote interface ILFoo - Local interface IHFoo - Home interface EJBFoo - EJB Implementation class PKFoo - Primary key class if required This is sort of fun. Now if we could only implement these things in C++ like would be really good... </sarcasm> Cheers Jay -----Original Message----- From: Richard Monson-Haefel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 8:18 PM To: [EMAIL PROTECTED] Subject: Re: Naming conventions for interfaces (was RE: relationship using EJBspec 2.0.) In the 3rd Edition of O'Reilly's EJB book (http://oreilly.techrev.org/), I use "Remote" and "Local" suffix for clarity. It ends up becoming very cumbersome as some EJB names are already long. For example, the ProcessPayment EJB may have both a local and remote interface named ProcessPaymentLocal and ProcessPaymentRemote respectively. Admittedly, this naming system is pretty verbose, but it's also very explicit which is good think for a tech book. While it works well in the book, I don't know if I would recommend it for a project. Richard -- Richard Monson-Haefel Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000) Co-Author of Java Message Service (O'Reilly 2000) http://www.jMiddleware.com Cedric Beust wrote: > > From: Jonathan K. Weedon [mailto:[EMAIL PROTECTED]] > > > I am taking the time to dwell on these conventions because we are > > working on the default code generation for JBuilder, and we need > > to decide what the default names of beans should be. So, my rule > > is: > > > > * entities: default to local interface, no "Local" suffix > > * sessions: default to remote interface, no "Remote" suffix > > I have been mulling over these issues myself, and I'm not quite sure which > one is best. I agree that typically, Entities will have local interfaces > and no remotes and Sessions will have remotes and no locals. > > Right now, for historical reasons, we have "non qualified name = remote > interface" (e.g. Person) and the local interface is qualified (e.g. > PersonLocal, or LocalPerson). > > There are two questions to debate: > > 1) Should both types be qualified or just one? (i.e. Person and > PersonLocal, or PersonRemote and PersonLocal) > > 2) Should a similar name sometimes be a remote interface and sometimes a > local one? > > The latter question is reminiscent of Hungarian notation debates, so it is > likely to generate a lot of heat. Basically, it boils down to: how much do > you want to know about the underlying type of the interface you are > manipulating? > > As for 1), my guess is that history will prevail and we will probably keep > the same notation we are using right now. > > The bottom line is as always: whatever notation you decide to use, stick to > it throughout your whole project. And JBuilder should probably offer all > those combinations... > > -- > Cedric > > =========================================================================== > 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". =========================================================================== 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". =========================================================================== 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".
