in Education by

What is Transfer Object pattern?

Please log in or register to answer this question.

1 Answer

0 votes

The Transfer Object pattern is used when we want to pass data with multiple attributes in one shot from client to server. Transfer object is also known as Value Object. Transfer Object is a simple POJO class having getter/setter methods and is serializable so that it can be transferred over the network. It does not have any behavior. Server Side business class normally fetches data from the database and fills the POJO and send it to the client or pass it by value. For client, transfer object is read-only. Client can create its own transfer object and pass it to server to update values in database in one shot. Following are the entities of this type of design pattern. Business Object - Business Service fills the Transfer Object with data. Transfer Object - Simple POJO having methods to set/get attributes only. Client - Client either requests or sends the Transfer Object to Business Object.

Related questions

0 votes
asked Feb 22, 2022 in Education by JackTerrance
0 votes
asked Aug 3, 2022 in Education by JackTerrance
0 votes
asked Jan 2, 2022 in Education by JackTerrance