Develop the Data Transfer Object
We will look at developing a book shipping service in this lesson and define its data transfer object.
We'll cover the following
We will divide the mock user interface development into the following three major tasks:
- the data transfer object
- the mock service
- the mock user interface
Data transfer object
When the database service is ready, we will create the actual user interface and integrate it.
The data transfer object encapsulates the actual entity design and does not allow the user interface or the client to know the entity design underneath.
Look at the data transfer object carefully, you will see the identifier of the Book
object along with a name and city field. We are not exposing the Shipping
entity or its identifier. We form a relationship between the Book
and Shipping
in the service, but to the user, it is one object called Book
.
This is particularly useful for the user interface team as they do not have to manage the Shipping
entity identifier and can just call the service as one object.
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy