Похожие чаты

Then it's not so much a matter of performances but

security and logic
if you give all the data to a frontend that only want to see some then you risk revealing stuff that shouldn't be seen
and also what happens when you have to deal with all those fields when de/serializing, when saving, and so on? you wonder why did you get that field, you wonder what do you have to do if the field is changed (should i update, should i ignore?) and so on
so creating the model you need for that specific feature is usually the best road to go down

5 ответов

18 просмотров

no i don't give all data on frontend i build a complete viewmodel for diff situation then i get data from database and use that view model on front end and use properties that i need for that page.

luca-flan di vedure Автор вопроса
Mr Thieves
no i don't give all data on frontend i build a com...

it doesn't matter at which level, repo->logic, logic->view, the practice is (almost) always using a dedicated model

luca flan di vedure
it doesn't matter at which level, repo->logic, log...

so you say create multiple model for each situation is better?

luca-flan di vedure Автор вопроса
Mr Thieves
so you say create multiple model for each situatio...

99% yes also pay attention to eventual shared/base models

Похожие вопросы

Обсуждают сегодня

Какой-то там пердун в 90-х решил, что есть какая-то разная типизация. Кого вообще это волнует?
КТ315
49
Hi. Do we have a raid bot? Why nobody doing raids on X? Even RH mentioned this and nobody paying attention...whats the channel for hex memes? If mods cant run raids just insta...
H
31
Подскажите, а есть vault lite или ченить такое?) А то нужен вольт для похода в вольт, но весит он ~500 мб) как-то многовато для парочки запросов ))
Alexandr Orloff
17
блеать, почему так?? где в роутере это исправляется?
Арсен Маньяков 🇦🇲
16
void terminal_scroll() { memmove(terminal_buffer, terminal_buffer + VGA_WIDTH, buffer_size - VGA_WIDTH); memset(terminal_buffer + buffer_size - VGA_WIDTH, 0, VGA_WIDTH); ...
Егор
47
🌊 Ocean Nodes Dashboard Update 🚀 Hey, Oceaners! First off, a massive round of applause 👏to all of you for the amazing engagement since we launched Ocean Nodes. In just a few ...
KreigDK | Never DM first🌊
3
Всем привет! Подскажите, пожалуйста, в чем ошибка? Настраиваю подключение к MySQL. Либы лежат рядом с exe. Все как по "учебнику"
Евгений
16
А можете как-то проверить меня по знаниям по ассемблеру?
A A
132
Здравствуйте! У меня появилась возможность купить книгу "Изучай Haskell во имя добра!". Но я где-то слышал, что эта книга устарела. Насколько это правда??
E
22
люди, которые используют flameshot, к вам вопрос. Можно-ли поставить хоткей на создание скриншота? В программе есть отдел "горячие клавиши", но там все для редактирования, скр...
ThunDer104
11
Карта сайта