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!
posted 9 years ago
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 ]