About the rule of naming methods in BeanClass and Home Interface
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Julia_Huang
Posted On:   Wednesday, January 16, 2002 10:36 PM

Should I use ejbHome as the prefix in all methods defined in Home Interface when I coding BeanClass?


The book Enterprise JavaBeans 2/e doesn't mention about this, but j2ee tutorial says so.


What's the difference?

Re: About the rule of naming methods in BeanClass and Home Interface

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, January 17, 2002 12:37 AM

Julia,

There are no rules on naming objects, even with EJB. And the specs, as you have already mentioned, does not say anything about it.


When you are developing, and especially when you are part of a team, there are conventions that should be used, to help not only the development but also the debugging and the maintenance part of the project.

In the case of EJB, giving to the objects names that can resemble the interface they are implementing is a great help.

There are many conventions... some uses the one you have mentioned, some other use to postfix the interface after the bean name...

About | Sitemap | Contact