JavaWeb - MVC development model

MVC: a software development model, not a design pattern is a development model

1.JSP evolution of history

  • Early only servlet, can only use the response output tag data, very troublesome
  • After that came the JSP, Servlet simplifies the development of
  • When the project is small easy to use JSP, when large projects, which have JSP code that have labels, nested loops, very confusing, hard to read and maintain
  • after thatJava的Web开发借鉴MVC开发模式使得程序的设计更加合理

2.MVC mode

  • MVC: M + V + C, is divided into three, decouple
  • M: Model, models 完成具体业务操作, such as the package object to access the database
  • V: View, view,展示数据
  • C: Controller, controller, first 获取用户输入, to be followed 调用模型, but also将数据提交给视图让其展示
    Here Insert Picture Description

3.MVC advantages and disadvantages

3.1 Advantages

  • 耦合性低,重用性高
  • 有利于分工合作

3.2 Disadvantages

  • Making the project architecture is complicated, high requirements for developers, not suitable for small projects

Guess you like

Origin blog.csdn.net/LiLiLiLaLa/article/details/90787124