I am writing a web application using the full MVC capabilities of the Zend Framework and including a service layer, domain model and mapper. I think my understanding of the layers is correct but would like to confirm.
The upper layers are dependent on the layers below, so starting from the top:
Controller - the topmost layer. Highly dependent on the View, which it instantiates, populates and renders. Dependent on Services for access to the Model.
View - Unaware of the Controller. Occasionally depends on Services or Model, e.g. to populate lookup lists for a select control.
Services - Provide an API to clients, such as the Controller. Highly dependent on the Model. In fact, Services often mediate between the Mapper- and Domain-parts of the Model to get work done for a client.
Mapper (Model, Part A) - Has an intimate knowledge of the Domain, manipulating Domain objects to fit into a relational data store, and manipulating relational data to create fresh Domain objects.
Domain Model (Model, Part B) - Contains the domain logic. Domain objects are unaware of other layers however since they need access to other domain objects, they may access mappers as 'object finders'.
Does that sound about right? What have I missed?