File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Tight coupling ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tight coupling ?" Watch "Tight coupling ?" New topic

Tight coupling ?

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Hello everyone,
I have a simple ques. to ask.
If my business service returns a list of some object to the presentation tier.. now while iterating thro' the list my presentation tier will need to know what object is within this list.. is this correct ?
If yes, then isn't this tight coupling ?
Am I missing something.. how do you handle this ? Tks a lot!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If the object is a simple JavaBean this isn't tight coupling. This type of object is known as a Transfer Object or DTO. It's OK for this type of object to be exposed to the view. It's when the view has to know details about how the model is implemented (whether it uses Hibernate, Spring, etc.) that it becomes tightly coupled.
[ September 25, 2006: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: Tight coupling ?
It's not a secret anymore!