aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Sheil/Cade part 2 example - coupling query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Sheil/Cade part 2 example - coupling query" Watch "Sheil/Cade part 2 example - coupling query" New topic
Author

Sheil/Cade part 2 example - coupling query

chris J Smith
Greenhorn

Joined: Dec 29, 2011
Posts: 8
Hi Ranchers,
I've been pondering an issue with the Sheil/Cade worked example that I'm hoping some of you will be able to shed some light on. The class diagram in the part 2 worked example on page 172 of the study guide has the BidManager methods returning a bid object. Assuming the BidManager is a stateless session bean and so a facade to the business layer doesn't returning the a bid object back up to the presentation tier uneccesarily couple it to the domain model? Surely the presentation tier should be shielded from the domain model implementation by the business tier? If the example class diagram were implemented using JSF then the controller would speak to one or more managed beans acting as the model to the JSP views but the managed bean(s) that interfaced with the BidManager SSB would have to 'know' about the Bid class as it would be being returned to the managed bean(s) following a call to one of the BidManagers methods?

I'd be very interested in any of your thoughts on this.
kumar naresh
Ranch Hand

Joined: Mar 12, 2011
Posts: 117
    
    1
Bid object is an entity acting as a Persistent object. Persistent object is a light weight entity which can be exposed to presentation tier. Persistent object when it is populated with the database value it can be deattached with EntityManager and can be used as normal java bean.

If you have any other intermediate class to expose it to the presentation tier, you will end up like having duplicate classes.

In Cade's example Bid Persistent entity can be used even if JSF is used along with JSP.


OCMJEA 5 |
http://sceacertification.blogspot.in/2011_12_01_archive.html
chris J Smith
Greenhorn

Joined: Dec 29, 2011
Posts: 8
Thanks for your reply Kumar. In cades example, if he had had a managed bean between the ssb bidmanager and the controller the managed bean would have had a 'uses' dependency on the Bid entity to show that the managed bean used/had visibility of the Bid class?
kumar naresh
Ranch Hand

Joined: Mar 12, 2011
Posts: 117
    
    1
yes, there will be uses stereotype between bid class and the managed bean.
chris J Smith
Greenhorn

Joined: Dec 29, 2011
Posts: 8
Thanks again Kumar. Assuming the Bid object returned by the BidManager class is used to render Bid data in one or more of the JSp views then surely there should be a dependency from the controller class to the bidmanager class in Cade/Shiel's diagram? Or is including dependencies such as this 'overkill' in terms of diagrammatically describing a proposed architecture? I'm stuck knowing how much detail to put into my part 2 class diagram.

kumar naresh
Ranch Hand

Joined: Mar 12, 2011
Posts: 117
    
    1
The situation you are asking is similar to what is mentioned in the book. Its always better to follow the book example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sheil/Cade part 2 example - coupling query
 
Similar Threads
Cade/Shiel part 2 worked example -bid object multiplicity confusion
Example assigments for part II/III
Part 2 assignment level of detail
resubmit the deployment diagram - suggestions needed
Part 2: Component Diagram