was originally developed to build simulation models. Nowadays it is used for the development of many other kinds of software. With phpPeanuts it is used to develop business applications. These applications do represent their domain in a model, but the model does only describe the domain, it does not simulate it.
The domain model should not only represent data, but also business logic: it should take care of what can and can not be done with the data, and how the data is connected. It should also derive data that itself is not stored in the database.
The domain model should not contain presentation for the user interface. It may contain behavior, but if the application should run on multiple databases, all database specific behavior should be delegated to a database abstraction layer. In phpPeanuts this is the and its helper objects. |