1 Registering user Use Cases
Main scenario
1 User access to registration page
2 system generated verification code picture
3 user input desired id,emial address, desired display name, password, confirm password
4 User Input Verification code
5 User submits registration request
6 System Check Verification code
7 system Check ID has been registered, email has been registered, password and Confirm password is consistent
8 The system saves inactive account information
9 system generates activation link and sends to user mailbox
10 users open the mailbox, access the activation link
11 system Resolve activation link, activate related account
12 User login with ID and password
Extending the scene
4a: User cannot see verification code and request rebuild
1. Skip to Step 2
6a: The system has detected a user-entered verification code error
1. System Upgrade Verification Code error
2. Skip to Step 2
7a: The system detects that the ID has been registered, or the email has been registered, or the password and confirmation password are inconsistent
1. System prompts for related error messages
2. Skip to Step 2
2 Interface Prototypes
3 Brief design
3.1 Interface Definitions
The external interface of the system includes:
Generate a Captcha picture
Processing Registration Requests
Activate account
Processing Login
Generatecaptchakey () and Generatecaptchaimage () methods, the simple explanation for CAPTCHA is the verification code.
Each captcha need to have a key, according to this key, the system can get the corresponding CAPTCHA image and the actual value.
3.2 Plate Structure
After defining the interface of the system core, the system is further divided based on the principle of functional segmentation and easy reuse.
This is based on the package name partitioning module, which is also a common practice in Java.
Module Division of Account Registration service
Now explain the function of each module (package) individually:
Com.juvenxu.mvnbook.account.service
The core of the system, it encapsulates all the underlying details, exposing simple interfaces externally. This is actually a facade pattern.
Com.juvenxu.mvnbook.account.web
The module contains all Web-related content, including possible jsp,servlet,web.xml, and it relies directly on the Com.juvenxu.mvnbook.account.service module to use the services it provides.
Com.juvenxu.mvnbook.account.persist
Processing account information persistence, including increase, deletion, change, check, etc., according to the implementation, can be based on the database or file.
Com.juvenxu.mvnbook.account.captcha
Process verification Code key generation, picture generation and validation, etc., where third-party class libraries are needed to help implement these functions
Com.juvenxu.mvnbook.account.email
Handle the configuration of mail service, activate the writing and sending of mail, etc.
Summary:
The development process is as follows:
Requirements for Account registration services
The approximate interface
Simple interface Design
Division of responsibilities of modules
Maven Combat Nineth _09_yucong_ Background Development case: Registered users