Compare between 3-Layer pattern and MVVM

后端 未结 4 823
后悔当初
后悔当初 2021-02-04 17:20

i don\'t know MVVM. i always follow 3-layer patter where one layer is UI, another layer is Business layer and last layer is Data access layer.

in this layer we send requ

4条回答
  •  滥情空心
    2021-02-04 17:43

    MVVM is arguably a three layer architecture itself. Those layers all exist within the same application.

    "3-layer" also sometimes refers to n-tier architecture, which is more about separating the UI, the service layer, and the data layer, onto separate servers. If you have that sort of layering, then MVVM will not replace it. It will only augment the UI layer, splitting it into its own three layers.

    Here's a write-up of MVVM that shows some relation between classic MVC, through MVP and MVVM:

    http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

    Also see my answer to this other question. It explains some of the reason you would use MVVM over older variations on MVC.

提交回复
热议问题