08MVC design pattern application in classroom operation

Source: Internet
Author: User

An example analysis of MVC in Java Web application

Six basic quality attributes for usability, ease of use, modifiable, testability, security, performance

One of the modifiers in MVC is that MVC is the model-view-controller abbreviation, and the idea of MVC design pattern is to divide a Web application into 3 core modules: Model, view, and controller. These three modules act as different roles and perform different tasks. They are interconnected to form a coherent and efficient whole. It is easy to make changes to the code, while modifying the database-related operations without having to change the interface.

Using MVC pattern to produce some classes to improve the readability and robustness of the program, unit testing more convenient, improve testability.

Analysis of the application of MVC design patterns in specific websites

Log in, you need to enter a user name and password, the password is encrypted during transmission, the data from the model layer is transferred to the controller, and then provided to the model layer through classification, but also to achieve the availability, security.

Most Web sites now have the ability to log in automatically the next time, even if the user closes the browser, the next time they visit the site directly on the login, do not need a user name and password. A cookie is a file that a Web server holds on the client and is used primarily to record information about a user browsing the site. It mainly has two functions: one is to record user information, the next automatic login. The other is to record tracking statistics users browsing the habit of web pages, such as: Browse which websites, stay for how long, and then use this can do traffic statistics; In MVC mode, you can use cookies to automate login.

And when the system has more than one user role, the rights management undoubtedly improves the usability, ease of use and security of the system, allowing multiple users to manage the system data within the authority. At the same time, this kind of design can flexibly set the permission, which embodies the modification of the system quality attribute.

08MVC design pattern application in classroom operation

Related Article

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.