How to Learn the MVC design pattern of Java

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.