1

Possible Duplicate:
JSF managed bean naming conventions

I am starting with JSF (2.0), EJB (3.1) and CDI. So every thing is called a Bean. And in most tutorials the classes are named <something>Bean, so that it is hard to distinguish from the name if its is a JSF Bean, or EJB Bean or CDI Bean.

(Up to now I was developing Spring applications, and there it was common practice to name the Spring Beans, <something>Service or <something>Controller to distinguish them.)

So my question is: is there a common naming convention that makes it possible to distinguish the beans?

Community
  • 1
  • 1
Ralph
  • 118,862
  • 56
  • 287
  • 383
  • I do not have the feeling that "JSF managed bean naming conventions" answer my question – Ralph Jan 17 '12 at 16:47
  • Subjective questions have never a satisfying answer for the asker. – BalusC Jan 17 '12 at 16:48
  • @BaluC - I have read your answer in "JSF managed bean naming conventions" and it is good, but it only discuss the problem within the presentation layer, but not the relation to the service layer. (and this is one of the parts, my question is about). – Ralph Jan 17 '12 at 16:51
  • Choose a term and use it consistently. That's all what it boils down to. *FooService* is indeed often recurring on service classes (which are in turn usually SLSBs). – BalusC Jan 17 '12 at 16:51
  • To the answer posted by BalusC i add *Action like LoginAction, SearchAction, etc. – Adrian Mitev Jan 17 '12 at 17:04
  • You see this *FooAction* convention often in Struts(2) minded developers btw. It's an action based MVC framework, not a component based one. – BalusC Jan 17 '12 at 17:10

0 Answers0