The Sample Backend Service Layer
The backend for the samples in this chapter is a simple contact application. Each contact has basic
information, including first name, last name, and date of birth. In addition, a contact also has zero or
more hobbies. Figure 18-1 shows the domain object model.
Figure 18-1. Domain object model for backend sample
For the backend, we will use JPA 2 and Hibernate as the persistence service provider. Also, Spring
Data JPA's repository abstraction will be used. Figure 18-2 shows a class diagram of the service layer.
Figure 18-2. Service layer class diagram for samples
Import the Sample Backend in STS
Because this chapter focuses on the frontend development, we have prepared a project with the service
layer implemented so that you can just import it and then proceed to implement the frontend.
From the sample code, extract the file ch18-backend.zip into your STS workspace. Then import the
project in STS.
To import the project, in STS choose the menu option File ➤ Import, and in the Select dialog choose
Existing Projects into Workspace under the General category, as shown in Figure 18-3; then click Next.
Search WWH :