In Chapter 2, Working with Dependency Injection and Chapter 3, Persistence, we covered beans and entities. These components represent data models, the first is very flexible and the second is driven by the persistence model. Both must be driven by an application layer. An application layer provides operations that manipulate beans, receive requests, and, in the end, return the result requested by a client.
The application layer can receive information from different systems but not all is requested by the client. The art of manipulating beans is called business logic. A set of operations tied by a single goal is called a domain. Models, APIs, and services are the instruments used to represent a domain.
Java Enterprise provides much of its background to give components that are able to write the business logic. Through the same CDI we saw in Chapter...