M
M
Max Ba2019-07-25 13:08:57
Design patterns
Max Ba, 2019-07-25 13:08:57

What is the model for in MVC?

What role does the model play in MVC? Controller and View with them everything is clear.
There are always at least several models used on one page.
For example. on the product page in IM, there are a bunch of other entities besides the product. This is the user and articles and news, and so on. And all this is displayed at once)
What then is the point of the model?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
irishmann, 2019-07-25
@irishmann

You don't seem to know how to google

  1. MVC for the web: it couldn't be easier
  2. M in MVC: why models are misunderstood and underestimated
  3. MVC Concept for Dummies

N
Nikita Dergachov, 2019-07-25
@vanillathunder

A model is not only entities, models mean all business logic (Services, helpers, database requests, etc.)

A
Anton R., 2019-07-29
@anton_reut

VIEW - a stupid template on html
CONTROLLER - accepts a request and calls the desired model
MODEl - all the logic - what to request from the database, what to write to the database, how to withdraw from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question