Patterns of MVC Frameworks: Model

The model is a representation of application data.

Through these representations, users can retrieve, update and delete data, and these methods are used to maintain the state of the application.

Model is a loose term for an object that accesses data, so there is no specific diagram for it because it doesn’t dictate how to map your data to your domain. Because of this you may find specific design pattern references in inherited and example code instead of the word ‘model’ such as TableGateway or Repository.

The responsibility of the model is purely for data access, any manipulation of that data should be handled elsewhere, such a service layer.

Leave a Reply

Your email address will not be published. Required fields are marked *