• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stereotypes for Java components

 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

What should be the stereotype of JSF backing beans in class diagram - <<control>> OR something else?Are they controller objects or model objects in MVC?

Thanks...
Amit
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33693
316
Eclipse IDE Java VI Editor
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess, you could use any valid stereo type like BackingBean or ManagedBean or ModelBean etc. Now, I am not sure if I am doing wrong or right but I am putting lot of info in stereo type in the sequence diagrams for the messages. For example, "User Clicks Submit" or User Navigates to bla blah page etc are done with stereo types. Is that ok? Need your feedback.
 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajan Choudhary wrote:I guess, you could use any valid stereo type like BackingBean or ManagedBean or ModelBean etc. Now, I am not sure if I am doing wrong or right but I am putting lot of info in stereo type in the sequence diagrams for the messages. For example, "User Clicks Submit" or User Navigates to bla blah page etc are done with stereo types. Is that ok? Need your feedback.

I reckon you should use UML notes for that instead of stereotypes. Also there is no need to go too detail on this. Keep it high level
 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:How about <<ManagedBean>> ?

Thanks Jeanne.

Are JSF backing beans controller objects or model objects in MVC?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33693
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think backing beans are the model in MVC.
 
Sharma Ashutosh
Bartender
Posts: 346
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beans are always model.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the stereotype << Managed Bean >>
 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thaks Ranga.

Any suggestion on stereotype for Stateless Session Beans (implementation) class? Mark cade has used "@stateless" in his book. Also what should be the stereotype for the business interface of the SLSB?

Thanks
Amit
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar Amit wrote:Thaks Ranga.

Any suggestion on stereotype for Stateless Session Beans (implementation) class? Mark cade has used "@stateless" in his book. Also what should be the stereotype for the business interface of the SLSB?

Thanks
Amit


If we start showing remote/local interfaces, home interfaces and then implementation classes, I am wondering how would the class diagram look like

As other members have suggested, I am showing only implementation ejb class with public methods (no private method). I think, that's enough.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am showing only my EJB - no interfaces. I use the << Stateless Session Bean >> stereotype.
 
Sharma Ashutosh
Bartender
Posts: 346
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used just <<Interface>> for the interfaces.
Didn't tried using @Stateless but used <<SLSB>> and provided in the legend(foot notes) that it's Stateless Session Bean as my diagram was getting cluttered due to too big stereotype name. I prefer consistency - if using @@Stateless at one place why not @ or some other special symbol for other stereotypes?
There is no harm showing multiple stereotypes for the same class.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never thought about this idea of showing 2 steroes.
In one of my classes, I use << Stateless Session Facade >>
 
Gurukant Desai
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Component diagram given in Cade book, does not display Steroetype,
However in STAR uml it is mandatory to display Stereotype if you are selecting "Decorative" style to display boxes identical to one given in Cade book's component diagram.

Any suggestions or solutions?
 
Sharma Ashutosh
Bartender
Posts: 346
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UML gives you a lot of flexibility-no stereotype, multiple stereotypes...it all depends upon you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic