MVC Instance Application pattern

Source: Internet
Author: User

Combined with "XXX demand system" analysis.

Combine six mass properties:

Availability: Under normal circumstances, the system can work over an hour.

Modifiable: Use configuration files to modify configuration files. For some public methods, encapsulation, modification, only need to modify the encapsulated method, do not have to modify the calling method code.

Performance: Improves system response time and does not allow users to feel delayed.

Security: Encrypt and store information such as passwords.

Testability: Unit testing using JUnit.

Ease of use: Users do not legally check real-time reminders and so on.

Specific function Module Analysis:

Login: Implemented using MVC.

Model: The user enters the entity class for each field.

view:jsp file for users to enter the account password login system.

The Xxxactino class under the Controller:action package and the class under the Service Package Act as a controller, where the method in action takes the user input information and invokes the method in service to determine if the user exists, and if so, whether the password is correct , the action returns a different value based on the return value after service processing, and if the user authentication succeeds, the configuration in struts is returned to the home page based on the action return value.

MVC Instance Application pattern

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.