一个简单的问题问了很多很多很多...
模型 1 和模型 2 架构...
我简直无法理解为什么模型一被称为 MVC1...
因为在模型 1 中我们没有与模型 View 和 Controller 之间的强烈解耦,在模型 1 中,向 JSP 或 servlet 发出请求,然后由 JSP 或 servlet 处理请求的所有责任...
因此,如果 Controller 和 View 的分离不是证据,为什么称模型 1 为 MVC 模式的子类别?
这只是将我们带到 MVC 架构的历史进程的开始..
我的推理对吗?
本文:
似乎同意我的观点......但我想知道你的想法......
最佳答案
Java BluePrints 4.4.1 Structuring the Web Tier 特别警告反对这种解释:
The literature on Web-tier technology in the J2EE platform frequently uses the terms "Model 1" and "Model 2" without explanation. This terminology stems from early drafts of the JSP specification, which described two basic usage patterns for JSP pages. While the terms have disappeared from the specification document, they remain in common use. Model 1 and Model 2 simply refer to the absence or presence (respectively) of a controller servlet that dispatches requests from the client tier and selects views.
此外,如果我们考虑模型– View – Controller (MVC) 架构模式,目标是将应用程序分为三个相互关联的部分(模型、View 和 Controller)并且 Model 1 在 Controller 和 之间没有分离看看,不知道Model 1能不能算是MVC的一个子类。
模型 2 相反,通常与模型- View - Controller (MVC) 范例相关联,因为它驱动逻辑和显示之间的分离。
关于java - Model 1 是 MVC 架构的子类吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23935276/