Aditya Kumar wrote:
#2 - This should be an easy problem to tackle. I suggest you read chapter 9 of Cade's book. It clearly shows an example assignment depicting the @stateless and @entity classes. You just need to decide what stereotype to use. Yes, you are also right about including these classes in the class diagram.
Aditya Kumar wrote:
#3 - About the components, well there are more than one ways of doing that. A good way (I think) is to first determine the tiers of your application and decide what classes reside in what tier. I did it like that. Once I was done with that segregation, I broke down the tiers further with sub-systems and the components within. For example, if there are some classes (stateless bean(s)) in the business tier that take care of user account related details, for me that is a subsystem and the classes within that could be the components. I also showed a component as "helper classes" (there are, inevitably). If there are another bunch of classes (interface + EJB) that deal with accomplishing a transaction for an entity at the business tier, that is another sub-system having components. I think if you google around and also search some of the archives of this forum, you will have an idea about this.
Aditya Kumar wrote:
#1 - You are here dealing with a confusion about how to deal with a property. What you have mentioned are both ways of property notation 1) Showing it as attribute (in the class box itself) 2) Showing it as an association. You can choose either of the ways. You do not need to show it using both ways. How I did it was that you can choose the important classes to show as a association and the lesser important ones (and the primitive ones) as attributes. if you look closely that is what the IBM example about Flight/Plane has done as well. I will recommend you to also lookup Martin Fowler's UML Distilled, page 37 for further reading.
Are you referring to Martin Fowler's UML Distilled 3rd Edition or 2nd Edition ? If I am showing it as an attribute, do I need to draw a line to link it to the actual object?
What is the full name of Cade's book?
Do you mean that in your example, "User Account" is a component in the component diagram?
pin guan wang wrote:Hi all,
Sorry, I have more class diagram questions:
1) For stereotype for classes, is it completely alright to create my own stereotype, for example, is it ok if I have stereotype like <<Stateless Session Bean>>, <<Interceptor>>, <<JSF Managed Bean>> ?
2) Mark Cade & Humphrey Sheil's book also represent stateless session bean like "BidManager (@Stateless)" and entity class like "Bid (@Entity), is this the correct way of representation?
3) I have seen Mark Cade & Humphrey Sheil's book adding JSP files into the class diagram, should I include JSF (.xhtml files) into my class diagram?
4) Do we need to add getters and setters methods into the classes? I have read the below article where it mentioned it is redundant to include them. Are getters and setters unnecessary?
http://stackoverflow.com/questions/5242133/should-i-include-getters-setters-in-class-diagram
Thanks
I have seen Mark Cade & Humphrey Sheil's book adding JSP files into the class diagram, should I include JSF (.xhtml files) into my class diagram?
Do we need to add getters and setters methods into the classes
Nothing up my sleeve ... and ... presto! A tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|