Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard conventions or good practices when naming local/remote interfaces of EJBs?

Are there any conventions or good practices when naming interfaces for EJBs? I am trying to apply some DDD principles in my application as well so I am using the "service" sterotype on the classes that is the interface for the world outside.

If I have a QuestionService EJB that provides business logic operations to clients, what would the @Local/@Remote Interface be named? All the books I read so far only names them QuestionServiceLocal/QuestionServiceRemote. Is this suffcient (I am not trying to get fancy with naming, but I wonder if there are better naming conventions)?

Also, are the other/better ways of naming the "services" in an application than just adding the "...Service" suffix on each class?

like image 400
LuckyLuke Avatar asked Oct 08 '22 04:10

LuckyLuke


1 Answers

Java naming conventions are created and adopted by the community and also by the elder developers in the company.
So every time we are facing naming issues, we can go forward with the following:

  1. if the project is already there then just follow the project naming coventions
  2. if this is a new project you're creating then:
    a. QuestionServiceLocal/QuestionServiceRemote is a very good approach
    b. QuestionService is more than enough for naming a service
like image 131
GingerHead Avatar answered Oct 12 '22 11:10

GingerHead