Is MVC a Design Pattern or Architectural pattern

前端 未结 10 2181
轮回少年
轮回少年 2020-12-12 13:38

According to Sun and Msdn it is a design pattern.

According to Wikipedia it is an architectural pattern

In comparison to design patterns, arch

相关标签:
10条回答
  • 2020-12-12 13:44

    Why does one of them have to be true?

    Both can be true, depending on point of view.

    MVC can be an architectual pattern, if it forms the basis of the application architecture.

    It can also be seen as simply a design pattern, an abstract notion that is applicable to any application.

    0 讨论(0)
  • 2020-12-12 13:46

    MVC is architecture pattern. Very clearly stated and shown at http://molecularsciences.org/zend/mvc_model_view_controller

    0 讨论(0)
  • 2020-12-12 13:47

    And according to Martin Fowler they are GUI architectures: Martin Fowler-GUI architectures

    It depends on the size of the application, as it only affects GUI related classes, in a small one (mostly GUI) it could be considered an architectural pattern whereas in a huge one it would just be a design pattern that you apply to the GUI code (could be 10% of the apps code).

    0 讨论(0)
  • 2020-12-12 13:49

    MVC is more of an architectural pattern, but not for complete application. MVC mostly relates to the UI / interaction layer of an application. You're still going to need business logic layer, maybe some service layer and data access layer. That is, if you're into n-tier approach.

    0 讨论(0)
  • 2020-12-12 13:50

    MVC always mentioned and introduced as/in presentation layer in software architecture books.

    Read these books:

    1. Architecting Microsoft.NET Solutions for the Enterprise (Microsoft press)

    2. Professional ASP.NET design patterns (Wrox)

    3. Enterpise Solutions Patterns Using Microsoft.NET (Microsoft press)

    4. Patterns of Enterprise Application Architecture (Addison Wesley)

    5. A Practical Guide to Enterprise Architecture (Prentice Hall)

    0 讨论(0)
  • 2020-12-12 13:51

    If you put ten software architects into a room and have them discuss what the Model-View-Controller pattern is, you will end up with twelve different opinions. … Some of the purists out there will inevitably have qualms with what I refer to as “MVC”. Feel free to leave a flaming comment on the message board at the bottom of this Web page. I will gladly entertain different perspectives on what MVC means, but keep in mind that I do not care.

    Josh Smith

    0 讨论(0)
提交回复
热议问题