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