Develop the Data Transfer Object

Let's define the data transfer object for the phone and person entities.

We'll cover the following

The three key tasks we look at during the growth of the mock user interface are:

  • the creation of the data transfer object
  • the mock service
  • the mock user interface

We will proceed one by one, in order.

Data transfer object

The Person data transfer object has an identifier, the name of the person, and a list of String numbers. The identifier of the Phone object is hidden from the caller, although an instance of a Person can have one or more instances of Phone numbers.

The idea is not to expose the database design because of the complexity and to make it simple for the caller to understand the API.

Get hands-on with 1200+ tech skills courses.