Assuming a “standard” three-tier application (UI - Domain - Data), should the Domain Layeruser interface classes originally defined in Data Layer?
Domain Layer
Data Layer
I mean, assuming there is a class Productdefined in Data Layer, is it wrong to force some method from my method to Domain Layerreturn it (this makes them visible to the user interface)? Or should I define in Domain Layersome class itself that wraps Productfrom Data Layer, so the user interface is now independent of Data Layer?
Product
thank
Such an implementation associates user interface classes with data classes that are usually harmful. The best practice in every known scenario is to keep them separate. This will not only separate them from each other, but also give you the freedom to embed user logic (at any time in the future) between user interface classes and data classes. It also gives you the freedom to make settings for the data object without directly affecting the user interface classes.
Product ProductImpl. ( ).
ProductImpl
. , MVVM (Model-View-ViewModel), .
, .
, 90% , , .
, .., . , , .
, , , .
, , , , . , , , , . , .
, , , , , . , Andreas_D , , , , , , . Data Layer.
? ? 3 ? - , 3- , UI/BL/DB - .
(= + ), , (DTO). DTO .
/ Product domain , WSDL, Product domain - , .
, DTO, / .
Source: https://habr.com/ru/post/1760244/More articles:Play .WMV with C # .Net - c #Есть ли простой способ читать имена файлов в каталоге и добавлять в массив? - arraysGtk-WARNING Could not find signal handler on netbeans - handlerиспользование скрытого поля для флажков в cakePHP - checkboxUsing jQuery Autocomplete combobox - jqueryConfirm two dates of this format "dd-MMM-yyyy" in javascript - javascriptI need a class library to create PDF files (C #) - c #Как установить кодовую страницу исполняемого файла Delphi 2006 - delphiКак получить значок курсора мыши VS С++ - c++Таблица данных WPF Текстовая эллипсиса Не работает - .netAll Articles