The concept of MVC can be found in Baidu encyclopedia.
MVC is a framework design mode for web development. It achieves logical separation, robustness, and scalability between page design and background processing (a lot of good words can be used ).
MVC can be used in Java Web projects. More development is needed. People have provided spring, hibenate, structs and other frameworks for our encapsulation.
It can also be used in. NET web projects. Many developers have provided ASP. net mvc frameworks for our encapsulation.
Today, I watched a video and summarized the following content based on my previous development experience:
(1) MVC is Model <-> controller <-> View
MVC is used for Java Web development: servlet is controller, JSP is view, and JavaBean is Model
(2) Servlet and JavaBean are essentially Java classes, and Serlvet Special Points (are Java classes inherited from httpservlet)
(3) their respective roles: JSP is used for page UI work, and JavaBean is used for complex operations such as database connection. servlet acts as the Controller to implement control and coordination between the client and the background.
(4) In a good project framework, the servlet should have only the followingCodeContent:
1. Accept Parameters
2. Call JavaBean, for example, using a JDBC database for further operations
3. page Jump-there are many methods to compare, such as response. senddirect (), resquestdispatcher, Ajax, etc.
4. Some simple logic judgments
The above figure shows how to download and learn from the MVC design patterns downloaded online ~~~ Thank you for your advice.