This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on Transfer Objects

 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Do Transfer Objects provide decoupling of data from the remote source?
Is it true?
With regards,
Padma priya N.G.
 
Kalyan Abbaraju
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I won't look it as decoupling of data. But the main benefit is to reduce the network traffic. Data coupling still exists even after we introduced transfer objects and we may need maintain multiple versions of transfer objects over the life cycle of the software.
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kalyan,
It would be of help if you explain what coupling is?
With regards,
Padma priya N.G.
 
Kalyan Abbaraju
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check if this wikipedia link helps you.
http://en.wikipedia.org/wiki/Coupling_(computer_science)

As it states "the degree to which each program module relies on each one of the other modules". So, one of the easiest ways to quantify the "degree of coupling" is either by number of objects passed or number of attributes passed.
In this case data transfer object can dictate various types of couplings mentioned in the above link. Also it is hard to define the term "decoupling" so I always suggest to use "loose coupling".
In case you need more information please let me know.
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kalyan,
Thanks for the explanation.
With regards,
Padma priya N.G.
 
Vinod Subramaniyam
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transfer Object are used for reducing network traffic. They provide the local copy of the Data from the Remote Source. They reduce number of calls made to Remote Source but do not decouple completely from the Remote Source.

Regards,
Vinod S
 
naresh govindaswmay
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I do not know in which situtation transfer of object is occur in a application.At what time the coupling and decoupling is occur...
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by naresh govindaswmay:
hi I do not know in which situtation transfer of object is occur in a application.At what time the coupling and decoupling is occur...

Coupling doesn't refer to the behavior of classes, it refers to how classes are designed to relate with one another. It's not something that happens at a specific point in runtime execution, it's just the way things are made.

Let's say you were designed to always hold hands with Angelina Jolie. That's tight coupling because everything you do could effect her and everything she does could effect you. You're physically attached. There's not much room for flexibility in your life.

Flexibility is good. If one part needs to change, and the pieces are decoupled, then the other parts won't have to be bothered. This can save a lot of programming time and limit the number of bugs introduced with new changes.
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Padma priya Gururajan:
Do Transfer Objects provide decoupling of data from the remote source?


Answer to your query is true.

See in this case you are going to have a View Object or what we call as Transfer Object.
Which is completely isolated from the actual remote object which may be either EJB or whateve.

Means whatever changes you are going to make to your View Object. That's not going to make any effect on the actual remote object. Means decoupling of data from the remote source.
But this sometimes give rise to one more issue, what we call as synchronization. You might be aware of that thing.

Regards,
Khushhal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic