This section provides information and guidance on the using domain services, shared code and data entities within the middle tier of a Open Ria Services application. In a 3-tier application, the middle tier contains the logic for managing the interaction between the presentation tier and the data tier. You apply business rules and validation checks in the middle tier to make sure that the data is in an acceptable state. For example, in a human resources application, you may provide a user interface that enables employees to submit a vacation request, but you have to make sure that an employee's vacation balance is never less than zero. Therefore, you add logic in the middle tier to check the employee’s vacation balance before submitting a vacation request.