What should I return from the user interface layer to the business layer?

I am writing an ASP.NET application that has a user interface layer, a business logic layer, and a data access layer. From my data layer, I return business objects to the business logic level and pass them to the user interface level. However, I am not sure what to do when I want to save / paste with data from the user interface layer.

Should I create a business object at the user interface level and go to the business level or create it at the business level?

many thanks

+5
source share
4 answers

crunchdog - , -, - /. View Model , , , , . (. asp.net mvc)

-, , , , ..

- , , , . , , , . -, , , . , , /, , .

, business/domain / . -.

+2

, UI, "" -. ( ..), "" -. - - -.

- , .

0

-, ( - DAL BL UI).

BL \ DAL. , , .

DAL .

0

, View Model, -, . , -, - MVC.

Moreover, if the user enters incorrect data, the business object may (not properly) accept the data. However, you do not want to throw out the data entered by the user, so the View Model object without checking does not allow you to store and transmit data entered by the user, regardless of whether they are valid.

0
source

All Articles