Object-oriented analysis and design the second step: robustness Analysis, perfect object
Through the previous analysis, we have obtained the most important object-----entity object, which encapsulates the most important data of composing system, and the Entity data is the life of the system.
But the light has the entity also the system is not working, here through the robustness analysis to discover the boundary, the control object, in order to complete the system object discovery roughly.
Robustness analysis is also in use cases. Through the analysis of each use case, it discovers and abstracts the boundary object and controls the object.
Boundary object: Receive external command; Control object: program logic; Entity object: Important data;
Start analysis from use Case 1 (U1):
Internet users: Open Web site (www.xxx.com) "requires the boundary to receive this command, but the boundary is the browser, no need to build"
Browser: Connect Web site "requires boundary to receive this command, Boundary object: Web Site"
Target system: Accept Connection "program logic, Control object: Accept Connection"
Check the legitimacy of the connection (mainly because the server is vulnerable, so you need to join the security check) "Program logic, control object: Check Connection"
Legal, access connection, wait for HTTP request (illegal to see alternative process) "program logic, Control object: Wait for Request"
Browser: Send GET Request "This command requires boundary receive, boundary object: Connection"
Wait for reply "None"
Target system: Received GET request "this and wait for the request is a meaning, waiting for the request on the instructions will receive the request"
Process GET Request "program logic, Control object: Process"
Send back the request reply "program logic, Control object: Send reply Back" to the browser
Reply Complete, disconnect "None, this very simple operation is not necessary to abstract into an object"
Alternate process: The connection is illegal and disconnected. "No, actually disconnecting a method/interface that is more suitable for making connections"
Drawing means:
The other use cases are also analyzed. But don't be paralyzed by analysis. As long as the general analysis of the can, imperfect place, in the beginning of the iterative process can be improved.