How to structure an enterprise MVC app, and where does Business Logic go?

前端 未结 8 1410
夕颜
夕颜 2020-12-12 15:05

I am an MVC newbie. As far as I can tell:

  • Controller: deals with routing requests
  • View: deals with presentation of
8条回答
  •  一整个雨季
    2020-12-12 15:55

    Perhaps this link will help you better understand the Model. They can play the role of a Data Transfer Object or be more in depth as the link describes. However, they shouldn't be your DAL in my opinion. Many examples I see handle the Business logic & DAL with the service & repository patterns.

    Check the MVC Contrib Project and the code camp sample to get an example of this.

    I also found Rob Conery's eCommerce Storefront and the Northwind MVC starter kit to help.

提交回复
热议问题