Machine Room reconstruction Drawing is a very important stage, the machine room is reconstructed before also painted UML diagram, but this time and the last time, this time have layered thinking inside.
Package Diagram
Before the three layers of the time between the transmission is clear, package diagrams is also easy to draw out, first look at the previous three layers of package diagram. The input information is passed from the U layer to the B layer through the entity, and the information is passed from the D layer to the B layer, and the B layer is judged by the entity to return the result to the U layer.
The previous three layers are not very good at realizing the idea of low coupling, and we have learned the design pattern, we want to continue to layered, to write seven layers. Not quite understand before, look at everyone's blog, know that between the U-layer and B-layer to add the appearance mode, reduce the U-layer and B-layer between the coupling between the B-layer and the D-layer between the abstraction of the factory and interface layer, and in order to reduce duplication of code to write added SqlHelper. The seven-layer package is shown below:
class Diagram:
The first time you draw the students, cards, and bills as a class, now there are hierarchies, under each package there will be many classes. Take the UI layer as an example, look at my class diagram, the other layers may be wrong more, it is not posted out.
use case diagram:
The difference between the painting and the first painting is not very large, and each form is considered a use case.
Timing Diagram:
Feel less can draw, to log in as an example, first draw if there is anything wrong welcome correct. The refactoring process will continue to modify these diagrams as well.
Summary:
Knock some code to know that drawing is really important, drawing can have a general view of the whole, you can understand how the layers are abstract, it is very convenient to write and return value of the confirmation, and to help code naming specification implementation, if the picture is good, the code is really not a problem, My diagram also needs to be well supplemented and modified.
[Machine Room reconfiguration] UML Diagrams (Package diagrams, class diagrams, use case diagrams, time series diagrams)