Class diagrams for Struts and EJB's
Hii Javaites
I have developed a application in Struts, EJB in Weblogic.
Now i need to create the class diagrams of my application.
I am thinking of reverse enginerring it using Enterprise Architect.
Now i want to know in my class diagrams, wht classes will come ?
Will it include my action classes, form beans ,DTO's, Session beans , helper classes.
I am little confused ,
plz guide me
Enterprise Architect will produce a class diagram for all the classes you select in the reverse engineering tool. This tends to very large and unweildy for any none trivial project.
A good practice is to import the entire project, ignore the generated diagram and create new class diagrams. Then drag the classes from the model onto the diagrams, to illustrate a specific aspect.
Hiii
I want to know , how will i show , the whole structure i.e model , view , controller , in one class daigram.
Say , i have a login page , and corresponding action is logon_Action.java.
This action class , uses a dynaform bean (login),
and the execute method of logon_Action suppose calls a validate method of webService.java .
The validate(logonDTO)method of the webService.java inturn calls a Session bean.
logon_Action.java>validate(logonDTO) method of webService.java->validate(logonDTO) calls Session bean->Sessio bean calls Entity bean.
So how will i show the whole class diagram for the login.
Plz help me , i m still confused .
You should not have to. UML is about communication. Use a sequence diagram to show how the components execute in order. Use a class diagram to show OO relationship (inheritance, delegation, etc.)For any UML diagram, you can choose between two extremes: a mondo-diagram with everything (probably requiring a plotter and big wall to hang it on) or a series of diagrams centered on one class and its relationships to other classes (requiring a book binder to hold all the pages). In reality, you will pick a happy medium in between: something that communicates most relationships (or events) for a series of classes that fits on a single piece of paper. There are no hard and fast rules. UML is about communication. Pick the style that works best for you.
- Saish
Saisha at 2007-7-13 22:46:07 >

Hii Saish
Wht i have done is that, i m building class diagram for each activity, say (details)
Details consisits of sub activities such as add details, edit details, remove details .
For details , i have created a buisness delegate class DetailWebService.java.
This class contains methods for add ,edit, delete Details.
This class is used to call Session Bean.
DetailWebService class is called by actions AddDetailsAction,EditDetailsAction and DeleteDetailsAction .
So now i m depicting the whole behaviour of Details in one diagram, where i am showing the complete class daigram for details in the following way --
1) controller part -
AddDetailsAction,EditDetailsAction , DeleteDetailsAction
2Model part
a)Buisness Delegate(DetailWebService)
b)Session Facade (DetailsSession bean)
c)Persistence (Detail Entity Bean)
i am showing all the classes for session bean also, i.e Home interface ,Remote Interface , and Bean class.
Is this appraoch correct for showing class daigram for a MVC based application.
Looking forward to ur reply.
What you are modelling, IMO, is best put on a sequence diagram, the purpose being to show the calls between tiers (and hence dependencies). However, class diagrams, generally, show releationships between classes that are different: generalization/realization (inheritance), dependency/composition/aggregation/etc.
- Saish
Saisha at 2007-7-13 22:46:07 >

Hii SaishStill it is not clear 2 me.Can u give me a simple example of class daigram using the classes given by me.A simple exmple will make the thing clear for me.Thanx