- Posted by: Hector Correa
- Posted on: June 27 2001 10:59 EDT
I have worked with J2EE or several months now but I never had to create the models in UML before. I don´t know how to represent some objetcs from a J2EE application in some of the diagrams. For example, I have JSP´s for presentation, servlets for control of flow and some EJB´S. In a sequence diagram, What is best way to represent the JSP page? Is it included as a class? Should I create a class diagram for it?
Any comments? Any help is appreciated.
- How to map J2EE concepts in UML diagrams by Bernhard Messerer on June 27 2001 13:15 EDT
- How to map J2EE concepts in UML diagrams by Aditya Anand on June 27 2001 13:34 EDT
- How to map J2EE concepts in UML diagrams by Tinou Bao on June 27 2001 14:23 EDT
- How to map J2EE concepts in UML diagrams by Cristina Belderrain on June 28 2001 13:45 EDT
I'm not sure about this, but I think there is an upcoming standard for representing EJBs in UML diagrams (currently under JCP). I'm not sure how you should represent JSPs... but I'm quite sure you shouldn't do a class diagram for them, as JSPs should only contain very little code (all code should be kept in the "mediator" JavaBeans or tag libs or wherever, the JSP itself should only call them).
I guess best idea would be representing the JSP in sequence diagrams and maybe component-level diagrams, but definitely not in class diagrams.
just a suggestion though
I'd agree with messie on this...just have the servlet and related helper classes in along with EJB's in the class diagrams... Leave JSP's, taglibs to component and sequence diagrams. Also if you are showing 'summary' sequences limit to showing home ans demote interfaces for EJB's.... ofcource the detailed sequence would involve the actual EJB implementation.
Sure you can represent jsp in rose/togetherj/etc. For rose you can make them an ordinary class with a JSP stereotype. Check out a book called building web applications with uml.
the EJB to UML mapping is indeed being addressed by a spec now under JCP. You can download the "UML Profile for EJB" from:
Basically, it consists of stereotypes to be applied to classes and relationships between classes. I suggest you go straight to the Examples section (p. 66) in order to see whether it would fit to your needs.
Regarding JSP pages, I think it's useful to represent them in a state transition diagram so the navigation among pages can be clearly seen.
Hope this helps,