aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuuta Liang <yuutaw@student.cs.ubc.ca>2023-11-29 16:16:42 -0800
committerYuuta Liang <yuutaw@student.cs.ubc.ca>2023-11-29 16:16:42 -0800
commit878c3bdce6911451aa216c9a1691fa7dc066715d (patch)
tree0659991ff9f64d827295192257025333554ccd62
parent9f897f3e0351a7db7016d22b864b8b88dfd5ce06 (diff)
downloadjca-878c3bdce6911451aa216c9a1691fa7dc066715d.tar
jca-878c3bdce6911451aa216c9a1691fa7dc066715d.tar.gz
jca-878c3bdce6911451aa216c9a1691fa7dc066715d.tar.bz2
jca-878c3bdce6911451aa216c9a1691fa7dc066715d.zip
Add refactoring ideas
Signed-off-by: Yuuta Liang <yuutaw@student.cs.ubc.ca>
-rw-r--r--README.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index 36cc6e4..a4e811e 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,18 @@ Tue Nov 28 11:53:06 PST 2023 - yuuta: Signed CRL with 1 revoked certs.
[View type hierarchy only](img/uml.type.pdf) |
[View associations only](img/uml.assoc.pdf)
-## A note on UML
+Refactoring ideas:
+
+1. Refactor `CertificationAuthority` to better adhere to the single responsibility principle. Currently, `CertificationAuthority`
+represents a complete certification authority, and it contains all required responsibilities such that keeping track of issued
+and revoked certificates, managing templates, and keeping audit logs. It is better to decouple them into different modules and
+models.
+2. I can also decouple `MainUI` into different widgets. Currently, `MainUI` takes care of almost all of the UI data processing
+work (that is, render data from `CertificationAuthority` and handle user input), except for a few dialogs like `RevokeDialog`,
+`IssueDialog`, and `TemplateEditDialog`. I can create new widgets like custom `JPanel`s to handle specific tasks, and `MainUI`
+would be a composition of all widgets only.
+
+### A note on UML
The above UML diagrams are generated using a simple tool called UMLGen, and its source is located in the `umlgen/`
directory. I am the author of the tool. The tool uses JavaParser to parse Java syntax into AST, and it generates Graphviz