Answer the question
In order to leave comments, you need to log in
Why do I need a model if I'm using an ORM?
Subject. I am new to mvc. I connected an ORM-ku in the model, I call its methods in the controller. Why else would I need a model?
Answer the question
In order to leave comments, you need to log in
From WIKI:
The model provides data and methods for working with them: queries to the database, checking for correctness. The model does not depend on the view (does not know how to render data) and the controller (does not have user interaction points) simply providing access to the data and managing it.
The model is built in such a way as to respond to requests by changing its state, and the notification of "observers" can be built in.
The model, due to independence from the visual representation, can have several different representations for one "model".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question