M
M
Maxim2020-06-05 12:46:49
Backend
Maxim, 2020-06-05 12:46:49

Should the view be passed along with the model data or separately?

Should business logic model (object) and view (html) data be mixed when passed to the client?
How is this even supposed to happen, in one answer? Or in different ones?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-06-05
@max_shane

The client accepts either data or html. In the first case, the client builds the view itself, and in the second case, he does not need the data, because it has already been turned into a view.
So no, it shouldn't be mixed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question