[forge-dev] Getting lost in UICommands class hierarchy

Antonio Goncalves antonio.mailing at gmail.com
Mon Oct 27 05:58:01 EDT 2014

Hi all,

I'm trying to add more commands in Forge... but I have to say, I'm a bit
lost. So, I've made a quick UML class diagram.

As you can see in the attached diagram (UIForge.png), most of the Java EE
commands extend AbstractJavaEECommand, which makes sense. But not all of
them (NewBeanCommand (CDI), ValidationNewAnnotationCommandImpl,
NewQualifierCommand....). And some times you have an extra level of
abstraction (AbstractFacesCommand). Same for the Java commands.
JavaClassCommandImpl extend AbstractJavaSourceCommand but
JavaAddAnnotationCommand and JavaFieldCommand inherit from

Then, when you dive into a command (UIForgeStructure.pgn), some commands
use interface and implementation (see in the second
diagram JavaAddAnnotationCommandImpl
implementing JavaAddAnnotationCommand), some don't
(e.g. NewQualifierCommand). Is there a reason ?

Correct me if I'm wrong, but the way I see it would be (HowIseeIt.png) :
under AbstractJavaEECommand you have a set
of AbstractValidationCommand, AbstractCDICommand, AbstractJPACommand....
each implementing PrerequisiteCommandsProvider (this way, each command sets
up its own pre-requisite). And then, under AbstractCDICommand you have all
the NewQualifierCommand, NewBeanCommand....

What do you think ? Am I the only one getting a little bit lost ;o)

What do you think of re-structuring the class hierarchy ?

Antonio Goncalves
Software architect and Java Champion

Web site <http://www.antoniogoncalves.org/> | Twitter
<http://twitter.com/agoncal> | LinkedIn <http://www.linkedin.com/in/agoncal>
 | Paris JUG <http://www.parisjug.org/> | Devoxx France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20141027/b12da7d1/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UIForge.png
Type: image/png
Size: 81952 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20141027/b12da7d1/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UIForgeStructure.png
Type: image/png
Size: 23879 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20141027/b12da7d1/attachment-0004.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HowIseeIt.png
Type: image/png
Size: 75237 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20141027/b12da7d1/attachment-0005.png 

More information about the forge-dev mailing list