This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Stereotypes for Java components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Stereotypes for Java components" Watch "Stereotypes for Java components" New topic
Author

Stereotypes for Java components

Kumar Amit
Ranch Hand

Joined: Aug 13, 2001
Posts: 103
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


SCJP, SCJD, SCEA
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

How about <<ManagedBean>> ?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
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

Joined: Aug 13, 2001
Posts: 103
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

Joined: Aug 13, 2001
Posts: 103
Jeanne Boyarsky wrote:How about <<ManagedBean>> ?

Thanks Jeanne.

Are JSF backing beans controller objects or model objects in MVC?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

I think backing beans are the model in MVC.
Sharma Ashutosh
Bartender

Joined: Apr 06, 2001
Posts: 346
Beans are always model.


Ashutosh Sharma
SCJP 1.2, SCEA 5, Brainbench certified J2EE Developer, Documentum Certified Professional
Blog : http://scea5-passingpart2and3.blogspot.com/
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

I am using the stereotype << Managed Bean >>


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Kumar Amit
Ranch Hand

Joined: Aug 13, 2001
Posts: 103
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

Joined: Mar 17, 2011
Posts: 196
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

Joined: Oct 16, 2003
Posts: 1076
    
  10

I am showing only my EJB - no interfaces. I use the << Stateless Session Bean >> stereotype.
Sharma Ashutosh
Bartender

Joined: Apr 06, 2001
Posts: 346
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

Joined: Oct 16, 2003
Posts: 1076
    
  10

Never thought about this idea of showing 2 steroes.
In one of my classes, I use << Stateless Session Facade >>
Gurukant Desai
Ranch Hand

Joined: Apr 07, 2008
Posts: 56
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

Joined: Apr 06, 2001
Posts: 346
UML gives you a lot of flexibility-no stereotype, multiple stereotypes...it all depends upon you.
 
wood burning stoves
 
subject: Stereotypes for Java components
 
Similar Threads
Complex Table and JSTL
How to add stereo types in sequence diagrams for Rose
Sort by Name
Doubt on != and == when boxing and unboxing is used
Nested members in XML-RPC