This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tight coupling ?

 
Raj Bhandari
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic