Is the MVC-pattern a pure presentation-tier pattern?

前端 未结 3 995
一个人的身影
一个人的身影 2021-01-18 06:10

Kind of a special question today :)

I just had a test at my technical university where I was told that I am wrong.

So I like to know from you folks(I believe

3条回答
  •  走了就别回头了
    2021-01-18 06:34

    Your teacher is right, the "model" merely represents data that is to be presented. For example, the data that makes up a web page.

    The data itself will ultimately come from the business layer, but the model should be restricted to the presentation layer. It's the model of your presentation.

    For example, you might retrieve data as datasets, and use the datasets to build page-specific models.

提交回复
热议问题