permaculture playing cards*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Class names in UML diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Class names in UML diagram" Watch "Class names in UML diagram" New topic
Author

Class names in UML diagram

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

This posting refers 2 the UMLdiag in http:/www.javareport.com's
Architect's Corner article entitled "Dynamic servlet to JSP�
page navigation".
The class diagram has a particular inheritance structure whereby
Class "GenericControllerImpl"
extends interface "GenericController"
&
Class "WorkerBeanImpl"
extends interface "WorkerBean"
Is the postfix "Impl" a standard way of naming non-abstract subclasses from abstract ones ? What does it stand for as a mnemonic ?
Thanks
Photek

Regards,

Pho
Grzegorz Klebus
Greenhorn

Joined: Oct 11, 2000
Posts: 20
Pho,
'Impl' stands for 'Implementation' in this context. The concrete subclass implemets the abstract superclass class, hence the name.
I don't think it is the generally-accepted standard (correct me if I'm wrong). It might be, however, a personal/company/project standard.
Regards,
Greg
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
IMO it would be more correct to say
Class GenericControllerImpl realizes interface GenericController. ... and I would say that it sounds a little odd to call the class with the same that the interface, just using the postfix. I suspect that the GenericControllerImpl is not as �Generic� as the interface it implements, and has some distinctive attributes that would help in naming it even if GenericController is the only interface it realizes. What do you think?
PS.
I think that the standard way of presenting abstract classes is using <<abstract>> (stereotype). There is no abstract class in this example.

[This message has been edited by Michal Harezlak (edited November 06, 2000).]
Grzegorz Klebus
Greenhorn

Joined: Oct 11, 2000
Posts: 20
Michal,
I do agree that the correct name is 'realization'. I only mentioned 'implementation' to explain this specific situation. They're using 'implements' since they're Java-slated (Javareport I guess, and in Java you actually implement interfaces:

I also think that there is no need to name either interfaces or realizations specially (e.g., 'IController' and 'ControllerImpl', respectively). There are means to show that in the UML itself (stereotypes) and there is no need IMHO to duplicate this information in a naming convention.
Regards,
Greg
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
Grzegorz:
I totally agree with you. I understand that you were just trying to follow author�s intentions not presenting your own views ;-). I just found the naming convention slightly odd.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class names in UML diagram